diff --git a/demo/validator1/.env.development b/demo/validator1/.env.development index bba8faf..3166e7b 100644 --- a/demo/validator1/.env.development +++ b/demo/validator1/.env.development @@ -2,6 +2,7 @@ HOME_RPC_URL=http://ganache_home:8545 HOME_BRIDGE_ADDRESS=0x44c158FE850821ae69DaF37AADF5c539e9d0025B HOME_TOKEN_ADDRESS=0xd5fE0D28e058D375b0b038fFbB446Da37E85fFdc HOME_START_BLOCK=1 +HOME_MAX_FETCH_RANGE_SIZE=10 SIDE_RPC_URL=http://ganache_side:8545 SIDE_SHARED_DB_ADDRESS=0xd5fE0D28e058D375b0b038fFbB446Da37E85fFdc diff --git a/demo/validator1/.env.staging b/demo/validator1/.env.staging index 20692c4..5513f42 100644 --- a/demo/validator1/.env.staging +++ b/demo/validator1/.env.staging @@ -2,6 +2,7 @@ HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0 HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc HOME_START_BLOCK=13276224 +HOME_MAX_FETCH_RANGE_SIZE=10 SIDE_RPC_URL=https://sokol.poa.network SIDE_SHARED_DB_ADDRESS=0xda9a1cA2Fcb18cAB02934269369627D2b4ea8902 diff --git a/demo/validator2/.env.development b/demo/validator2/.env.development index d1cfebd..433ee15 100644 --- a/demo/validator2/.env.development +++ b/demo/validator2/.env.development @@ -2,6 +2,7 @@ HOME_RPC_URL=http://ganache_home:8545 HOME_BRIDGE_ADDRESS=0x44c158FE850821ae69DaF37AADF5c539e9d0025B HOME_TOKEN_ADDRESS=0xd5fE0D28e058D375b0b038fFbB446Da37E85fFdc HOME_START_BLOCK=1 +HOME_MAX_FETCH_RANGE_SIZE=10 SIDE_RPC_URL=http://ganache_side:8545 SIDE_SHARED_DB_ADDRESS=0xd5fE0D28e058D375b0b038fFbB446Da37E85fFdc diff --git a/demo/validator2/.env.staging b/demo/validator2/.env.staging index edce271..e2f6756 100644 --- a/demo/validator2/.env.staging +++ b/demo/validator2/.env.staging @@ -2,6 +2,7 @@ HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0 HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc HOME_START_BLOCK=13276224 +HOME_MAX_FETCH_RANGE_SIZE=10 SIDE_RPC_URL=https://sokol.poa.network SIDE_SHARED_DB_ADDRESS=0xda9a1cA2Fcb18cAB02934269369627D2b4ea8902 diff --git a/demo/validator3/.env.development b/demo/validator3/.env.development index 64f6f65..9c175f8 100644 --- a/demo/validator3/.env.development +++ b/demo/validator3/.env.development @@ -2,6 +2,7 @@ HOME_RPC_URL=http://ganache_home:8545 HOME_BRIDGE_ADDRESS=0x44c158FE850821ae69DaF37AADF5c539e9d0025B HOME_TOKEN_ADDRESS=0xd5fE0D28e058D375b0b038fFbB446Da37E85fFdc HOME_START_BLOCK=1 +HOME_MAX_FETCH_RANGE_SIZE=10 SIDE_RPC_URL=http://ganache_side:8545 SIDE_SHARED_DB_ADDRESS=0xd5fE0D28e058D375b0b038fFbB446Da37E85fFdc diff --git a/demo/validator3/.env.staging b/demo/validator3/.env.staging index da39c37..3925fbc 100644 --- a/demo/validator3/.env.staging +++ b/demo/validator3/.env.staging @@ -2,6 +2,7 @@ HOME_RPC_URL=https://kovan.infura.io/v3/5d7bd94c50ed43fab1cb8e74f58678b0 HOME_BRIDGE_ADDRESS=0x6ADCa5e691341fb9de8927d15c0a89B83A4E665e HOME_TOKEN_ADDRESS=0x57d2533B640cfb58f8f1F69C14c089968Da9fdFc HOME_START_BLOCK=13276224 +HOME_MAX_FETCH_RANGE_SIZE=10 SIDE_RPC_URL=https://sokol.poa.network SIDE_SHARED_DB_ADDRESS=0xda9a1cA2Fcb18cAB02934269369627D2b4ea8902 diff --git a/package.json b/package.json index e954bd9..154668e 100644 --- a/package.json +++ b/package.json @@ -10,5 +10,8 @@ }, "engines": { "node": ">=10.6.0" + }, + "dependencies": { + "ethers": "^4.0.39" } } diff --git a/src/oracle/docker-compose-test.yml b/src/oracle/docker-compose-test.yml index 2de2b8b..8725650 100644 --- a/src/oracle/docker-compose-test.yml +++ b/src/oracle/docker-compose-test.yml @@ -84,6 +84,7 @@ services: - HOME_START_BLOCK - BLOCKS_RANGE_SIZE - VALIDATOR_PRIVATE_KEY + - HOME_MAX_FETCH_RANGE_SIZE - 'RABBITMQ_URL=amqp://rabbitmq:5672' - LOG_LEVEL networks: diff --git a/src/oracle/docker-compose.yml b/src/oracle/docker-compose.yml index 994bfa7..e16cbe4 100644 --- a/src/oracle/docker-compose.yml +++ b/src/oracle/docker-compose.yml @@ -93,6 +93,7 @@ services: - HOME_TOKEN_ADDRESS - HOME_START_BLOCK - VALIDATOR_PRIVATE_KEY + - HOME_MAX_FETCH_RANGE_SIZE - 'RABBITMQ_URL=amqp://rabbitmq:5672' - LOG_LEVEL networks: diff --git a/src/oracle/ethWatcher/Bridge.json b/src/oracle/ethWatcher/Bridge.json deleted file mode 100644 index 9eba79e..0000000 --- a/src/oracle/ethWatcher/Bridge.json +++ /dev/null @@ -1,35243 +0,0 @@ -{ - "contractName": "Bridge", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "status", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "usedRange", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "votes", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "dbTransfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "tokenContract", - "outputs": [ - { - "name": "", - "type": "address" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "epoch", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "votesCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "nextEpoch", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "", - "type": "bytes32" - } - ], - "name": "dbTransferCount", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "name": "threshold", - "type": "uint256" - }, - { - "name": "validators", - "type": "address[]" - }, - { - "name": "_tokenContract", - "type": "address" - }, - { - "name": "limits", - "type": "uint256[2]" - }, - { - "name": "rangeSize", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "name": "nonce", - "type": "uint256" - } - ], - "name": "ExchangeRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "oldEpoch", - "type": "uint256" - }, - { - "indexed": true, - "name": "newEpoch", - "type": "uint256" - } - ], - "name": "NewEpoch", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "epoch", - "type": "uint256" - } - ], - "name": "NewEpochCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "oldEpoch", - "type": "uint256" - }, - { - "indexed": true, - "name": "newEpoch", - "type": "uint256" - } - ], - "name": "NewFundsTransfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "name": "x", - "type": "uint256" - }, - { - "indexed": false, - "name": "y", - "type": "uint256" - } - ], - "name": "EpochStart", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "value", - "type": "uint256" - } - ], - "name": "exchange", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "hash", - "type": "bytes32" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "x", - "type": "uint256" - }, - { - "name": "y", - "type": "uint256" - } - ], - "name": "confirmKeygen", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "confirmFundsTransfer", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getNextParties", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getParties", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_epoch", - "type": "uint256" - } - ], - "name": "getParties", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getNextThreshold", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getThreshold", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_epoch", - "type": "uint256" - } - ], - "name": "getThreshold", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getStartBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_epoch", - "type": "uint256" - } - ], - "name": "getStartBlock", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getNextRangeSize", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_epoch", - "type": "uint256" - } - ], - "name": "getRangeSize", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getRangeSize", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_epoch", - "type": "uint256" - } - ], - "name": "getNonce", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getNonce", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getX", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getY", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getPartyId", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "a", - "type": "address" - } - ], - "name": "getNextPartyId", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getValidators", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "getNextValidators", - "outputs": [ - { - "name": "", - "type": "address[]" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "startVoting", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "validator", - "type": "address" - } - ], - "name": "voteAddValidator", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "validator", - "type": "address" - } - ], - "name": "voteRemoveValidator", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "threshold", - "type": "uint256" - } - ], - "name": "voteChangeThreshold", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "rangeSize", - "type": "uint256" - } - ], - "name": "voteChangeRangeSize", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "voteStartKeygen", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "voteCancelKeygen", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.5.9+commit.e560f70d\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"getStartBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNextParties\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getY\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"a\",\"type\":\"address\"}],\"name\":\"getNextPartyId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"startVoting\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"rangeSize\",\"type\":\"uint256\"}],\"name\":\"voteChangeRangeSize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"usedRange\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getRangeSize\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"votes\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getPartyId\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"voteCancelKeygen\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"getNonce\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"hash\",\"type\":\"bytes32\"},{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNextValidators\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"getParties\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"getThreshold\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dbTransfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getX\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"exchange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"voteAddValidator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNextThreshold\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"voteStartKeygen\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"validator\",\"type\":\"address\"}],\"name\":\"voteRemoveValidator\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getStartBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"x\",\"type\":\"uint256\"},{\"name\":\"y\",\"type\":\"uint256\"}],\"name\":\"confirmKeygen\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getParties\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"votesCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"nextEpoch\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getValidators\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNextRangeSize\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_epoch\",\"type\":\"uint256\"}],\"name\":\"getRangeSize\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"threshold\",\"type\":\"uint256\"}],\"name\":\"voteChangeThreshold\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNonce\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"dbTransferCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"confirmFundsTransfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"threshold\",\"type\":\"uint256\"},{\"name\":\"validators\",\"type\":\"address[]\"},{\"name\":\"_tokenContract\",\"type\":\"address\"},{\"name\":\"limits\",\"type\":\"uint256[2]\"},{\"name\":\"rangeSize\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"nonce\",\"type\":\"uint256\"}],\"name\":\"ExchangeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"oldEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"newEpoch\",\"type\":\"uint256\"}],\"name\":\"NewEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"epoch\",\"type\":\"uint256\"}],\"name\":\"NewEpochCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"oldEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"newEpoch\",\"type\":\"uint256\"}],\"name\":\"NewFundsTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"epoch\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"x\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"y\",\"type\":\"uint256\"}],\"name\":\"EpochStart\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/build/contracts/Bridge.sol\":\"Bridge\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":3},\"remappings\":[]},\"sources\":{\"/build/contracts/Bridge.sol\":{\"keccak256\":\"0xedcf62b24f2b47b0e83af55ca6471e82e301f8287aa78e7c41bbca2d3ddc4155\",\"urls\":[\"bzzr://84b325be5714e21d85966ce976f9996d2f7d2305b467c191d37f6e91bb1901fb\",\"dweb:/ipfs/QmY1RVRv3H9E9T2VwmSdyKxAfQFMd7t9yYjcVFVpox9Lf8\"]},\"/build/contracts/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x90e8c2521653bbb1768b05889c5760031e688d9cd361f167489b89215e201b95\",\"urls\":[\"bzzr://aa8b45b57edafc3d67bc5d916327ea16807fae33f753ca163ae0c4061b789766\",\"dweb:/ipfs/QmP5NaEwZthQeM2ESz4WTT3osrP7jhbvu7ocbttBi2JAw6\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001f4838038062001f48833981810160405260c08110156200003757600080fd5b8151602083018051919392830192916401000000008111156200005957600080fd5b820160208101848111156200006d57600080fd5b81518560208202830111640100000000821117156200008b57600080fd5b505060208201516080830151825192955090935060409092019190620000b057600080fd5b83518510620000be57600080fd5b600b80546001600160a01b0385166001600160a01b0319909116179055600060078190556006805460ff19166002179055600160088190556040805160e08101825287815260208082018a905291810185905260608101849052600019608082015260a0810184905260c081018490529183529182528051805191927fada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7d926200016b9284920190620001f9565b506020820151600182015560408201516002820155606082015160038201556080820151600482015560a0820151600582015560c09091015160069091015581600060200201516009558160016020020151600a556040516001906000907f3ef85928df9ae51bdb3eb4c00ec73b92b82307f319ac1b029de14796a0972609908290a350505050506200028d565b82805482825590600052602060002090810192821562000251579160200282015b828111156200025157825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200021a565b506200025f92915062000263565b5090565b6200028a91905b808211156200025f5780546001600160a01b03191681556001016200026a565b90565b611cab806200029d6000396000f3fe608060405234801561001057600080fd5b50600436106101cd5760003560e01c806301b2320e146101d2578063073ce82d146102015780630b7f166514610209578063197d6ca4146102115780631ec6b60a14610237578063200d2ed2146102415780632493b9fc1461026d5780632a2acafa1461028a5780632a4b93af146102bb5780632b38cd96146102c35780632fb0fc6f146102e057806339f0ebb1146102e85780633d46b819146102f05780633feb1bd81461030d57806340cddab31461033f578063447fe289146103975780634615d5e9146103b457806349f92f63146103d15780635197c7aa146103ee57806353556559146103f657806355a373d61461041357806357456f22146104375780638199d3fd1461045d578063900cf0cf14610465578063915eb0e71461046d5780639bf6a74a14610475578063a5f18c011461049b578063a7699d02146104a3578063a8311aa8146104c6578063aae46bab146104ce578063aea0e78b146104eb578063b7ab4db5146104f3578063c2668caf146104fb578063c3e3a45c14610503578063cc8ee06514610520578063d087d2881461053d578063d09fc00414610545578063df78523014610562578063e75235b81461056a575b600080fd5b6101ef600480360360208110156101e857600080fd5b5035610572565b60408051918252519081900360200190f35b6101ef61058a565b6101ef61059d565b6101ef6004803603602081101561022757600080fd5b50356001600160a01b03166105b5565b61023f610620565b005b610249610778565b6040518082600381111561025957fe5b60ff16815260200191505060405180910390f35b61023f6004803603602081101561028357600080fd5b5035610781565b6102a7600480360360208110156102a057600080fd5b5035610846565b604080519115158252519081900360200190f35b6101ef61085b565b6102a7600480360360208110156102d957600080fd5b5035610868565b6101ef61087d565b61023f6108e7565b6101ef6004803603602081101561030657600080fd5b50356109d3565b61023f6004803603606081101561032357600080fd5b508035906001600160a01b0360208201351690604001356109e8565b610347610b48565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561038357818101518382015260200161036b565b505050509050019250505060405180910390f35b6101ef600480360360208110156103ad57600080fd5b5035610bb3565b6101ef600480360360208110156103ca57600080fd5b5035610bc5565b6102a7600480360360208110156103e757600080fd5b5035610bda565b6101ef610bef565b61023f6004803603602081101561040c57600080fd5b5035610c07565b61041b610e1c565b604080516001600160a01b039092168252519081900360200190f35b61023f6004803603602081101561044d57600080fd5b50356001600160a01b0316610e2b565b6101ef610f63565b6101ef610f70565b61023f610f76565b61023f6004803603602081101561048b57600080fd5b50356001600160a01b031661105d565b6101ef611164565b61023f600480360360408110156104b957600080fd5b5080359060200135611171565b6101ef611304565b6101ef600480360360208110156104e457600080fd5b5035611311565b6101ef611323565b610347611329565b6101ef611392565b6101ef6004803603602081101561051957600080fd5b503561139b565b61023f6004803603602081101561053657600080fd5b50356113b0565b6101ef611471565b6101ef6004803603602081101561055b57600080fd5b503561147e565b61023f611490565b6101ef6115fc565b6000818152602081905260409020600301545b919050565b6000610597600854610bb3565b90505b90565b60075460009081526020819052604090206006015490565b600060606105c1610b48565b905060005b6105ce61058a565b81101561061657836001600160a01b03168282815181106105eb57fe5b60200260200101516001600160a01b0316141561060e5760010191506105859050565b6001016105c6565b5060009392505050565b600060065460ff16600381111561063357fe5b148061064f5750600160065460ff16600381111561064d57fe5b145b61069f576040805162461bcd60e51b815260206004820152601c60248201527b4e6f7420696e207265616479206f7220766f74696e6720737461746560201b604482015290519081900360640190fd5b6106a761087d565b6106e6576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b6106f06002611609565b15610776576008805460019081019091556006805460ff191690911790556107166115fc565b600854600090815260208190526040902060010155610733611329565b60085460009081526020818152604090912082516107579391929190910190611b27565b5061076061085b565b6008546000908152602081905260409020600201555b565b60065460ff1681565b600160065460ff16600381111561079457fe5b146107d4576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b6107dc61087d565b61081b576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b610826600682611660565b156108435760085460009081526020819052604090206002018190555b50565b60056020526000908152604090205460ff1681565b600061059760075461139b565b60046020526000908152604090205460ff1681565b60006060610889611329565b905060005b610896611304565b8110156108de57336001600160a01b03168282815181106108b357fe5b60200260200101516001600160a01b031614156108d657600101915061059a9050565b60010161088e565b50600091505090565b600260065460ff1660038111156108fa57fe5b14610942576040805162461bcd60e51b81526020600482015260136024820152724e6f7420696e206b657967656e20737461746560681b604482015290519081900360640190fd5b61094a61087d565b610989576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b6109936008611609565b15610776576006805460ff191660011790556008546040517fddbb65cfe1ae4aec03cef0f9667c6d7ba3740927d0c60f4dd4d7104cc31d180a90600090a2565b60009081526020819052604090206004015490565b600060065460ff1660038111156109fb57fe5b1480610a175750600160065460ff166003811115610a1557fe5b145b610a67576040805162461bcd60e51b815260206004820152601c60248201527b4e6f7420696e207265616479206f7220766f74696e6720737461746560201b604482015290519081900360640190fd5b610a6f61087d565b610aae576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b610abb60098484846116c0565b15610b4357600b546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610b1657600080fd5b505af1158015610b2a573d6000803e3d6000fd5b505050506040513d6020811015610b4057600080fd5b50505b505050565b60085460009081526020818152604091829020805483518184028101840190945280845260609392830182828015610ba957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8b575b5050505050905090565b60009081526020819052604090205490565b60009081526020819052604090206001015490565b60026020526000908152604090205460ff1681565b60075460009081526020819052604090206005015490565b600060065460ff166003811115610c1a57fe5b14610c61576040805162461bcd60e51b81526020600482015260126024820152714e6f7420696e20726561647920737461746560701b604482015290519081900360640190fd5b6009548110158015610c7857506402540be4008110155b8015610c865750600a548111155b610c8f57600080fd5b6000610c9961085b565b610ca1611164565b430381610caa57fe5b60075460408051939092046020808501829052848401929092528251808503840181526060909401835283519382019390932060009081526005909152205490915060ff16610d4f57600780546040805160208082018690528183019390935281518082038301815260609091018252805190830120600090815260058352818120805460ff1916600190811790915593548152918290529020600401805490910190555b600b54604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610da957600080fd5b505af1158015610dbd573d6000803e3d6000fd5b505050506040513d6020811015610dd357600080fd5b507f9273b6f22cee1ef3d7cdc2a9c031936003526bae368886259511f7dd40044b02905082610e00611471565b6040805192835260208301919091528051918290030190a15050565b600b546001600160a01b031681565b600160065460ff166003811115610e3e57fe5b14610e7e576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b610e8661087d565b610ec5576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b610ece816105b5565b15610f16576040805162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9030903b30b634b230ba37b960691b604482015290519081900360640190fd5b610f2160038261173d565b15610843576008546000908152602081815260408220805460018101825590835291200180546001600160a01b0383166001600160a01b031990911617905550565b6000610597600854610bc5565b60075481565b600160065460ff166003811115610f8957fe5b14610fc9576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b610fd161087d565b611010576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b61101a6007611609565b15610776576006805460ff191660021790556008546007546040517f3ef85928df9ae51bdb3eb4c00ec73b92b82307f319ac1b029de14796a097260990600090a3565b600160065460ff16600381111561107057fe5b146110b0576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b6110b861087d565b6110f7576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b611100816105b5565b61114b576040805162461bcd60e51b815260206004820152601760248201527620b63932b0b23c903737ba1030903b30b634b230ba37b960491b604482015290519081900360640190fd5b61115660048261173d565b1561084357610843816117aa565b6000610597600754610572565b600260065460ff16600381111561118457fe5b146111cc576040805162461bcd60e51b81526020600482015260136024820152724e6f7420696e206b657967656e20737461746560681b604482015290519081900360640190fd5b6111d5336105b5565b61121d576040805162461bcd60e51b81526020600482015260146024820152732737ba1030903732bc3a103b30b634b230ba37b960611b604482015290519081900360640190fd5b611229600083836118e4565b15611300576008805460009081526020819052604080822060050185905582548252902060060182905554600114156112c3576006805460ff191690556008805460009081526020818152604080832043600390910155835483529182902060001960049091015591546007819055815185815292830184905281519092600080516020611bef83398151915292908290030190a2611300565b6006805460ff191660031790556008546007546040517ff4735b85cc98f9a712832825ecab4cfb1649d658f9a73c57a00ea7dde735c79b90600090a35b5050565b6000610597600754610bb3565b60036020526000908152604090205481565b60085481565b60075460009081526020818152604091829020805483518184028101840190945280845260609392830182828015610ba9576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610b8b575050505050905090565b60006105976008545b60009081526020819052604090206002015490565b600160065460ff1660038111156113c357fe5b14611403576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b61140b61087d565b61144a576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b611455600582611660565b1561084357600854600090815260208190526040902060010155565b60006105976007546109d3565b60016020526000908152604090205481565b600360065460ff1660038111156114a357fe5b146114f3576040805162461bcd60e51b815260206004820152601b60248201527a4e6f7420696e2066756e6473207472616e7366657220737461746560281b604482015290519081900360640190fd5b6114fb61087d565b61153a576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b60006007541161157b5760405162461bcd60e51b8152600401808060200182810382526028815260200180611c2f6028913960400191505060405180910390fd5b611585600161194d565b15610776576006805460ff191690556008805460009081526020819052604080822043600390910155825482529020600019600490910155546007819055600080516020611bef8339815191526115da610bef565b6115e261059d565b6040805192835260208301919091528051918290030190a2565b6000610597600754610bc5565b600080826008546040516020018083600981111561162357fe5b60ff1660f81b8152600101828152602001925050506040516020818303038152906040528051906020012090506116598161199d565b9392505050565b60008083600854846040516020018084600981111561167b57fe5b60ff1660f81b815260010183815260200182815260200193505050506040516020818303038152906040528051906020012090506116b88161199d565b949350505050565b60008085858585604051602001808560098111156116da57fe5b60ff1660f81b8152600101848152602001836001600160a01b03166001600160a01b031660601b81526014018281526020019450505050506040516020818303038152906040528051906020012090506117338161199d565b9695505050505050565b60008083600854846040516020018084600981111561175857fe5b60ff1660f81b8152600101838152602001826001600160a01b03166001600160a01b031660601b815260140193505050506040516020818303038152906040528051906020012090506116b88161199d565b60005b60016117b761058a565b0381101561188557600854600090815260208190526040902080546001600160a01b0384169190839081106117e857fe5b6000918252602090912001546001600160a01b0316141561187d5761180b610b48565b600161181561058a565b038151811061182057fe5b60200260200101516000806008548152602001908152602001600020600001828154811061184a57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550611885565b6001016117ad565b50600854600090815260208190526040902060016118a161058a565b03815481106118ac57fe5b6000918252602080832090910180546001600160a01b0319169055600854825281905260409020805490611300906000198301611b8c565b6000808460085485856040516020018085600981111561190057fe5b60ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120905061194481611a70565b95945050505050565b600080826008546040516020018083600981111561196757fe5b60ff1660f81b81526001018281526020019250505060405160208183030381529060405280519060200120905061165981611a70565b6000806119a983611af8565b60008181526004602052604090205490915060ff1615611a00576040805162461bcd60e51b815260206004820152600d60248201526c566f74656420616c726561647960981b604482015290519081900360640190fd5b6000818152600460205260409020805460ff19166001179055611a216115fc565b6000848152600360205260409020541415611a545750506000818152600360205260409020600160ff1b90556001610585565b5050600081815260036020526040812080546001019055610585565b600080611a7c83611af8565b60008181526004602052604090205490915060ff1615611ad7576040805162461bcd60e51b8152602060048201526011602482015270436f6e6669726d656420616c726561647960781b604482015290519081900360640190fd5b6000818152600460205260409020805460ff19166001179055611a21610f63565b604080516020808201939093523360601b81830152815180820360340181526054909101909152805191012090565b828054828255906000526020600020908101928215611b7c579160200282015b82811115611b7c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611b47565b50611b88929150611bb0565b5090565b815481835581811115610b4357600083815260209020610b43918101908301611bd4565b61059a91905b80821115611b885780546001600160a01b0319168155600101611bb6565b61059a91905b80821115611b885760008155600101611bda56fec33272939f066c227e913a4b3434d860794f185c551685c29451a3a38b9b259c4e6f7420696e20766f74696e672073746174650000000000000000000000000046697273742065706f636820646f6573206e6f74206e6565642066756e6473207472616e736665724e6f7420612063757272656e742076616c696461746f72000000000000000000a265627a7a72305820dfb70a1c283919f9128aabe00d30be35942e7ded3ecf2eb30af4168b8b02e15a64736f6c63430005090032", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101cd5760003560e01c806301b2320e146101d2578063073ce82d146102015780630b7f166514610209578063197d6ca4146102115780631ec6b60a14610237578063200d2ed2146102415780632493b9fc1461026d5780632a2acafa1461028a5780632a4b93af146102bb5780632b38cd96146102c35780632fb0fc6f146102e057806339f0ebb1146102e85780633d46b819146102f05780633feb1bd81461030d57806340cddab31461033f578063447fe289146103975780634615d5e9146103b457806349f92f63146103d15780635197c7aa146103ee57806353556559146103f657806355a373d61461041357806357456f22146104375780638199d3fd1461045d578063900cf0cf14610465578063915eb0e71461046d5780639bf6a74a14610475578063a5f18c011461049b578063a7699d02146104a3578063a8311aa8146104c6578063aae46bab146104ce578063aea0e78b146104eb578063b7ab4db5146104f3578063c2668caf146104fb578063c3e3a45c14610503578063cc8ee06514610520578063d087d2881461053d578063d09fc00414610545578063df78523014610562578063e75235b81461056a575b600080fd5b6101ef600480360360208110156101e857600080fd5b5035610572565b60408051918252519081900360200190f35b6101ef61058a565b6101ef61059d565b6101ef6004803603602081101561022757600080fd5b50356001600160a01b03166105b5565b61023f610620565b005b610249610778565b6040518082600381111561025957fe5b60ff16815260200191505060405180910390f35b61023f6004803603602081101561028357600080fd5b5035610781565b6102a7600480360360208110156102a057600080fd5b5035610846565b604080519115158252519081900360200190f35b6101ef61085b565b6102a7600480360360208110156102d957600080fd5b5035610868565b6101ef61087d565b61023f6108e7565b6101ef6004803603602081101561030657600080fd5b50356109d3565b61023f6004803603606081101561032357600080fd5b508035906001600160a01b0360208201351690604001356109e8565b610347610b48565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561038357818101518382015260200161036b565b505050509050019250505060405180910390f35b6101ef600480360360208110156103ad57600080fd5b5035610bb3565b6101ef600480360360208110156103ca57600080fd5b5035610bc5565b6102a7600480360360208110156103e757600080fd5b5035610bda565b6101ef610bef565b61023f6004803603602081101561040c57600080fd5b5035610c07565b61041b610e1c565b604080516001600160a01b039092168252519081900360200190f35b61023f6004803603602081101561044d57600080fd5b50356001600160a01b0316610e2b565b6101ef610f63565b6101ef610f70565b61023f610f76565b61023f6004803603602081101561048b57600080fd5b50356001600160a01b031661105d565b6101ef611164565b61023f600480360360408110156104b957600080fd5b5080359060200135611171565b6101ef611304565b6101ef600480360360208110156104e457600080fd5b5035611311565b6101ef611323565b610347611329565b6101ef611392565b6101ef6004803603602081101561051957600080fd5b503561139b565b61023f6004803603602081101561053657600080fd5b50356113b0565b6101ef611471565b6101ef6004803603602081101561055b57600080fd5b503561147e565b61023f611490565b6101ef6115fc565b6000818152602081905260409020600301545b919050565b6000610597600854610bb3565b90505b90565b60075460009081526020819052604090206006015490565b600060606105c1610b48565b905060005b6105ce61058a565b81101561061657836001600160a01b03168282815181106105eb57fe5b60200260200101516001600160a01b0316141561060e5760010191506105859050565b6001016105c6565b5060009392505050565b600060065460ff16600381111561063357fe5b148061064f5750600160065460ff16600381111561064d57fe5b145b61069f576040805162461bcd60e51b815260206004820152601c60248201527b4e6f7420696e207265616479206f7220766f74696e6720737461746560201b604482015290519081900360640190fd5b6106a761087d565b6106e6576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b6106f06002611609565b15610776576008805460019081019091556006805460ff191690911790556107166115fc565b600854600090815260208190526040902060010155610733611329565b60085460009081526020818152604090912082516107579391929190910190611b27565b5061076061085b565b6008546000908152602081905260409020600201555b565b60065460ff1681565b600160065460ff16600381111561079457fe5b146107d4576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b6107dc61087d565b61081b576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b610826600682611660565b156108435760085460009081526020819052604090206002018190555b50565b60056020526000908152604090205460ff1681565b600061059760075461139b565b60046020526000908152604090205460ff1681565b60006060610889611329565b905060005b610896611304565b8110156108de57336001600160a01b03168282815181106108b357fe5b60200260200101516001600160a01b031614156108d657600101915061059a9050565b60010161088e565b50600091505090565b600260065460ff1660038111156108fa57fe5b14610942576040805162461bcd60e51b81526020600482015260136024820152724e6f7420696e206b657967656e20737461746560681b604482015290519081900360640190fd5b61094a61087d565b610989576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b6109936008611609565b15610776576006805460ff191660011790556008546040517fddbb65cfe1ae4aec03cef0f9667c6d7ba3740927d0c60f4dd4d7104cc31d180a90600090a2565b60009081526020819052604090206004015490565b600060065460ff1660038111156109fb57fe5b1480610a175750600160065460ff166003811115610a1557fe5b145b610a67576040805162461bcd60e51b815260206004820152601c60248201527b4e6f7420696e207265616479206f7220766f74696e6720737461746560201b604482015290519081900360640190fd5b610a6f61087d565b610aae576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b610abb60098484846116c0565b15610b4357600b546040805163a9059cbb60e01b81526001600160a01b038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b158015610b1657600080fd5b505af1158015610b2a573d6000803e3d6000fd5b505050506040513d6020811015610b4057600080fd5b50505b505050565b60085460009081526020818152604091829020805483518184028101840190945280845260609392830182828015610ba957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8b575b5050505050905090565b60009081526020819052604090205490565b60009081526020819052604090206001015490565b60026020526000908152604090205460ff1681565b60075460009081526020819052604090206005015490565b600060065460ff166003811115610c1a57fe5b14610c61576040805162461bcd60e51b81526020600482015260126024820152714e6f7420696e20726561647920737461746560701b604482015290519081900360640190fd5b6009548110158015610c7857506402540be4008110155b8015610c865750600a548111155b610c8f57600080fd5b6000610c9961085b565b610ca1611164565b430381610caa57fe5b60075460408051939092046020808501829052848401929092528251808503840181526060909401835283519382019390932060009081526005909152205490915060ff16610d4f57600780546040805160208082018690528183019390935281518082038301815260609091018252805190830120600090815260058352818120805460ff1916600190811790915593548152918290529020600401805490910190555b600b54604080516323b872dd60e01b81523360048201523060248201526044810185905290516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b158015610da957600080fd5b505af1158015610dbd573d6000803e3d6000fd5b505050506040513d6020811015610dd357600080fd5b507f9273b6f22cee1ef3d7cdc2a9c031936003526bae368886259511f7dd40044b02905082610e00611471565b6040805192835260208301919091528051918290030190a15050565b600b546001600160a01b031681565b600160065460ff166003811115610e3e57fe5b14610e7e576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b610e8661087d565b610ec5576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b610ece816105b5565b15610f16576040805162461bcd60e51b815260206004820152601360248201527220b63932b0b23c9030903b30b634b230ba37b960691b604482015290519081900360640190fd5b610f2160038261173d565b15610843576008546000908152602081815260408220805460018101825590835291200180546001600160a01b0383166001600160a01b031990911617905550565b6000610597600854610bc5565b60075481565b600160065460ff166003811115610f8957fe5b14610fc9576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b610fd161087d565b611010576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b61101a6007611609565b15610776576006805460ff191660021790556008546007546040517f3ef85928df9ae51bdb3eb4c00ec73b92b82307f319ac1b029de14796a097260990600090a3565b600160065460ff16600381111561107057fe5b146110b0576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b6110b861087d565b6110f7576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b611100816105b5565b61114b576040805162461bcd60e51b815260206004820152601760248201527620b63932b0b23c903737ba1030903b30b634b230ba37b960491b604482015290519081900360640190fd5b61115660048261173d565b1561084357610843816117aa565b6000610597600754610572565b600260065460ff16600381111561118457fe5b146111cc576040805162461bcd60e51b81526020600482015260136024820152724e6f7420696e206b657967656e20737461746560681b604482015290519081900360640190fd5b6111d5336105b5565b61121d576040805162461bcd60e51b81526020600482015260146024820152732737ba1030903732bc3a103b30b634b230ba37b960611b604482015290519081900360640190fd5b611229600083836118e4565b15611300576008805460009081526020819052604080822060050185905582548252902060060182905554600114156112c3576006805460ff191690556008805460009081526020818152604080832043600390910155835483529182902060001960049091015591546007819055815185815292830184905281519092600080516020611bef83398151915292908290030190a2611300565b6006805460ff191660031790556008546007546040517ff4735b85cc98f9a712832825ecab4cfb1649d658f9a73c57a00ea7dde735c79b90600090a35b5050565b6000610597600754610bb3565b60036020526000908152604090205481565b60085481565b60075460009081526020818152604091829020805483518184028101840190945280845260609392830182828015610ba9576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610b8b575050505050905090565b60006105976008545b60009081526020819052604090206002015490565b600160065460ff1660038111156113c357fe5b14611403576040805162461bcd60e51b81526020600482015260136024820152600080516020611c0f833981519152604482015290519081900360640190fd5b61140b61087d565b61144a576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b611455600582611660565b1561084357600854600090815260208190526040902060010155565b60006105976007546109d3565b60016020526000908152604090205481565b600360065460ff1660038111156114a357fe5b146114f3576040805162461bcd60e51b815260206004820152601b60248201527a4e6f7420696e2066756e6473207472616e7366657220737461746560281b604482015290519081900360640190fd5b6114fb61087d565b61153a576040805162461bcd60e51b81526020600482015260176024820152600080516020611c57833981519152604482015290519081900360640190fd5b60006007541161157b5760405162461bcd60e51b8152600401808060200182810382526028815260200180611c2f6028913960400191505060405180910390fd5b611585600161194d565b15610776576006805460ff191690556008805460009081526020819052604080822043600390910155825482529020600019600490910155546007819055600080516020611bef8339815191526115da610bef565b6115e261059d565b6040805192835260208301919091528051918290030190a2565b6000610597600754610bc5565b600080826008546040516020018083600981111561162357fe5b60ff1660f81b8152600101828152602001925050506040516020818303038152906040528051906020012090506116598161199d565b9392505050565b60008083600854846040516020018084600981111561167b57fe5b60ff1660f81b815260010183815260200182815260200193505050506040516020818303038152906040528051906020012090506116b88161199d565b949350505050565b60008085858585604051602001808560098111156116da57fe5b60ff1660f81b8152600101848152602001836001600160a01b03166001600160a01b031660601b81526014018281526020019450505050506040516020818303038152906040528051906020012090506117338161199d565b9695505050505050565b60008083600854846040516020018084600981111561175857fe5b60ff1660f81b8152600101838152602001826001600160a01b03166001600160a01b031660601b815260140193505050506040516020818303038152906040528051906020012090506116b88161199d565b60005b60016117b761058a565b0381101561188557600854600090815260208190526040902080546001600160a01b0384169190839081106117e857fe5b6000918252602090912001546001600160a01b0316141561187d5761180b610b48565b600161181561058a565b038151811061182057fe5b60200260200101516000806008548152602001908152602001600020600001828154811061184a57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550611885565b6001016117ad565b50600854600090815260208190526040902060016118a161058a565b03815481106118ac57fe5b6000918252602080832090910180546001600160a01b0319169055600854825281905260409020805490611300906000198301611b8c565b6000808460085485856040516020018085600981111561190057fe5b60ff1660f81b815260010184815260200183815260200182815260200194505050505060405160208183030381529060405280519060200120905061194481611a70565b95945050505050565b600080826008546040516020018083600981111561196757fe5b60ff1660f81b81526001018281526020019250505060405160208183030381529060405280519060200120905061165981611a70565b6000806119a983611af8565b60008181526004602052604090205490915060ff1615611a00576040805162461bcd60e51b815260206004820152600d60248201526c566f74656420616c726561647960981b604482015290519081900360640190fd5b6000818152600460205260409020805460ff19166001179055611a216115fc565b6000848152600360205260409020541415611a545750506000818152600360205260409020600160ff1b90556001610585565b5050600081815260036020526040812080546001019055610585565b600080611a7c83611af8565b60008181526004602052604090205490915060ff1615611ad7576040805162461bcd60e51b8152602060048201526011602482015270436f6e6669726d656420616c726561647960781b604482015290519081900360640190fd5b6000818152600460205260409020805460ff19166001179055611a21610f63565b604080516020808201939093523360601b81830152815180820360340181526054909101909152805191012090565b828054828255906000526020600020908101928215611b7c579160200282015b82811115611b7c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611b47565b50611b88929150611bb0565b5090565b815481835581811115610b4357600083815260209020610b43918101908301611bd4565b61059a91905b80821115611b885780546001600160a01b0319168155600101611bb6565b61059a91905b80821115611b885760008155600101611bda56fec33272939f066c227e913a4b3434d860794f185c551685c29451a3a38b9b259c4e6f7420696e20766f74696e672073746174650000000000000000000000000046697273742065706f636820646f6573206e6f74206e6565642066756e6473207472616e736665724e6f7420612063757272656e742076616c696461746f72000000000000000000a265627a7a72305820dfb70a1c283919f9128aabe00d30be35942e7ded3ecf2eb30af4168b8b02e15a64736f6c63430005090032", - "sourceMap": "93:11259:0:-;;;1516:530;8:9:-1;5:2;;;30:1;27;20:12;5:2;1516:530:0;;;;;;;;;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;1516:530:0;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;219:3;213:10;331:9;325:2;311:12;307:21;289:16;285:44;282:59;261:11;247:12;244:29;233:116;230:2;;;362:1;359;352:12;230:2;-1:-1;;1516:530:0;;;;;;;;1661:17;;1516:530;;-1:-1:-1;1516:530:0;;-1:-1:-1;1516:530:0;;;;;;1653:30;;;;;;1713:10;:17;1701:9;:29;1693:38;;;;;;1742:13;:38;;-1:-1:-1;;;;;1742:38:0;;-1:-1:-1;;;;;;1742:38:0;;;;;;-1:-1:-1;1791:5:0;:9;;;1810:6;:22;;-1:-1:-1;;1810:22:0;1819:13;1810:22;;;-1:-1:-1;1842:9:0;:13;;;1886:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1886:58:0;;;;;;;;;;;;;;;;1866:17;;;;;;:78;;;;1886:58;;1866:17;;:78;;:17;;:78;;;:::i;:::-;-1:-1:-1;1866:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1968:6;-1:-1:-1;1968:9:0;;;;1955:10;:22;2000:6;2007:1;2000:9;;;;1987:10;:22;2025:14;;2037:1;;2034;;2025:14;;2034:1;;2025:14;1516:530;;;;;93:11259;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;93:11259:0;-1:-1:-1;;;;;93:11259:0;;;;;;;;;;;-1:-1:-1;93:11259:0;;;;;;;-1:-1:-1;93:11259:0;;;-1:-1:-1;93:11259:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;93:11259:0;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "93:11259:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;93:11259:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5418:112;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5418:112:0;;:::i;:::-;;;;;;;;;;;;;;;;4766:98;;;:::i;6148:82::-;;;:::i;6506:276::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6506:276:0;-1:-1:-1;;;;;6506:276:0;;:::i;7032:357::-;;;:::i;:::-;;1395:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8607:204;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8607:204:0;;:::i;1347:41::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1347:41:0;;:::i;:::-;;;;;;;;;;;;;;;;;;5536:94;;;:::i;1304:37::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1304:37:0;;:::i;6236:264::-;;;:::i;9022:203::-;;;:::i;5952:102::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5952:102:0;;:::i;3310:213::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3310:213:0;;;-1:-1:-1;;;;;3310:213:0;;;;;;;;;;:::i;6906:120::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;6906:120:0;;;;;;;;;;;;;;;;;4870:116;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4870:116:0;;:::i;5200:110::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5200:110:0;;:::i;1208:42::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1208:42:0;;:::i;6060:82::-;;;:::i;2786:518::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2786:518:0;;:::i;2052:27::-;;;:::i;:::-;;;;-1:-1:-1;;;;;2052:27:0;;;;;;;;;;;;;;7395:278;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7395:278:0;-1:-1:-1;;;;;7395:278:0;;:::i;5092:102::-;;;:::i;1422:17::-;;;:::i;8817:199::-;;;:::i;7679:271::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;7679:271:0;-1:-1:-1;;;;;7679:271:0;;:::i;5316:96::-;;;:::i;3529:691::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3529:691:0;;;;;;;:::i;4670:90::-;;;:::i;1256:42::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1256:42:0;;:::i;1445:21::-;;;:::i;6788:112::-;;;:::i;5636:102::-;;;:::i;5744:110::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5744:110:0;;:::i;8398:203::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8398:203:0;;:::i;5860:86::-;;;:::i;1155:47::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1155:47:0;;:::i;4226:438::-;;;:::i;4992:94::-;;;:::i;5418:112::-;5475:4;5498:14;;;;;;;;;;:25;;;5418:112;;;;:::o;4766:98::-;4813:4;4836:21;4847:9;;4836:10;:21::i;:::-;4829:28;;4766:98;;:::o;6148:82::-;6215:5;;6185:4;6208:13;;;;;;;;;;:15;;;6148:82;:::o;6506:276::-;6562:4;6578:27;6608:19;:17;:19::i;:::-;6578:49;-1:-1:-1;6642:6:0;6637:121;6658:16;:14;:16::i;:::-;6654:1;:20;6637:121;;;6716:1;-1:-1:-1;;;;;6699:18:0;:10;6710:1;6699:13;;;;;;;;;;;;;;-1:-1:-1;;;;;6699:18:0;;6695:52;;;6746:1;6742:5;;-1:-1:-1;6735:12:0;;-1:-1:-1;6735:12:0;6695:52;6676:3;;6637:121;;;-1:-1:-1;6774:1:0;;6506:276;-1:-1:-1;;;6506:276:0:o;7032:357::-;2239:12;2229:6;;;;:22;;;;;;;;;:49;;;-1:-1:-1;2265:13:0;2255:6;;;;:23;;;;;;;;;2229:49;2221:90;;;;;-1:-1:-1;;;2221:90:0;;;;;;;;;;;;-1:-1:-1;;;2221:90:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;7107:26;7115:17;7107:7;:26::i;:::-;7103:280;;;7149:9;:11;;;;;;;;;7174:6;:22;;-1:-1:-1;;7174:22:0;;;;;;7240:14;:12;:14::i;:::-;7217:9;;7210:6;:17;;;;;;;;;;:27;;:44;7299:15;:13;:15::i;:::-;7275:9;;7268:6;:17;;;;;;;;;;;:46;;;;:17;;:46;;;;;;:::i;:::-;;7358:14;:12;:14::i;:::-;7335:9;;7328:6;:17;;;;;;;;;;:27;;:44;7103:280;7032:357::o;1395:20::-;;;;;;:::o;8607:204::-;2379:13;2369:6;;;;:23;;;;;;;;;2361:55;;;;;-1:-1:-1;;;2361:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2361:55:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;8697:42;8705:22;8729:9;8697:7;:42::i;:::-;8693:112;;;8762:9;;8755:6;:17;;;;;;;;;;:27;;:39;;;8693:112;8607:204;:::o;1347:41::-;;;;;;;;;;;;;;;:::o;5536:94::-;5581:4;5604:19;5617:5;;5604:12;:19::i;1304:37::-;;;;;;;;;;;;;;;:::o;6236:264::-;6279:4;6295:27;6325:15;:13;:15::i;:::-;6295:45;-1:-1:-1;6355:6:0;6350:126;6371:12;:10;:12::i;:::-;6367:1;:16;6350:126;;;6425:10;-1:-1:-1;;;;;6408:27:0;:10;6419:1;6408:13;;;;;;;;;;;;;;-1:-1:-1;;;;;6408:27:0;;6404:61;;;6464:1;6460:5;;-1:-1:-1;6453:12:0;;-1:-1:-1;6453:12:0;6404:61;6385:3;;6350:126;;;;6492:1;6485:8;;;6236:264;:::o;9022:203::-;2484:13;2474:6;;;;:23;;;;;;;;;2466:55;;;;;-1:-1:-1;;;2466:55:0;;;;;;;;;;;;-1:-1:-1;;;2466:55:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;9095:27;9103:18;9095:7;:27::i;:::-;9091:128;;;9138:6;:22;;-1:-1:-1;;9138:22:0;9147:13;9138:22;;;9198:9;;9180:28;;;;-1:-1:-1;;9180:28:0;9022:203::o;5952:102::-;6004:4;6027:14;;;;;;;;;;:20;;;;5952:102::o;3310:213::-;2239:12;2229:6;;;;:22;;;;;;;;;:49;;;-1:-1:-1;2265:13:0;2255:6;;;;:23;;;;;;;;;2229:49;2221:90;;;;;-1:-1:-1;;;2221:90:0;;;;;;;;;;;;-1:-1:-1;;;2221:90:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;3418:39;3426:13;3441:4;3447:2;3451:5;3418:7;:39::i;:::-;3414:103;;;3473:13;;:33;;;-1:-1:-1;;;3473:33:0;;-1:-1:-1;;;;;3473:33:0;;;;;;;;;;;;;;;:13;;;;;:22;;:33;;;;;;;;;;;;;;:13;;:33;;;5:2:-1;;;;30:1;27;20:12;5:2;3473:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3473:33:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;3414:103:0;3310:213;;;:::o;6906:120::-;6998:9;;6991:6;:17;;;;;;;;;;;;6984:35;;;;;;;;;;;;;;;;;6956:16;;6984:35;;;6991:17;6984:35;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6984:35:0;;;;;;;;;;;;;;;;;;;;;;;6906:120;:::o;4870:116::-;4924:4;4947:14;;;;;;;;;;:32;;4870:116::o;5200:110::-;5256:4;5279:14;;;;;;;;;;:24;;;;5200:110::o;1208:42::-;;;;;;;;;;;;;;;:::o;6060:82::-;6127:5;;6097:4;6120:13;;;;;;;;;;:15;;;6060:82;:::o;2786:518::-;2129:12;2119:6;;;;:22;;;;;;;;;2111:53;;;;;-1:-1:-1;;;2111:53:0;;;;;;;;;;;;-1:-1:-1;;;2111:53:0;;;;;;;;;;;;;;;2856:10;;2847:5;:19;;:40;;;;;2879:8;2870:5;:17;;2847:40;:63;;;;;2900:10;;2891:5;:19;;2847:63;2839:72;;;;;;2922:12;2972:14;:12;:14::i;:::-;2953:15;:13;:15::i;:::-;2938:12;:30;2937:49;;;;;3047:5;;3021:32;;;2937:49;;;;3021:32;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;3021:32:0;;;;;;3011:43;;;;;;;;;3001:54;;;;:9;:54;;;;;2937:49;;-1:-1:-1;3001:54:0;;2996:182;;3117:5;;;3091:32;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;3091:32:0;;;;;;3081:43;;;;;;3071:54;;;;:9;:54;;;;;:61;;-1:-1:-1;;3071:61:0;3128:4;3071:61;;;;;;3153:5;;3146:13;;;;;;;;:19;;:21;;;;;;;2996:182;3188:13;;:60;;;-1:-1:-1;;;3188:60:0;;3215:10;3188:60;;;;3235:4;3188:60;;;;;;;;;;;;-1:-1:-1;;;;;3188:13:0;;;;:26;;:60;;;;;;;;;;;;;;;:13;;:60;;;5:2:-1;;;;30:1;27;20:12;5:2;3188:60:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3188:60:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3263:34:0;;-1:-1:-1;3279:5:0;3286:10;:8;:10::i;:::-;3263:34;;;;;;;;;;;;;;;;;;;;;;2174:1;2786:518;:::o;2052:27::-;;;-1:-1:-1;;;;;2052:27:0;;:::o;7395:278::-;2379:13;2369:6;;;;:23;;;;;;;;;2361:55;;;;;-1:-1:-1;;;2361:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2361:55:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;7489:25;7504:9;7489:14;:25::i;:::-;:30;7481:62;;;;;-1:-1:-1;;;7481:62:0;;;;;;;;;;;;-1:-1:-1;;;7481:62:0;;;;;;;;;;;;;;;7558:38;7566:18;7586:9;7558:7;:38::i;:::-;7554:113;;;7619:9;;7612:6;:17;;;;;;;;;;27:10:-1;;39:1;23:18;;45:23;;7612:44:0;;;;;;;;-1:-1:-1;;;;;7612:44:0;;-1:-1:-1;;;;;;7612:44:0;;;;;;7395:278;:::o;5092:102::-;5141:4;5164:23;5177:9;;5164:12;:23::i;1422:17::-;;;;:::o;8817:199::-;2379:13;2369:6;;;;:23;;;;;;;;;2361:55;;;;;-1:-1:-1;;;2361:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2361:55:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;8889:26;8897:17;8889:7;:26::i;:::-;8885:125;;;8931:6;:22;;-1:-1:-1;;8931:22:0;8940:13;8931:22;;;8989:9;;8982:5;;8973:26;;;;-1:-1:-1;;8973:26:0;8817:199::o;7679:271::-;2379:13;2369:6;;;;:23;;;;;;;;;2361:55;;;;;-1:-1:-1;;;2361:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2361:55:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;7776:25;7791:9;7776:14;:25::i;:::-;7768:66;;;;;-1:-1:-1;;;7768:66:0;;;;;;;;;;;;-1:-1:-1;;;7768:66:0;;;;;;;;;;;;;;;7849:41;7857:21;7880:9;7849:7;:41::i;:::-;7845:99;;;7906:27;7923:9;7906:16;:27::i;5316:96::-;5362:4;5385:20;5399:5;;5385:13;:20::i;3529:691::-;2484:13;2474:6;;;;:23;;;;;;;;;2466:55;;;;;-1:-1:-1;;;2466:55:0;;;;;;;;;;;;-1:-1:-1;;;2466:55:0;;;;;;;;;;;;;;;3600:26;3615:10;3600:14;:26::i;:::-;3592:64;;;;;-1:-1:-1;;;3592:64:0;;;;;;;;;;;;-1:-1:-1;;;3592:64:0;;;;;;;;;;;;;;;3671:37;3682:19;3703:1;3706;3671:10;:37::i;:::-;3667:547;;;3731:9;;;3724:6;:17;;;;;;;;;;;:19;;:23;;;3768:9;;3761:17;;;;:19;;:23;;;3802:9;3815:1;3802:14;3798:406;;;3836:6;:21;;-1:-1:-1;;3836:21:0;;;3882:9;;;3845:12;3875:17;;;;;;;;;;;3906:12;3875:28;;;;:43;3943:9;;3936:17;;;;;;-1:-1:-1;;3936:23:0;;;;:34;3996:9;;3988:5;:17;;;4028:23;;;;;;;;;;;;;3996:9;;-1:-1:-1;;;;;;;;;;;4028:23:0;;;;;;;;3798:406;;;4102:6;:30;;-1:-1:-1;;4102:30:0;4111:21;4102:30;;;4179:9;;4172:5;;4155:34;;;;-1:-1:-1;;4155:34:0;3798:406;3529:691;;:::o;4670:90::-;4713:4;4736:17;4747:5;;4736:10;:17::i;1256:42::-;;;;;;;;;;;;;:::o;1445:21::-;;;;:::o;6788:112::-;6876:5;;6869:6;:13;;;;;;;;;;;;6862:31;;;;;;;;;;;;;;;;;6834:16;;6862:31;;;6869:13;6862:31;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6862:31:0;;;;;;;;;;;;;;;;;;;;;;6788:112;:::o;5636:102::-;5685:4;5708:23;5721:9;;5744:110;5800:4;5823:14;;;;;;;;;;:24;;;;5744:110::o;8398:203::-;2379:13;2369:6;;;;:23;;;;;;;;;2361:55;;;;;-1:-1:-1;;;2361:55:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2361:55:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;8488:41;8496:21;8519:9;8488:7;:41::i;:::-;8484:111;;;8552:9;;8545:6;:17;;;;;;;;;;:27;;:39;8398:203::o;5860:86::-;5901:4;5924:15;5933:5;;5924:8;:15::i;1155:47::-;;;;;;;;;;;;;:::o;4226:438::-;2596:21;2586:6;;;;:31;;;;;;;;;2578:71;;;;;-1:-1:-1;;;2578:71:0;;;;;;;;;;;;-1:-1:-1;;;2578:71:0;;;;;;;;;;;;;;;2717:12;:10;:12::i;:::-;2709:53;;;;;-1:-1:-1;;;2709:53:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;2709:53:0;;;;;;;;;;;;;;;4322:1;4314:5;;:9;4306:62;;;;-1:-1:-1;;;4306:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4383:39;4394:27;4383:10;:39::i;:::-;4379:279;;;4438:6;:21;;-1:-1:-1;;4438:21:0;;;4480:9;;;4447:12;4473:17;;;;;;;;;;;4504:12;4473:28;;;;:43;4537:9;;4530:17;;;;-1:-1:-1;;4530:23:0;;;;:34;4586:9;4578:5;:17;;;-1:-1:-1;;;;;;;;;;;4632:6:0;:4;:6::i;:::-;4640;:4;:6::i;:::-;4614:33;;;;;;;;;;;;;;;;;;;;;;4226:438::o;4992:94::-;5037:4;5060:19;5073:5;;5060:12;:19::i;9231:165::-;9280:4;9296:12;9338:8;9348:9;;9321:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;9321:37:0;;;9311:48;;;;;;9296:63;;9376:13;9384:4;9376:7;:13::i;:::-;9369:20;9231:165;-1:-1:-1;;;9231:165:0:o;9593:180::-;9652:4;9668:12;9710:8;9720:9;;9731:3;9693:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;9693:42:0;;;9683:53;;;;;;9668:68;;9753:13;9761:4;9753:7;:13::i;:::-;9746:20;9593:180;-1:-1:-1;;;;9593:180:0:o;9779:209::-;9866:4;9882:12;9924:8;9934:4;9940:2;9944:5;9907:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9907:43:0;-1:-1:-1;;;;;9907:43:0;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;9907:43:0;;;9897:54;;;;;;9882:69;;9968:13;9976:4;9968:7;:13::i;:::-;9961:20;9779:209;-1:-1:-1;;;;;;9779:209:0:o;9402:185::-;9465:4;9481:12;9523:8;9533:9;;9544:4;9506:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9506:43:0;-1:-1:-1;;;;;9506:43:0;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;9506:43:0;;;9496:54;;;;;;9481:69;;9567:13;9575:4;9567:7;:13::i;7956:436::-;8024:6;8019:253;8059:1;8040:16;:14;:16::i;:::-;:20;8036:1;:24;8019:253;;;8092:9;;8085:6;:17;;;;;;;;;;:31;;-1:-1:-1;;;;;8085:44:0;;;:17;8114:1;;8085:31;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8085:31:0;:44;8081:181;;;8183:19;:17;:19::i;:::-;8222:1;8203:16;:14;:16::i;:::-;:20;8183:41;;;;;;;;;;;;;;8149:6;:17;8156:9;;8149:17;;;;;;;;;;;:28;;8178:1;8149:31;;;;;;;;;;;;;;;;:75;;;;;-1:-1:-1;;;;;8149:75:0;;;;;-1:-1:-1;;;;;8149:75:0;;;;;;8242:5;;8081:181;8062:3;;8019:253;;;-1:-1:-1;8295:9:0;;8288:6;:17;;;;;;;;;;8336:1;8317:16;:14;:16::i;:::-;:20;8288:50;;;;;;;;;;;;;;;;;;;8281:57;;-1:-1:-1;;;;;;8281:57:0;;;8355:9;;8348:17;;;;;;;;:37;;;;;-1:-1:-1;;8348:37:0;;;:::i;10171:193::-;10239:4;10255:12;10297:8;10307:9;;10318:1;10321;10280:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;10280:43:0;;;10270:54;;;;;;10255:69;;10341:16;10352:4;10341:10;:16::i;:::-;10334:23;10171:193;-1:-1:-1;;;;;10171:193:0:o;9994:171::-;10046:4;10062:12;10104:8;10114:9;;10087:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;10087:37:0;;;10077:48;;;;;;10062:63;;10142:16;10153:4;10142:10;:16::i;10370:409::-;10418:4;10434:20;10457:21;10473:4;10457:15;:21::i;:::-;10497:19;;;;:5;:19;;;;;;10434:44;;-1:-1:-1;10497:19:0;;10496:20;10488:46;;;;;-1:-1:-1;;;10488:46:0;;;;;;;;;;;;-1:-1:-1;;;10488:46:0;;;;;;;;;;;;;;;10545:19;;;;:5;:19;;;;;:26;;-1:-1:-1;;10545:26:0;10567:4;10545:26;;;10605:14;:12;:14::i;:::-;10585:16;;;;:10;:16;;;;;;:34;10581:192;;;-1:-1:-1;;10635:16:0;;;;:10;:16;;;;;-1:-1:-1;;;10635:27:0;;10683:4;10676:11;;10581:192;-1:-1:-1;;10718:16:0;;;;:10;:16;;;;;:18;;;;;;10750:12;;10785:420;10836:4;10852:20;10875:21;10891:4;10875:15;:21::i;:::-;10915:19;;;;:5;:19;;;;;;10852:44;;-1:-1:-1;10915:19:0;;10914:20;10906:50;;;;;-1:-1:-1;;;10906:50:0;;;;;;;;;;;;-1:-1:-1;;;10906:50:0;;;;;;;;;;;;;;;10967:19;;;;:5;:19;;;;;:26;;-1:-1:-1;;10967:26:0;10989:4;10967:26;;;11027:18;:16;:18::i;11211:139::-;11308:34;;;;;;;;;;;11331:10;11308:34;;;;;;;;26:21:-1;;;22:32;;6:49;;11308:34:0;;;;;;;11298:45;;;;;;11211:139::o;93:11259::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;93:11259:0;-1:-1:-1;;;;;93:11259:0;;;;;;;;;;;-1:-1:-1;93:11259:0;;;;;;;-1:-1:-1;93:11259:0;;;-1:-1:-1;93:11259:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;;;;;93:11259:0;;;;;;;;;;;;;;;;;;;;;;;;", - "source": "pragma solidity ^0.5.0;\n\nimport './openzeppelin-solidity/contracts/token/ERC20/IERC20.sol';\n\ncontract Bridge {\n event ExchangeRequest(uint value, uint nonce);\n event NewEpoch(uint indexed oldEpoch, uint indexed newEpoch);\n event NewEpochCancelled(uint indexed epoch);\n event NewFundsTransfer(uint indexed oldEpoch, uint indexed newEpoch);\n event EpochStart(uint indexed epoch, uint x, uint y);\n\n struct State {\n address[] validators;\n uint threshold;\n uint rangeSize;\n uint startBlock;\n uint nonce;\n uint x;\n uint y;\n }\n\n enum Status {\n READY, // bridge is in ready to perform operations\n VOTING, // voting for changing in next epoch, but still ready\n KEYGEN, //keygen, can be cancelled\n FUNDS_TRANSFER // funds transfer, cannot be cancelled\n }\n\n enum Vote {\n CONFIRM_KEYGEN,\n CONFIRM_FUNDS_TRANSFER,\n START_VOTING,\n ADD_VALIDATOR,\n REMOVE_VALIDATOR,\n CHANGE_THRESHOLD,\n CHANGE_RANGE_SIZE,\n START_KEYGEN,\n CANCEL_KEYGEN,\n TRANSFER\n }\n\n mapping(uint => State) states;\n\n mapping(bytes32 => uint) public dbTransferCount;\n mapping(bytes32 => bool) public dbTransfer;\n mapping(bytes32 => uint) public votesCount;\n mapping(bytes32 => bool) public votes;\n mapping(bytes32 => bool) public usedRange;\n\n Status public status;\n\n uint public epoch;\n uint public nextEpoch;\n\n uint minTxLimit;\n uint maxTxLimit;\n\n constructor(uint threshold, address[] memory validators, address _tokenContract, uint[2] memory limits, uint rangeSize) public {\n require(validators.length > 0);\n require(threshold < validators.length);\n\n tokenContract = IERC20(_tokenContract);\n\n epoch = 0;\n status = Status.KEYGEN;\n nextEpoch = 1;\n\n states[nextEpoch] = State(validators, threshold, rangeSize, 0, uint(-1), 0, 0);\n\n minTxLimit = limits[0];\n maxTxLimit = limits[1];\n\n emit NewEpoch(0, 1);\n }\n\n IERC20 public tokenContract;\n\n modifier ready {\n require(status == Status.READY, \"Not in ready state\");\n _;\n }\n\n modifier readyOrVoting {\n require(status == Status.READY || status == Status.VOTING, \"Not in ready or voting state\");\n _;\n }\n\n modifier voting {\n require(status == Status.VOTING, \"Not in voting state\");\n _;\n }\n\n modifier keygen {\n require(status == Status.KEYGEN, \"Not in keygen state\");\n _;\n }\n\n modifier fundsTransfer {\n require(status == Status.FUNDS_TRANSFER, \"Not in funds transfer state\");\n _;\n }\n\n modifier currentValidator {\n require(getPartyId() != 0, \"Not a current validator\");\n _;\n }\n\n function exchange(uint value) public ready {\n require(value >= minTxLimit && value >= 10 ** 10 && value <= maxTxLimit);\n\n uint txRange = (block.number - getStartBlock()) / getRangeSize();\n if (!usedRange[keccak256(abi.encodePacked(txRange, epoch))]) {\n usedRange[keccak256(abi.encodePacked(txRange, epoch))] = true;\n states[epoch].nonce++;\n }\n\n tokenContract.transferFrom(msg.sender, address(this), value);\n emit ExchangeRequest(value, getNonce());\n }\n\n function transfer(bytes32 hash, address to, uint value) public readyOrVoting currentValidator {\n if (tryVote(Vote.TRANSFER, hash, to, value)) {\n tokenContract.transfer(to, value);\n }\n }\n\n function confirmKeygen(uint x, uint y) public keygen {\n require(getNextPartyId(msg.sender) != 0, \"Not a next validator\");\n\n if (tryConfirm(Vote.CONFIRM_KEYGEN, x, y)) {\n states[nextEpoch].x = x;\n states[nextEpoch].y = y;\n if (nextEpoch == 1) {\n status = Status.READY;\n states[nextEpoch].startBlock = block.number;\n states[nextEpoch].nonce = uint(-1);\n epoch = nextEpoch;\n emit EpochStart(epoch, x, y);\n }\n else {\n status = Status.FUNDS_TRANSFER;\n emit NewFundsTransfer(epoch, nextEpoch);\n }\n }\n }\n\n function confirmFundsTransfer() public fundsTransfer currentValidator {\n require(epoch > 0, \"First epoch does not need funds transfer\");\n\n if (tryConfirm(Vote.CONFIRM_FUNDS_TRANSFER)) {\n status = Status.READY;\n states[nextEpoch].startBlock = block.number;\n states[nextEpoch].nonce = uint(-1);\n epoch = nextEpoch;\n emit EpochStart(epoch, getX(), getY());\n }\n }\n\n function getParties() view public returns (uint) {\n return getParties(epoch);\n }\n\n function getNextParties() view public returns (uint) {\n return getParties(nextEpoch);\n }\n\n function getParties(uint _epoch) view public returns (uint) {\n return states[_epoch].validators.length;\n }\n\n function getThreshold() view public returns (uint) {\n return getThreshold(epoch);\n }\n\n function getNextThreshold() view public returns (uint) {\n return getThreshold(nextEpoch);\n }\n\n function getThreshold(uint _epoch) view public returns (uint) {\n return states[_epoch].threshold;\n }\n\n function getStartBlock() view public returns (uint) {\n return getStartBlock(epoch);\n }\n\n function getStartBlock(uint _epoch) view public returns (uint) {\n return states[_epoch].startBlock;\n }\n\n function getRangeSize() view public returns (uint) {\n return getRangeSize(epoch);\n }\n\n function getNextRangeSize() view public returns (uint) {\n return getRangeSize(nextEpoch);\n }\n\n function getRangeSize(uint _epoch) view public returns (uint) {\n return states[_epoch].rangeSize;\n }\n\n function getNonce() view public returns (uint) {\n return getNonce(epoch);\n }\n\n function getNonce(uint _epoch) view public returns (uint) {\n return states[_epoch].nonce;\n }\n\n function getX() view public returns (uint) {\n return states[epoch].x;\n }\n\n function getY() view public returns (uint) {\n return states[epoch].y;\n }\n\n function getPartyId() view public returns (uint) {\n address[] memory validators = getValidators();\n for (uint i = 0; i < getParties(); i++) {\n if (validators[i] == msg.sender)\n return i + 1;\n }\n return 0;\n }\n\n function getNextPartyId(address a) view public returns (uint) {\n address[] memory validators = getNextValidators();\n for (uint i = 0; i < getNextParties(); i++) {\n if (validators[i] == a)\n return i + 1;\n }\n return 0;\n }\n\n function getValidators() view public returns (address[] memory) {\n return states[epoch].validators;\n }\n\n function getNextValidators() view public returns (address[] memory) {\n return states[nextEpoch].validators;\n }\n\n function startVoting() public readyOrVoting currentValidator {\n if (tryVote(Vote.START_VOTING)) {\n nextEpoch++;\n status = Status.VOTING;\n states[nextEpoch].threshold = getThreshold();\n states[nextEpoch].validators = getValidators();\n states[nextEpoch].rangeSize = getRangeSize();\n }\n }\n\n function voteAddValidator(address validator) public voting currentValidator {\n require(getNextPartyId(validator) == 0, \"Already a validator\");\n\n if (tryVote(Vote.ADD_VALIDATOR, validator)) {\n states[nextEpoch].validators.push(validator);\n }\n }\n\n function voteRemoveValidator(address validator) public voting currentValidator {\n require(getNextPartyId(validator) != 0, \"Already not a validator\");\n\n if (tryVote(Vote.REMOVE_VALIDATOR, validator)) {\n _removeValidator(validator);\n }\n }\n\n function _removeValidator(address validator) private {\n for (uint i = 0; i < getNextParties() - 1; i++) {\n if (states[nextEpoch].validators[i] == validator) {\n states[nextEpoch].validators[i] = getNextValidators()[getNextParties() - 1];\n break;\n }\n }\n delete states[nextEpoch].validators[getNextParties() - 1];\n states[nextEpoch].validators.length--;\n }\n\n function voteChangeThreshold(uint threshold) public voting currentValidator {\n if (tryVote(Vote.CHANGE_THRESHOLD, threshold)) {\n states[nextEpoch].threshold = threshold;\n }\n }\n\n function voteChangeRangeSize(uint rangeSize) public voting currentValidator {\n if (tryVote(Vote.CHANGE_RANGE_SIZE, rangeSize)) {\n states[nextEpoch].rangeSize = rangeSize;\n }\n }\n\n function voteStartKeygen() public voting currentValidator {\n if (tryVote(Vote.START_KEYGEN)) {\n status = Status.KEYGEN;\n\n emit NewEpoch(epoch, nextEpoch);\n }\n }\n\n function voteCancelKeygen() public keygen currentValidator {\n if (tryVote(Vote.CANCEL_KEYGEN)) {\n status = Status.VOTING;\n\n emit NewEpochCancelled(nextEpoch);\n }\n }\n\n function tryVote(Vote voteType) private returns (bool) {\n bytes32 vote = keccak256(abi.encodePacked(voteType, nextEpoch));\n return putVote(vote);\n }\n\n function tryVote(Vote voteType, address addr) private returns (bool) {\n bytes32 vote = keccak256(abi.encodePacked(voteType, nextEpoch, addr));\n return putVote(vote);\n }\n\n function tryVote(Vote voteType, uint num) private returns (bool) {\n bytes32 vote = keccak256(abi.encodePacked(voteType, nextEpoch, num));\n return putVote(vote);\n }\n\n function tryVote(Vote voteType, bytes32 hash, address to, uint value) private returns (bool) {\n bytes32 vote = keccak256(abi.encodePacked(voteType, hash, to, value));\n return putVote(vote);\n }\n\n function tryConfirm(Vote voteType) private returns (bool) {\n bytes32 vote = keccak256(abi.encodePacked(voteType, nextEpoch));\n return putConfirm(vote);\n }\n\n function tryConfirm(Vote voteType, uint x, uint y) private returns (bool) {\n bytes32 vote = keccak256(abi.encodePacked(voteType, nextEpoch, x, y));\n return putConfirm(vote);\n }\n\n function putVote(bytes32 vote) private returns (bool) {\n bytes32 personalVote = personalizeVote(vote);\n require(!votes[personalVote], \"Voted already\");\n\n votes[personalVote] = true;\n if (votesCount[vote] == getThreshold()) {\n votesCount[vote] = 2 ** 255;\n return true;\n } else {\n votesCount[vote]++;\n return false;\n }\n }\n\n function putConfirm(bytes32 vote) private returns (bool) {\n bytes32 personalVote = personalizeVote(vote);\n require(!votes[personalVote], \"Confirmed already\");\n\n votes[personalVote] = true;\n if (votesCount[vote] == getNextThreshold()) {\n votesCount[vote] = 2 ** 255;\n return true;\n } else {\n votesCount[vote]++;\n return false;\n }\n }\n\n function personalizeVote(bytes32 vote) private view returns (bytes32) {\n return keccak256(abi.encodePacked(vote, msg.sender));\n }\n}\n", - "sourcePath": "/build/contracts/Bridge.sol", - "ast": { - "absolutePath": "/build/contracts/Bridge.sol", - "exportedSymbols": { - "Bridge": [ - 1340 - ] - }, - "id": 1341, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "absolutePath": "/build/contracts/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "file": "./openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 1341, - "sourceUnit": 10033, - "src": "25:66:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1340, - "linearizedBaseContracts": [ - 1340 - ], - "name": "Bridge", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 8, - "name": "ExchangeRequest", - "nodeType": "EventDefinition", - "parameters": { - "id": 7, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "137:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "137:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "indexed": false, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "149:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "149:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "136:24:0" - }, - "src": "115:46:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 14, - "name": "NewEpoch", - "nodeType": "EventDefinition", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10, - "indexed": true, - "name": "oldEpoch", - "nodeType": "VariableDeclaration", - "scope": 14, - "src": "181:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "181:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12, - "indexed": true, - "name": "newEpoch", - "nodeType": "VariableDeclaration", - "scope": 14, - "src": "204:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "180:46:0" - }, - "src": "166:61:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 18, - "name": "NewEpochCancelled", - "nodeType": "EventDefinition", - "parameters": { - "id": 17, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16, - "indexed": true, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "256:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "255:20:0" - }, - "src": "232:44:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 24, - "name": "NewFundsTransfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 20, - "indexed": true, - "name": "oldEpoch", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "304:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "304:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "indexed": true, - "name": "newEpoch", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "327:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 21, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "327:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "303:46:0" - }, - "src": "281:69:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 32, - "name": "EpochStart", - "nodeType": "EventDefinition", - "parameters": { - "id": 31, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 26, - "indexed": true, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "372:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 25, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "372:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 28, - "indexed": false, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "392:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 27, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "392:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "indexed": false, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "400:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "400:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "371:36:0" - }, - "src": "355:53:0" - }, - { - "canonicalName": "Bridge.State", - "id": 48, - "members": [ - { - "constant": false, - "id": 35, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "437:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 33, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "437:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 34, - "length": null, - "nodeType": "ArrayTypeName", - "src": "437:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "name": "threshold", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "467:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 36, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "467:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 39, - "name": "rangeSize", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "491:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 38, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "491:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 41, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "515:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 40, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "515:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 43, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "540:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 42, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "540:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 45, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "560:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 44, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "560:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 47, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "576:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "576:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "State", - "nodeType": "StructDefinition", - "scope": 1340, - "src": "414:175:0", - "visibility": "public" - }, - { - "canonicalName": "Bridge.Status", - "id": 53, - "members": [ - { - "id": 49, - "name": "READY", - "nodeType": "EnumValue", - "src": "617:5:0" - }, - { - "id": 50, - "name": "VOTING", - "nodeType": "EnumValue", - "src": "676:6:0" - }, - { - "id": 51, - "name": "KEYGEN", - "nodeType": "EnumValue", - "src": "746:6:0" - }, - { - "id": 52, - "name": "FUNDS_TRANSFER", - "nodeType": "EnumValue", - "src": "789:14:0" - } - ], - "name": "Status", - "nodeType": "EnumDefinition", - "src": "595:253:0" - }, - { - "canonicalName": "Bridge.Vote", - "id": 64, - "members": [ - { - "id": 54, - "name": "CONFIRM_KEYGEN", - "nodeType": "EnumValue", - "src": "874:14:0" - }, - { - "id": 55, - "name": "CONFIRM_FUNDS_TRANSFER", - "nodeType": "EnumValue", - "src": "898:22:0" - }, - { - "id": 56, - "name": "START_VOTING", - "nodeType": "EnumValue", - "src": "930:12:0" - }, - { - "id": 57, - "name": "ADD_VALIDATOR", - "nodeType": "EnumValue", - "src": "952:13:0" - }, - { - "id": 58, - "name": "REMOVE_VALIDATOR", - "nodeType": "EnumValue", - "src": "975:16:0" - }, - { - "id": 59, - "name": "CHANGE_THRESHOLD", - "nodeType": "EnumValue", - "src": "1001:16:0" - }, - { - "id": 60, - "name": "CHANGE_RANGE_SIZE", - "nodeType": "EnumValue", - "src": "1027:17:0" - }, - { - "id": 61, - "name": "START_KEYGEN", - "nodeType": "EnumValue", - "src": "1054:12:0" - }, - { - "id": 62, - "name": "CANCEL_KEYGEN", - "nodeType": "EnumValue", - "src": "1076:13:0" - }, - { - "id": 63, - "name": "TRANSFER", - "nodeType": "EnumValue", - "src": "1099:8:0" - } - ], - "name": "Vote", - "nodeType": "EnumDefinition", - "src": "854:259:0" - }, - { - "constant": false, - "id": 68, - "name": "states", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1119:29:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State)" - }, - "typeName": { - "id": 67, - "keyType": { - "id": 65, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1127:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1119:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State)" - }, - "valueType": { - "contractScope": null, - "id": 66, - "name": "State", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 48, - "src": "1135:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage_ptr", - "typeString": "struct Bridge.State" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "name": "dbTransferCount", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1155:47:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "typeName": { - "id": 71, - "keyType": { - "id": 69, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1163:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1155:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "valueType": { - "id": 70, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1174:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 76, - "name": "dbTransfer", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1208:42:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 75, - "keyType": { - "id": 73, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1216:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1208:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 74, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1227:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 80, - "name": "votesCount", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1256:42:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "typeName": { - "id": 79, - "keyType": { - "id": 77, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1264:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1256:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "valueType": { - "id": 78, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1275:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 84, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1304:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 83, - "keyType": { - "id": 81, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1312:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1304:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 82, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1323:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 88, - "name": "usedRange", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1347:41:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 87, - "keyType": { - "id": 85, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1355:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1347:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 86, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1366:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 90, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1395:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "typeName": { - "contractScope": null, - "id": 89, - "name": "Status", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 53, - "src": "1395:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 92, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1422:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 91, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1422:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 94, - "name": "nextEpoch", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1445:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 93, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1445:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 96, - "name": "minTxLimit", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1473:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 95, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1473:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "name": "maxTxLimit", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1494:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 181, - "nodeType": "Block", - "src": "1643:403:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 115, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "1661:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1661:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1681:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1661:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13091, - "src": "1653:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1653:30:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 120, - "nodeType": "ExpressionStatement", - "src": "1653:30:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 122, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1701:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 123, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "1713:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1713:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1701:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13091, - "src": "1693:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1693:38:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 127, - "nodeType": "ExpressionStatement", - "src": "1693:38:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 128, - "name": "tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "1742:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 130, - "name": "_tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 105, - "src": "1765:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 129, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10032, - "src": "1758:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$10032_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1758:22:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "src": "1742:38:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "id": 133, - "nodeType": "ExpressionStatement", - "src": "1742:38:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 134, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "1791:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1791:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 137, - "nodeType": "ExpressionStatement", - "src": "1791:9:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 138, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1810:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 139, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1819:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1819:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "1810:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 142, - "nodeType": "ExpressionStatement", - "src": "1810:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 143, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "1842:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1854:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "1842:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 146, - "nodeType": "ExpressionStatement", - "src": "1842:13:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 147, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1866:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 149, - "indexExpression": { - "argumentTypes": null, - "id": 148, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "1873:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1866:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 151, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "1892:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 152, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1904:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 153, - "name": "rangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 111, - "src": "1915:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1926:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1934:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1935:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1929:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 158, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1929:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1939:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1942:1:0", - "subdenomination": null, - "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_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 150, - "name": "State", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "1886:5:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_State_$48_storage_ptr_$", - "typeString": "type(struct Bridge.State storage pointer)" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1886:58:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_memory", - "typeString": "struct Bridge.State memory" - } - }, - "src": "1866:78:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 163, - "nodeType": "ExpressionStatement", - "src": "1866:78:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 164, - "name": "minTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "1955:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 165, - "name": "limits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 109, - "src": "1968:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", - "typeString": "uint256[2] memory" - } - }, - "id": 167, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1975:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1968:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1955:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 169, - "nodeType": "ExpressionStatement", - "src": "1955:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 170, - "name": "maxTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1987:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 171, - "name": "limits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 109, - "src": "2000:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", - "typeString": "uint256[2] memory" - } - }, - "id": 173, - "indexExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2007:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2000:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1987:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 175, - "nodeType": "ExpressionStatement", - "src": "1987:22:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2034:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2037:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 176, - "name": "NewEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "2025:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2025:14:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 180, - "nodeType": "EmitStatement", - "src": "2020:19:0" - } - ] - }, - "documentation": null, - "id": 182, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 112, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 100, - "name": "threshold", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1528:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 99, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1528:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 103, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1544:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 101, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1544:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 102, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1544:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 105, - "name": "_tokenContract", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1573:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 104, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1573:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 109, - "name": "limits", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1597:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", - "typeString": "uint256[2]" - }, - "typeName": { - "baseType": { - "id": 106, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1597:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 108, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1602:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "1597:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", - "typeString": "uint256[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 111, - "name": "rangeSize", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1620:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 110, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1620:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1527:108:0" - }, - "returnParameters": { - "id": 113, - "nodeType": "ParameterList", - "parameters": [], - "src": "1643:0:0" - }, - "scope": 1340, - "src": "1516:530:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 184, - "name": "tokenContract", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "2052:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 183, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10032, - "src": "2052:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 195, - "nodeType": "Block", - "src": "2101:81:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 187, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2119:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 188, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2129:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2129:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2119:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e207265616479207374617465", - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2143:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_965c39c15b78dbcd8a954511641ca86e15fc1ae6d6c30a67536872ccde75b679", - "typeString": "literal_string \"Not in ready state\"" - }, - "value": "Not in ready state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_965c39c15b78dbcd8a954511641ca86e15fc1ae6d6c30a67536872ccde75b679", - "typeString": "literal_string \"Not in ready state\"" - } - ], - "id": 186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2111:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2111:53:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 193, - "nodeType": "ExpressionStatement", - "src": "2111:53:0" - }, - { - "id": 194, - "nodeType": "PlaceholderStatement", - "src": "2174:1:0" - } - ] - }, - "documentation": null, - "id": 196, - "name": "ready", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 185, - "nodeType": "ParameterList", - "parameters": [], - "src": "2101:0:0" - }, - "src": "2086:96:0", - "visibility": "internal" - }, - { - "body": { - "id": 212, - "nodeType": "Block", - "src": "2211:118:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 199, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2229:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 200, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2239:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2239:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2229:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 203, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2255:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 204, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2265:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2265:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2255:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2229:49:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e207265616479206f7220766f74696e67207374617465", - "id": 208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:30:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e3f7359baa731593d4e3921720b92600c22ed1d950d208e0c826ad2eddebe96", - "typeString": "literal_string \"Not in ready or voting state\"" - }, - "value": "Not in ready or voting state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e3f7359baa731593d4e3921720b92600c22ed1d950d208e0c826ad2eddebe96", - "typeString": "literal_string \"Not in ready or voting state\"" - } - ], - "id": 198, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2221:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2221:90:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 210, - "nodeType": "ExpressionStatement", - "src": "2221:90:0" - }, - { - "id": 211, - "nodeType": "PlaceholderStatement", - "src": "2321:1:0" - } - ] - }, - "documentation": null, - "id": 213, - "name": "readyOrVoting", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 197, - "nodeType": "ParameterList", - "parameters": [], - "src": "2211:0:0" - }, - "src": "2188:141:0", - "visibility": "internal" - }, - { - "body": { - "id": 224, - "nodeType": "Block", - "src": "2351:83:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 216, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2369:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 217, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2379:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2379:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2369:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e20766f74696e67207374617465", - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2394:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbee9834b110b21e0730bf5c3d2972fb9867ff221df239e7ae60883592f05d1", - "typeString": "literal_string \"Not in voting state\"" - }, - "value": "Not in voting state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbee9834b110b21e0730bf5c3d2972fb9867ff221df239e7ae60883592f05d1", - "typeString": "literal_string \"Not in voting state\"" - } - ], - "id": 215, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2361:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2361:55:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 222, - "nodeType": "ExpressionStatement", - "src": "2361:55:0" - }, - { - "id": 223, - "nodeType": "PlaceholderStatement", - "src": "2426:1:0" - } - ] - }, - "documentation": null, - "id": 225, - "name": "voting", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 214, - "nodeType": "ParameterList", - "parameters": [], - "src": "2351:0:0" - }, - "src": "2335:99:0", - "visibility": "internal" - }, - { - "body": { - "id": 236, - "nodeType": "Block", - "src": "2456:83:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 228, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2474:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 229, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2484:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2484:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2474:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e206b657967656e207374617465", - "id": 232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2499:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed0fee6382e0651a224348a21558d03a4a439c3bd5edc24945894a3417c14010", - "typeString": "literal_string \"Not in keygen state\"" - }, - "value": "Not in keygen state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ed0fee6382e0651a224348a21558d03a4a439c3bd5edc24945894a3417c14010", - "typeString": "literal_string \"Not in keygen state\"" - } - ], - "id": 227, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2466:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2466:55:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 234, - "nodeType": "ExpressionStatement", - "src": "2466:55:0" - }, - { - "id": 235, - "nodeType": "PlaceholderStatement", - "src": "2531:1:0" - } - ] - }, - "documentation": null, - "id": 237, - "name": "keygen", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 226, - "nodeType": "ParameterList", - "parameters": [], - "src": "2456:0:0" - }, - "src": "2440:99:0", - "visibility": "internal" - }, - { - "body": { - "id": 248, - "nodeType": "Block", - "src": "2568:99:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 240, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2586:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 241, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2596:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "FUNDS_TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2596:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2586:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e2066756e6473207472616e73666572207374617465", - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2619:29:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6347c9fecd6f58520ad10dfd1347ce3dc42cc0eed7a4182ca64dd11c69fc3008", - "typeString": "literal_string \"Not in funds transfer state\"" - }, - "value": "Not in funds transfer state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6347c9fecd6f58520ad10dfd1347ce3dc42cc0eed7a4182ca64dd11c69fc3008", - "typeString": "literal_string \"Not in funds transfer state\"" - } - ], - "id": 239, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2578:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2578:71:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 246, - "nodeType": "ExpressionStatement", - "src": "2578:71:0" - }, - { - "id": 247, - "nodeType": "PlaceholderStatement", - "src": "2659:1:0" - } - ] - }, - "documentation": null, - "id": 249, - "name": "fundsTransfer", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 238, - "nodeType": "ParameterList", - "parameters": [], - "src": "2568:0:0" - }, - "src": "2545:122:0", - "visibility": "internal" - }, - { - "body": { - "id": 260, - "nodeType": "Block", - "src": "2699:81:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 252, - "name": "getPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 728, - "src": "2717:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2717:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 254, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2733:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2717:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420612063757272656e742076616c696461746f72", - "id": 256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2736:25:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8dc18d5bb1361900b9758b388df331056e31071cae84b276c0f03794c4dc634a", - "typeString": "literal_string \"Not a current validator\"" - }, - "value": "Not a current validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8dc18d5bb1361900b9758b388df331056e31071cae84b276c0f03794c4dc634a", - "typeString": "literal_string \"Not a current validator\"" - } - ], - "id": 251, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2709:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2709:53:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 258, - "nodeType": "ExpressionStatement", - "src": "2709:53:0" - }, - { - "id": 259, - "nodeType": "PlaceholderStatement", - "src": "2772:1:0" - } - ] - }, - "documentation": null, - "id": 261, - "name": "currentValidator", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 250, - "nodeType": "ParameterList", - "parameters": [], - "src": "2699:0:0" - }, - "src": "2673:107:0", - "visibility": "internal" - }, - { - "body": { - "id": 343, - "nodeType": "Block", - "src": "2829:475:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 269, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "2847:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 270, - "name": "minTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "2856:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2847:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 272, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "2870:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2879:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2885:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "2879:8:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - } - }, - "src": "2870:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2847:40:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 278, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "2891:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 279, - "name": "maxTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "2900:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2891:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2847:63:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 268, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13091, - "src": "2839:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2839:72:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 283, - "nodeType": "ExpressionStatement", - "src": "2839:72:0" - }, - { - "assignments": [ - 285 - ], - "declarations": [ - { - "constant": false, - "id": 285, - "name": "txRange", - "nodeType": "VariableDeclaration", - "scope": 343, - "src": "2922:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 284, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2922:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 295, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 286, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13078, - "src": "2938:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2938:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 288, - "name": "getStartBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 598, - 611 - ], - "referencedDeclaration": 598, - "src": "2953:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2953:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2938:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 291, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2937:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 292, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 621, - "src": "2972:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2972:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2937:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2922:64:0" - }, - { - "condition": { - "argumentTypes": null, - "id": 305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "3000:55:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 296, - "name": "usedRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "3001:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 304, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 300, - "name": "txRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "3038:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 301, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3047:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 298, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "3021:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 299, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3021:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3021:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 297, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "3011:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3011:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3001:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 325, - "nodeType": "IfStatement", - "src": "2996:182:0", - "trueBody": { - "id": 324, - "nodeType": "Block", - "src": "3057:121:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 306, - "name": "usedRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "3071:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 314, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 310, - "name": "txRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "3108:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 311, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3117:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 308, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "3091:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3091:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3091:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 307, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "3081:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3081:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3071:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3128:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "3071:61:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "3071:61:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3146:21:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 318, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3146:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 320, - "indexExpression": { - "argumentTypes": null, - "id": 319, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3153:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3146:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "3146:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 323, - "nodeType": "ExpressionStatement", - "src": "3146:21:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 329, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "3215:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3215:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 332, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13104, - "src": "3235:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Bridge_$1340", - "typeString": "contract Bridge" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Bridge_$1340", - "typeString": "contract Bridge" - } - ], - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3227:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3227:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 334, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "3242:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 326, - "name": "tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "3188:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 10015, - "src": "3188:26:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3188:60:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 336, - "nodeType": "ExpressionStatement", - "src": "3188:60:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 338, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "3279:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 339, - "name": "getNonce", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 654, - 667 - ], - "referencedDeclaration": 654, - "src": "3286:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3286:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 337, - "name": "ExchangeRequest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "3263:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3263:34:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 342, - "nodeType": "EmitStatement", - "src": "3258:39:0" - } - ] - }, - "documentation": null, - "id": 344, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 266, - "modifierName": { - "argumentTypes": null, - "id": 265, - "name": "ready", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "2823:5:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2823:5:0" - } - ], - "name": "exchange", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 263, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 344, - "src": "2804:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 262, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2804:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2803:12:0" - }, - "returnParameters": { - "id": 267, - "nodeType": "ParameterList", - "parameters": [], - "src": "2829:0:0" - }, - "scope": 1340, - "src": "2786:518:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 373, - "nodeType": "Block", - "src": "3404:119:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 358, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "3426:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3426:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 360, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 346, - "src": "3441:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 361, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "3447:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 362, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "3451:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 357, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1164, - "src": "3418:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_bytes32_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,bytes32,address,uint256) returns (bool)" - } - }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3418:39:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 372, - "nodeType": "IfStatement", - "src": "3414:103:0", - "trueBody": { - "id": 371, - "nodeType": "Block", - "src": "3459:58:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 367, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "3496:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 368, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "3500:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 364, - "name": "tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "3473:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9986, - "src": "3473:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3473:33:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 370, - "nodeType": "ExpressionStatement", - "src": "3473:33:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 374, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 353, - "modifierName": { - "argumentTypes": null, - "id": 352, - "name": "readyOrVoting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "3373:13:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3373:13:0" - }, - { - "arguments": null, - "id": 355, - "modifierName": { - "argumentTypes": null, - "id": 354, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "3387:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3387:16:0" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 351, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 346, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 374, - "src": "3328:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 345, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3328:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 348, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 374, - "src": "3342:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 347, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3342:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 350, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 374, - "src": "3354:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 349, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3354:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3327:38:0" - }, - "returnParameters": { - "id": 356, - "nodeType": "ParameterList", - "parameters": [], - "src": "3404:0:0" - }, - "scope": 1340, - "src": "3310:213:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 464, - "nodeType": "Block", - "src": "3582:638:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 385, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "3615:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3615:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 384, - "name": "getNextPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "3600:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3600:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3630:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3600:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f742061206e6578742076616c696461746f72", - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3633:22:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44981c92ce908443b2fa5f878c54791e1a0c95d4cc04ea4f4d9224b3ec030922", - "typeString": "literal_string \"Not a next validator\"" - }, - "value": "Not a next validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_44981c92ce908443b2fa5f878c54791e1a0c95d4cc04ea4f4d9224b3ec030922", - "typeString": "literal_string \"Not a next validator\"" - } - ], - "id": 383, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "3592:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3592:64:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 392, - "nodeType": "ExpressionStatement", - "src": "3592:64:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 394, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "3682:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CONFIRM_KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3682:19:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 396, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3703:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 397, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "3706:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 393, - "name": "tryConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1186, - 1214 - ], - "referencedDeclaration": 1214, - "src": "3671:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,uint256,uint256) returns (bool)" - } - }, - "id": 398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3671:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 463, - "nodeType": "IfStatement", - "src": "3667:547:0", - "trueBody": { - "id": 462, - "nodeType": "Block", - "src": "3710:504:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 399, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3724:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 401, - "indexExpression": { - "argumentTypes": null, - "id": 400, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3731:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3724:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "x", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "3724:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 403, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3746:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3724:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 405, - "nodeType": "ExpressionStatement", - "src": "3724:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 406, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3761:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 408, - "indexExpression": { - "argumentTypes": null, - "id": 407, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3768:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3761:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 409, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "y", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "3761:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 410, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "3783:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3761:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 412, - "nodeType": "ExpressionStatement", - "src": "3761:23:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 413, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3802:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3815:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3802:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 460, - "nodeType": "Block", - "src": "4084:120:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 450, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "4102:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 451, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "4111:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "FUNDS_TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4111:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "4102:30:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 454, - "nodeType": "ExpressionStatement", - "src": "4102:30:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 456, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4172:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 457, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4179:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 455, - "name": "NewFundsTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 24, - "src": "4155:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4155:34:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 459, - "nodeType": "EmitStatement", - "src": "4150:39:0" - } - ] - }, - "id": 461, - "nodeType": "IfStatement", - "src": "3798:406:0", - "trueBody": { - "id": 449, - "nodeType": "Block", - "src": "3818:248:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 416, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "3836:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 417, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "3845:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3845:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "3836:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 420, - "nodeType": "ExpressionStatement", - "src": "3836:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 421, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3875:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 423, - "indexExpression": { - "argumentTypes": null, - "id": 422, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3882:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3875:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 424, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 41, - "src": "3875:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 425, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13078, - "src": "3906:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3906:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3875:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 428, - "nodeType": "ExpressionStatement", - "src": "3875:43:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 429, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3936:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 431, - "indexExpression": { - "argumentTypes": null, - "id": 430, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3943:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3936:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 432, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "3936:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 435, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "3967:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3968:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3962:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3962:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3936:34:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 438, - "nodeType": "ExpressionStatement", - "src": "3936:34:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 439, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3988:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 440, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3996:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3988:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 442, - "nodeType": "ExpressionStatement", - "src": "3988:17:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 444, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4039:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 445, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "4046:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 446, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "4049:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 443, - "name": "EpochStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "4028:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4028:23:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 448, - "nodeType": "EmitStatement", - "src": "4023:28:0" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 465, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 381, - "modifierName": { - "argumentTypes": null, - "id": 380, - "name": "keygen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3575:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3575:6:0" - } - ], - "name": "confirmKeygen", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 379, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 376, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 465, - "src": "3552:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 375, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3552:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 378, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 465, - "src": "3560:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 377, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3560:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3551:16:0" - }, - "returnParameters": { - "id": 382, - "nodeType": "ParameterList", - "parameters": [], - "src": "3582:0:0" - }, - "scope": 1340, - "src": "3529:691:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 520, - "nodeType": "Block", - "src": "4296:368:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 473, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4314:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4322:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4314:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "46697273742065706f636820646f6573206e6f74206e6565642066756e6473207472616e73666572", - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4325:42:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8ddae2cc9da30ed8c59c39c6a950ef823ea484ac89ff6f37abb0317fb5f679a1", - "typeString": "literal_string \"First epoch does not need funds transfer\"" - }, - "value": "First epoch does not need funds transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8ddae2cc9da30ed8c59c39c6a950ef823ea484ac89ff6f37abb0317fb5f679a1", - "typeString": "literal_string \"First epoch does not need funds transfer\"" - } - ], - "id": 472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "4306:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4306:62:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 478, - "nodeType": "ExpressionStatement", - "src": "4306:62:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 480, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "4394:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CONFIRM_FUNDS_TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4394:27:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 479, - "name": "tryConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1186, - 1214 - ], - "referencedDeclaration": 1186, - "src": "4383:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4383:39:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 519, - "nodeType": "IfStatement", - "src": "4379:279:0", - "trueBody": { - "id": 518, - "nodeType": "Block", - "src": "4424:234:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 483, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "4438:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 484, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "4447:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4447:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "4438:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 487, - "nodeType": "ExpressionStatement", - "src": "4438:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 488, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4473:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 490, - "indexExpression": { - "argumentTypes": null, - "id": 489, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4480:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4473:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 491, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 41, - "src": "4473:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 492, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13078, - "src": "4504:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4504:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4473:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 495, - "nodeType": "ExpressionStatement", - "src": "4473:43:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 496, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4530:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 498, - "indexExpression": { - "argumentTypes": null, - "id": 497, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4537:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4530:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 499, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "4530:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "4561:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4562:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4556:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4556:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4530:34:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 505, - "nodeType": "ExpressionStatement", - "src": "4530:34:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 506, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4578:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 507, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4586:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4578:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 509, - "nodeType": "ExpressionStatement", - "src": "4578:17:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 511, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4625:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 512, - "name": "getX", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 678, - "src": "4632:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4632:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 514, - "name": "getY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "4640:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4640:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 510, - "name": "EpochStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "4614:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4614:33:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 517, - "nodeType": "EmitStatement", - "src": "4609:38:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 521, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 468, - "modifierName": { - "argumentTypes": null, - "id": 467, - "name": "fundsTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "4265:13:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4265:13:0" - }, - { - "arguments": null, - "id": 470, - "modifierName": { - "argumentTypes": null, - "id": 469, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "4279:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4279:16:0" - } - ], - "name": "confirmFundsTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 466, - "nodeType": "ParameterList", - "parameters": [], - "src": "4255:2:0" - }, - "returnParameters": { - "id": 471, - "nodeType": "ParameterList", - "parameters": [], - "src": "4296:0:0" - }, - "scope": 1340, - "src": "4226:438:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 530, - "nodeType": "Block", - "src": "4719:41:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 527, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4747:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 526, - "name": "getParties", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 531, - 555 - ], - "referencedDeclaration": 555, - "src": "4736:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4736:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 525, - "id": 529, - "nodeType": "Return", - "src": "4729:24:0" - } - ] - }, - "documentation": null, - "id": 531, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getParties", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 522, - "nodeType": "ParameterList", - "parameters": [], - "src": "4689:2:0" - }, - "returnParameters": { - "id": 525, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 524, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 531, - "src": "4713:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 523, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4713:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4712:6:0" - }, - "scope": 1340, - "src": "4670:90:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 540, - "nodeType": "Block", - "src": "4819:45:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 537, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4847:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 536, - "name": "getParties", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 531, - 555 - ], - "referencedDeclaration": 555, - "src": "4836:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4836:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 535, - "id": 539, - "nodeType": "Return", - "src": "4829:28:0" - } - ] - }, - "documentation": null, - "id": 541, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextParties", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 532, - "nodeType": "ParameterList", - "parameters": [], - "src": "4789:2:0" - }, - "returnParameters": { - "id": 535, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 534, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 541, - "src": "4813:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 533, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4813:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4812:6:0" - }, - "scope": 1340, - "src": "4766:98:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 554, - "nodeType": "Block", - "src": "4930:56:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 548, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4947:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 550, - "indexExpression": { - "argumentTypes": null, - "id": 549, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4954:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4947:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "4947:25:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 552, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4947:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 547, - "id": 553, - "nodeType": "Return", - "src": "4940:39:0" - } - ] - }, - "documentation": null, - "id": 555, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getParties", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 544, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 543, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 555, - "src": "4890:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 542, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4890:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4889:13:0" - }, - "returnParameters": { - "id": 547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 546, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 555, - "src": "4924:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 545, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4924:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4923:6:0" - }, - "scope": 1340, - "src": "4870:116:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 564, - "nodeType": "Block", - "src": "5043:43:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 561, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5073:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 560, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 588, - "src": "5060:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5060:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 559, - "id": 563, - "nodeType": "Return", - "src": "5053:26:0" - } - ] - }, - "documentation": null, - "id": 565, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 556, - "nodeType": "ParameterList", - "parameters": [], - "src": "5013:2:0" - }, - "returnParameters": { - "id": 559, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 558, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 565, - "src": "5037:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 557, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5037:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5036:6:0" - }, - "scope": 1340, - "src": "4992:94:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 574, - "nodeType": "Block", - "src": "5147:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 571, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "5177:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 570, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 588, - "src": "5164:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 569, - "id": 573, - "nodeType": "Return", - "src": "5157:30:0" - } - ] - }, - "documentation": null, - "id": 575, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 566, - "nodeType": "ParameterList", - "parameters": [], - "src": "5117:2:0" - }, - "returnParameters": { - "id": 569, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 568, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 575, - "src": "5141:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 567, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5141:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5140:6:0" - }, - "scope": 1340, - "src": "5092:102:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 587, - "nodeType": "Block", - "src": "5262:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 582, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "5279:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 584, - "indexExpression": { - "argumentTypes": null, - "id": 583, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 577, - "src": "5286:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5279:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 585, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "threshold", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "5279:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 581, - "id": 586, - "nodeType": "Return", - "src": "5272:31:0" - } - ] - }, - "documentation": null, - "id": 588, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 577, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 588, - "src": "5222:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 576, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5222:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5221:13:0" - }, - "returnParameters": { - "id": 581, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 580, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 588, - "src": "5256:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 579, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5255:6:0" - }, - "scope": 1340, - "src": "5200:110:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 597, - "nodeType": "Block", - "src": "5368:44:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 594, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5399:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 593, - "name": "getStartBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 598, - 611 - ], - "referencedDeclaration": 611, - "src": "5385:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5385:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 592, - "id": 596, - "nodeType": "Return", - "src": "5378:27:0" - } - ] - }, - "documentation": null, - "id": 598, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStartBlock", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 589, - "nodeType": "ParameterList", - "parameters": [], - "src": "5338:2:0" - }, - "returnParameters": { - "id": 592, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 591, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 598, - "src": "5362:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 590, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5362:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5361:6:0" - }, - "scope": 1340, - "src": "5316:96:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 610, - "nodeType": "Block", - "src": "5481:49:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 605, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "5498:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 607, - "indexExpression": { - "argumentTypes": null, - "id": 606, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 600, - "src": "5505:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5498:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 41, - "src": "5498:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 604, - "id": 609, - "nodeType": "Return", - "src": "5491:32:0" - } - ] - }, - "documentation": null, - "id": 611, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStartBlock", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 601, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 600, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 611, - "src": "5441:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 599, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5441:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5440:13:0" - }, - "returnParameters": { - "id": 604, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 603, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 611, - "src": "5475:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5475:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5474:6:0" - }, - "scope": 1340, - "src": "5418:112:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 620, - "nodeType": "Block", - "src": "5587:43:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 617, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5617:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 616, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 644, - "src": "5604:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5604:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 615, - "id": 619, - "nodeType": "Return", - "src": "5597:26:0" - } - ] - }, - "documentation": null, - "id": 621, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 612, - "nodeType": "ParameterList", - "parameters": [], - "src": "5557:2:0" - }, - "returnParameters": { - "id": 615, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 614, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "5581:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 613, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5581:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5580:6:0" - }, - "scope": 1340, - "src": "5536:94:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 630, - "nodeType": "Block", - "src": "5691:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 627, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "5721:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 626, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 644, - "src": "5708:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5708:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 625, - "id": 629, - "nodeType": "Return", - "src": "5701:30:0" - } - ] - }, - "documentation": null, - "id": 631, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 622, - "nodeType": "ParameterList", - "parameters": [], - "src": "5661:2:0" - }, - "returnParameters": { - "id": 625, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 624, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 631, - "src": "5685:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 623, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5685:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5684:6:0" - }, - "scope": 1340, - "src": "5636:102:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 643, - "nodeType": "Block", - "src": "5806:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 638, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "5823:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 640, - "indexExpression": { - "argumentTypes": null, - "id": 639, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 633, - "src": "5830:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5823:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 641, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "rangeSize", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "5823:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 637, - "id": 642, - "nodeType": "Return", - "src": "5816:31:0" - } - ] - }, - "documentation": null, - "id": 644, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 633, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 644, - "src": "5766:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 632, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5766:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5765:13:0" - }, - "returnParameters": { - "id": 637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 636, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 644, - "src": "5800:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 635, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5800:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5799:6:0" - }, - "scope": 1340, - "src": "5744:110:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 653, - "nodeType": "Block", - "src": "5907:39:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 650, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5933:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 649, - "name": "getNonce", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 654, - 667 - ], - "referencedDeclaration": 667, - "src": "5924:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5924:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 648, - "id": 652, - "nodeType": "Return", - "src": "5917:22:0" - } - ] - }, - "documentation": null, - "id": 654, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNonce", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 645, - "nodeType": "ParameterList", - "parameters": [], - "src": "5877:2:0" - }, - "returnParameters": { - "id": 648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 647, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 654, - "src": "5901:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 646, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5901:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5900:6:0" - }, - "scope": 1340, - "src": "5860:86:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 666, - "nodeType": "Block", - "src": "6010:44:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 661, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6027:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 663, - "indexExpression": { - "argumentTypes": null, - "id": 662, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 656, - "src": "6034:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6027:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 664, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "6027:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 660, - "id": 665, - "nodeType": "Return", - "src": "6020:27:0" - } - ] - }, - "documentation": null, - "id": 667, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNonce", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 656, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 667, - "src": "5970:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 655, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5970:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5969:13:0" - }, - "returnParameters": { - "id": 660, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 659, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 667, - "src": "6004:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 658, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6004:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6003:6:0" - }, - "scope": 1340, - "src": "5952:102:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 677, - "nodeType": "Block", - "src": "6103:39:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 672, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6120:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 674, - "indexExpression": { - "argumentTypes": null, - "id": 673, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "6127:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6120:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "x", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "6120:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 671, - "id": 676, - "nodeType": "Return", - "src": "6113:22:0" - } - ] - }, - "documentation": null, - "id": 678, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getX", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 668, - "nodeType": "ParameterList", - "parameters": [], - "src": "6073:2:0" - }, - "returnParameters": { - "id": 671, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 670, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 678, - "src": "6097:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 669, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6097:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6096:6:0" - }, - "scope": 1340, - "src": "6060:82:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 688, - "nodeType": "Block", - "src": "6191:39:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 683, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6208:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 685, - "indexExpression": { - "argumentTypes": null, - "id": 684, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "6215:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6208:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 686, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "y", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "6208:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 682, - "id": 687, - "nodeType": "Return", - "src": "6201:22:0" - } - ] - }, - "documentation": null, - "id": 689, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getY", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 679, - "nodeType": "ParameterList", - "parameters": [], - "src": "6161:2:0" - }, - "returnParameters": { - "id": 682, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 681, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "6185:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 680, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6185:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6184:6:0" - }, - "scope": 1340, - "src": "6148:82:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 727, - "nodeType": "Block", - "src": "6285:215:0", - "statements": [ - { - "assignments": [ - 697 - ], - "declarations": [ - { - "constant": false, - "id": 697, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 727, - "src": "6295:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 695, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6295:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 696, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6295:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 700, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 698, - "name": "getValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 780, - "src": "6325:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6325:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6295:45:0" - }, - { - "body": { - "id": 723, - "nodeType": "Block", - "src": "6390:86:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 712, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 697, - "src": "6408:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 714, - "indexExpression": { - "argumentTypes": null, - "id": 713, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6419:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6408:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 715, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "6425:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6425:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6408:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 722, - "nodeType": "IfStatement", - "src": "6404:61:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 718, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6460:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6464:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6460:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 693, - "id": 721, - "nodeType": "Return", - "src": "6453:12:0" - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 705, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6367:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 706, - "name": "getParties", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 531, - 555 - ], - "referencedDeclaration": 531, - "src": "6371:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6371:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6367:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 724, - "initializationExpression": { - "assignments": [ - 702 - ], - "declarations": [ - { - "constant": false, - "id": 702, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 724, - "src": "6355:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 701, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6355:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 704, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6364:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6355:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6385:3:0", - "subExpression": { - "argumentTypes": null, - "id": 709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6385:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 711, - "nodeType": "ExpressionStatement", - "src": "6385:3:0" - }, - "nodeType": "ForStatement", - "src": "6350:126:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6492:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 693, - "id": 726, - "nodeType": "Return", - "src": "6485:8:0" - } - ] - }, - "documentation": null, - "id": 728, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPartyId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 690, - "nodeType": "ParameterList", - "parameters": [], - "src": "6255:2:0" - }, - "returnParameters": { - "id": 693, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 692, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 728, - "src": "6279:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 691, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6279:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6278:6:0" - }, - "scope": 1340, - "src": "6236:264:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 767, - "nodeType": "Block", - "src": "6568:214:0", - "statements": [ - { - "assignments": [ - 738 - ], - "declarations": [ - { - "constant": false, - "id": 738, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "6578:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6578:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 737, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6578:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 741, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 739, - "name": "getNextValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "6608:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6608:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6578:49:0" - }, - { - "body": { - "id": 763, - "nodeType": "Block", - "src": "6681:77:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 753, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "6699:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 755, - "indexExpression": { - "argumentTypes": null, - "id": 754, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6710:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6699:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 756, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 730, - "src": "6716:1:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6699:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 762, - "nodeType": "IfStatement", - "src": "6695:52:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 758, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6742:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6746:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6742:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 734, - "id": 761, - "nodeType": "Return", - "src": "6735:12:0" - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 746, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6654:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 747, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "6658:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6658:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6654:20:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 764, - "initializationExpression": { - "assignments": [ - 743 - ], - "declarations": [ - { - "constant": false, - "id": 743, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 764, - "src": "6642:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 742, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6642:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 745, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 744, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6651:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6642:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6676:3:0", - "subExpression": { - "argumentTypes": null, - "id": 750, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6676:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 752, - "nodeType": "ExpressionStatement", - "src": "6676:3:0" - }, - "nodeType": "ForStatement", - "src": "6637:121:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 765, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6774:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 734, - "id": 766, - "nodeType": "Return", - "src": "6767:8:0" - } - ] - }, - "documentation": null, - "id": 768, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextPartyId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 731, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 730, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 768, - "src": "6530:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 729, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6530:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6529:11:0" - }, - "returnParameters": { - "id": 734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 733, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 768, - "src": "6562:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 732, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6562:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6561:6:0" - }, - "scope": 1340, - "src": "6506:276:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 779, - "nodeType": "Block", - "src": "6852:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 774, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6869:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 776, - "indexExpression": { - "argumentTypes": null, - "id": 775, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "6876:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6869:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "6869:24:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "functionReturnParameters": 773, - "id": 778, - "nodeType": "Return", - "src": "6862:31:0" - } - ] - }, - "documentation": null, - "id": 780, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getValidators", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 769, - "nodeType": "ParameterList", - "parameters": [], - "src": "6810:2:0" - }, - "returnParameters": { - "id": 773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 772, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 780, - "src": "6834:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 770, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6834:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 771, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6834:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6833:18:0" - }, - "scope": 1340, - "src": "6788:112:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 791, - "nodeType": "Block", - "src": "6974:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 786, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6991:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 788, - "indexExpression": { - "argumentTypes": null, - "id": 787, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "6998:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6991:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 789, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "6991:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "functionReturnParameters": 785, - "id": 790, - "nodeType": "Return", - "src": "6984:35:0" - } - ] - }, - "documentation": null, - "id": 792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextValidators", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 781, - "nodeType": "ParameterList", - "parameters": [], - "src": "6932:2:0" - }, - "returnParameters": { - "id": 785, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 784, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 792, - "src": "6956:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 782, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6956:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 783, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6956:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6955:18:0" - }, - "scope": 1340, - "src": "6906:120:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 837, - "nodeType": "Block", - "src": "7093:296:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 800, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7115:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "START_VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7115:17:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 799, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1084, - "src": "7107:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7107:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 836, - "nodeType": "IfStatement", - "src": "7103:280:0", - "trueBody": { - "id": 835, - "nodeType": "Block", - "src": "7135:248:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7149:11:0", - "subExpression": { - "argumentTypes": null, - "id": 803, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7149:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 805, - "nodeType": "ExpressionStatement", - "src": "7149:11:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 806, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "7174:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 807, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "7183:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7183:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "7174:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 810, - "nodeType": "ExpressionStatement", - "src": "7174:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 811, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7210:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 813, - "indexExpression": { - "argumentTypes": null, - "id": 812, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7217:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7210:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 814, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "threshold", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "7210:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 815, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 565, - "src": "7240:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7240:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7210:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 818, - "nodeType": "ExpressionStatement", - "src": "7210:44:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 819, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7268:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 821, - "indexExpression": { - "argumentTypes": null, - "id": 820, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7275:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7268:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 822, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "7268:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 823, - "name": "getValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 780, - "src": "7299:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7299:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "src": "7268:46:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 826, - "nodeType": "ExpressionStatement", - "src": "7268:46:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 827, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7328:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 829, - "indexExpression": { - "argumentTypes": null, - "id": 828, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7335:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7328:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 830, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "rangeSize", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "7328:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 831, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 621, - "src": "7358:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7358:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7328:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 834, - "nodeType": "ExpressionStatement", - "src": "7328:44:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 838, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 795, - "modifierName": { - "argumentTypes": null, - "id": 794, - "name": "readyOrVoting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "7062:13:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7062:13:0" - }, - { - "arguments": null, - "id": 797, - "modifierName": { - "argumentTypes": null, - "id": 796, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7076:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7076:16:0" - } - ], - "name": "startVoting", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 793, - "nodeType": "ParameterList", - "parameters": [], - "src": "7052:2:0" - }, - "returnParameters": { - "id": 798, - "nodeType": "ParameterList", - "parameters": [], - "src": "7093:0:0" - }, - "scope": 1340, - "src": "7032:357:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 871, - "nodeType": "Block", - "src": "7471:202:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 849, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "7504:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 848, - "name": "getNextPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "7489:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7489:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7518:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7489:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416c726561647920612076616c696461746f72", - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7521:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aeb0fe100da2796aa6136a3b1c66282f002b435141be331237dfa7127e6df6ff", - "typeString": "literal_string \"Already a validator\"" - }, - "value": "Already a validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aeb0fe100da2796aa6136a3b1c66282f002b435141be331237dfa7127e6df6ff", - "typeString": "literal_string \"Already a validator\"" - } - ], - "id": 847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "7481:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7481:62:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 855, - "nodeType": "ExpressionStatement", - "src": "7481:62:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 857, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7566:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ADD_VALIDATOR", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7566:18:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 859, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "7586:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 856, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1109, - "src": "7558:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_address_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,address) returns (bool)" - } - }, - "id": 860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7558:38:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 870, - "nodeType": "IfStatement", - "src": "7554:113:0", - "trueBody": { - "id": 869, - "nodeType": "Block", - "src": "7598:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 866, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "7646:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 861, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7612:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 863, - "indexExpression": { - "argumentTypes": null, - "id": 862, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7619:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7612:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 864, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "7612:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7612:33:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) returns (uint256)" - } - }, - "id": 867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7612:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 868, - "nodeType": "ExpressionStatement", - "src": "7612:44:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 872, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 843, - "modifierName": { - "argumentTypes": null, - "id": 842, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "7447:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7447:6:0" - }, - { - "arguments": null, - "id": 845, - "modifierName": { - "argumentTypes": null, - "id": 844, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7454:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7454:16:0" - } - ], - "name": "voteAddValidator", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 840, - "name": "validator", - "nodeType": "VariableDeclaration", - "scope": 872, - "src": "7421:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7421:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7420:19:0" - }, - "returnParameters": { - "id": 846, - "nodeType": "ParameterList", - "parameters": [], - "src": "7471:0:0" - }, - "scope": 1340, - "src": "7395:278:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 901, - "nodeType": "Block", - "src": "7758:192:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 883, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 874, - "src": "7791:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 882, - "name": "getNextPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "7776:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7776:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7805:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7776:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416c7265616479206e6f7420612076616c696461746f72", - "id": 887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7808:25:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2332ed568e8af3d64f1f2b0b098c504cab97ba4128fb9f08cfa3f851ced05961", - "typeString": "literal_string \"Already not a validator\"" - }, - "value": "Already not a validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2332ed568e8af3d64f1f2b0b098c504cab97ba4128fb9f08cfa3f851ced05961", - "typeString": "literal_string \"Already not a validator\"" - } - ], - "id": 881, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "7768:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7768:66:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 889, - "nodeType": "ExpressionStatement", - "src": "7768:66:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 891, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7857:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "REMOVE_VALIDATOR", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7857:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 893, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 874, - "src": "7880:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 890, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1109, - "src": "7849:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_address_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,address) returns (bool)" - } - }, - "id": 894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7849:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 900, - "nodeType": "IfStatement", - "src": "7845:99:0", - "trueBody": { - "id": 899, - "nodeType": "Block", - "src": "7892:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 896, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 874, - "src": "7923:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 895, - "name": "_removeValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 967, - "src": "7906:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7906:27:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 898, - "nodeType": "ExpressionStatement", - "src": "7906:27:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 902, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 877, - "modifierName": { - "argumentTypes": null, - "id": 876, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "7734:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7734:6:0" - }, - { - "arguments": null, - "id": 879, - "modifierName": { - "argumentTypes": null, - "id": 878, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7741:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7741:16:0" - } - ], - "name": "voteRemoveValidator", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "name": "validator", - "nodeType": "VariableDeclaration", - "scope": 902, - "src": "7708:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 873, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7708:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7707:19:0" - }, - "returnParameters": { - "id": 880, - "nodeType": "ParameterList", - "parameters": [], - "src": "7758:0:0" - }, - "scope": 1340, - "src": "7679:271:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 966, - "nodeType": "Block", - "src": "8009:383:0", - "statements": [ - { - "body": { - "id": 946, - "nodeType": "Block", - "src": "8067:205:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 920, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8085:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 922, - "indexExpression": { - "argumentTypes": null, - "id": 921, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8092:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8085:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 923, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8085:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 925, - "indexExpression": { - "argumentTypes": null, - "id": 924, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8114:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8085:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 926, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "8120:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8085:44:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 945, - "nodeType": "IfStatement", - "src": "8081:181:0", - "trueBody": { - "id": 944, - "nodeType": "Block", - "src": "8131:131:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 928, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8149:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 930, - "indexExpression": { - "argumentTypes": null, - "id": 929, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8156:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8149:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 931, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8149:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 933, - "indexExpression": { - "argumentTypes": null, - "id": 932, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8178:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8149:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 934, - "name": "getNextValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "8183:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8183:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 940, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 936, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "8203:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8203:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8222:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "8203:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8183:41:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8149:75:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 942, - "nodeType": "ExpressionStatement", - "src": "8149:75:0" - }, - { - "id": 943, - "nodeType": "Break", - "src": "8242:5:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 911, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8036:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 912, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "8040:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8040:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8059:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "8040:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8036:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 947, - "initializationExpression": { - "assignments": [ - 908 - ], - "declarations": [ - { - "constant": false, - "id": 908, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 947, - "src": "8024:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 907, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8024:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 910, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8033:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8024:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8062:3:0", - "subExpression": { - "argumentTypes": null, - "id": 917, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8062:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 919, - "nodeType": "ExpressionStatement", - "src": "8062:3:0" - }, - "nodeType": "ForStatement", - "src": "8019:253:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "8281:57:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 948, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8288:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 950, - "indexExpression": { - "argumentTypes": null, - "id": 949, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8295:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8288:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 951, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8288:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 956, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 952, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "8317:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8317:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 954, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8336:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "8317:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8288:50:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 958, - "nodeType": "ExpressionStatement", - "src": "8281:57:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "8348:37:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 959, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8348:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 961, - "indexExpression": { - "argumentTypes": null, - "id": 960, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8355:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8348:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 962, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8348:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 963, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8348:35:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 965, - "nodeType": "ExpressionStatement", - "src": "8348:37:0" - } - ] - }, - "documentation": null, - "id": 967, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_removeValidator", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 904, - "name": "validator", - "nodeType": "VariableDeclaration", - "scope": 967, - "src": "7982:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 903, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7982:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7981:19:0" - }, - "returnParameters": { - "id": 906, - "nodeType": "ParameterList", - "parameters": [], - "src": "8009:0:0" - }, - "scope": 1340, - "src": "7956:436:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 990, - "nodeType": "Block", - "src": "8474:127:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 977, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "8496:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CHANGE_THRESHOLD", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8496:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 979, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 969, - "src": "8519:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 976, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1134, - "src": "8488:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,uint256) returns (bool)" - } - }, - "id": 980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8488:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 989, - "nodeType": "IfStatement", - "src": "8484:111:0", - "trueBody": { - "id": 988, - "nodeType": "Block", - "src": "8531:64:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 981, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 983, - "indexExpression": { - "argumentTypes": null, - "id": 982, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8552:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8545:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 984, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "threshold", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "8545:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 985, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 969, - "src": "8575:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8545:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 987, - "nodeType": "ExpressionStatement", - "src": "8545:39:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 991, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 972, - "modifierName": { - "argumentTypes": null, - "id": 971, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "8450:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8450:6:0" - }, - { - "arguments": null, - "id": 974, - "modifierName": { - "argumentTypes": null, - "id": 973, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8457:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8457:16:0" - } - ], - "name": "voteChangeThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 970, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 969, - "name": "threshold", - "nodeType": "VariableDeclaration", - "scope": 991, - "src": "8427:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 968, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8427:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8426:16:0" - }, - "returnParameters": { - "id": 975, - "nodeType": "ParameterList", - "parameters": [], - "src": "8474:0:0" - }, - "scope": 1340, - "src": "8398:203:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1014, - "nodeType": "Block", - "src": "8683:128:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1001, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "8705:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 1002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CHANGE_RANGE_SIZE", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8705:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1003, - "name": "rangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "8729:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1000, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1134, - "src": "8697:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,uint256) returns (bool)" - } - }, - "id": 1004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8697:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1013, - "nodeType": "IfStatement", - "src": "8693:112:0", - "trueBody": { - "id": 1012, - "nodeType": "Block", - "src": "8741:64:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1005, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8755:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 1007, - "indexExpression": { - "argumentTypes": null, - "id": 1006, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8762:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8755:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 1008, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "rangeSize", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "8755:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1009, - "name": "rangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "8785:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8755:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1011, - "nodeType": "ExpressionStatement", - "src": "8755:39:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1015, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 996, - "modifierName": { - "argumentTypes": null, - "id": 995, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "8659:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8659:6:0" - }, - { - "arguments": null, - "id": 998, - "modifierName": { - "argumentTypes": null, - "id": 997, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8666:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8666:16:0" - } - ], - "name": "voteChangeRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 994, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 993, - "name": "rangeSize", - "nodeType": "VariableDeclaration", - "scope": 1015, - "src": "8636:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 992, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8636:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8635:16:0" - }, - "returnParameters": { - "id": 999, - "nodeType": "ParameterList", - "parameters": [], - "src": "8683:0:0" - }, - "scope": 1340, - "src": "8607:204:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1038, - "nodeType": "Block", - "src": "8875:141:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1023, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "8897:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 1024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "START_KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8897:17:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 1022, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1084, - "src": "8889:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 1025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8889:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1037, - "nodeType": "IfStatement", - "src": "8885:125:0", - "trueBody": { - "id": 1036, - "nodeType": "Block", - "src": "8917:93:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1026, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "8931:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1027, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "8940:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 1028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8940:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "8931:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 1030, - "nodeType": "ExpressionStatement", - "src": "8931:22:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1032, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "8982:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1033, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8989:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1031, - "name": "NewEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "8973:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 1034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8973:26:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1035, - "nodeType": "EmitStatement", - "src": "8968:31:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1039, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1018, - "modifierName": { - "argumentTypes": null, - "id": 1017, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "8851:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8851:6:0" - }, - { - "arguments": null, - "id": 1020, - "modifierName": { - "argumentTypes": null, - "id": 1019, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8858:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8858:16:0" - } - ], - "name": "voteStartKeygen", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1016, - "nodeType": "ParameterList", - "parameters": [], - "src": "8841:2:0" - }, - "returnParameters": { - "id": 1021, - "nodeType": "ParameterList", - "parameters": [], - "src": "8875:0:0" - }, - "scope": 1340, - "src": "8817:199:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1061, - "nodeType": "Block", - "src": "9081:144:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1047, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "9103:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 1048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CANCEL_KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9103:18:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 1046, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1084, - "src": "9095:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 1049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9095:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1060, - "nodeType": "IfStatement", - "src": "9091:128:0", - "trueBody": { - "id": 1059, - "nodeType": "Block", - "src": "9124:95:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1050, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "9138:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1051, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9147:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 1052, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9147:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "9138:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 1054, - "nodeType": "ExpressionStatement", - "src": "9138:22:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1056, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9198:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1055, - "name": "NewEpochCancelled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "9180:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9180:28:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1058, - "nodeType": "EmitStatement", - "src": "9175:33:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1062, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1042, - "modifierName": { - "argumentTypes": null, - "id": 1041, - "name": "keygen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "9057:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9057:6:0" - }, - { - "arguments": null, - "id": 1044, - "modifierName": { - "argumentTypes": null, - "id": 1043, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9064:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9064:16:0" - } - ], - "name": "voteCancelKeygen", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1040, - "nodeType": "ParameterList", - "parameters": [], - "src": "9047:2:0" - }, - "returnParameters": { - "id": 1045, - "nodeType": "ParameterList", - "parameters": [], - "src": "9081:0:0" - }, - "scope": 1340, - "src": "9022:203:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1083, - "nodeType": "Block", - "src": "9286:110:0", - "statements": [ - { - "assignments": [ - 1070 - ], - "declarations": [ - { - "constant": false, - "id": 1070, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1083, - "src": "9296:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1069, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9296:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1078, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1074, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "9338:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1075, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9348:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1072, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9321:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9321:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9321:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1071, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9311:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9311:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9296:63:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1080, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "9384:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1079, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9376:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9376:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1068, - "id": 1082, - "nodeType": "Return", - "src": "9369:20:0" - } - ] - }, - "documentation": null, - "id": 1084, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1065, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1064, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1084, - "src": "9248:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1063, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9248:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9247:15:0" - }, - "returnParameters": { - "id": 1068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1067, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1084, - "src": "9280:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1066, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9280:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9279:6:0" - }, - "scope": 1340, - "src": "9231:165:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1108, - "nodeType": "Block", - "src": "9471:116:0", - "statements": [ - { - "assignments": [ - 1094 - ], - "declarations": [ - { - "constant": false, - "id": 1094, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "9481:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1093, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9481:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1103, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1098, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1086, - "src": "9523:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1099, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9533:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1100, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "9544:4:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1096, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9506:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9506:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9506:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1095, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9496:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9496:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9481:69:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1105, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1094, - "src": "9575:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1104, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9567:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9567:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1092, - "id": 1107, - "nodeType": "Return", - "src": "9560:20:0" - } - ] - }, - "documentation": null, - "id": 1109, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1089, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1086, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1109, - "src": "9419:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1085, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9419:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1088, - "name": "addr", - "nodeType": "VariableDeclaration", - "scope": 1109, - "src": "9434:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1087, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9434:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9418:29:0" - }, - "returnParameters": { - "id": 1092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1091, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1109, - "src": "9465:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1090, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9465:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9464:6:0" - }, - "scope": 1340, - "src": "9402:185:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1133, - "nodeType": "Block", - "src": "9658:115:0", - "statements": [ - { - "assignments": [ - 1119 - ], - "declarations": [ - { - "constant": false, - "id": 1119, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1133, - "src": "9668:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1118, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9668:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1128, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1123, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1111, - "src": "9710:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1124, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9720:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1125, - "name": "num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1113, - "src": "9731:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1121, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9693:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9693:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9693:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1120, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9683:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9683:53:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9668:68:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1130, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "9761:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1129, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9753:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9753:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1117, - "id": 1132, - "nodeType": "Return", - "src": "9746:20:0" - } - ] - }, - "documentation": null, - "id": 1134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1111, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1134, - "src": "9610:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1110, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9610:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1113, - "name": "num", - "nodeType": "VariableDeclaration", - "scope": 1134, - "src": "9625:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1112, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9625:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9609:25:0" - }, - "returnParameters": { - "id": 1117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1116, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1134, - "src": "9652:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1115, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9652:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9651:6:0" - }, - "scope": 1340, - "src": "9593:180:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1163, - "nodeType": "Block", - "src": "9872:116:0", - "statements": [ - { - "assignments": [ - 1148 - ], - "declarations": [ - { - "constant": false, - "id": 1148, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1163, - "src": "9882:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1147, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9882:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1158, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1152, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1136, - "src": "9924:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1153, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1138, - "src": "9934:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1154, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1140, - "src": "9940:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1155, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1142, - "src": "9944:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1150, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9907:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9907:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9907:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1149, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9897:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9897:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9882:69:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1160, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "9976:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1159, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9968:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9968:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1146, - "id": 1162, - "nodeType": "Return", - "src": "9961:20:0" - } - ] - }, - "documentation": null, - "id": 1164, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1143, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1136, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9796:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1135, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9796:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1138, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9811:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1137, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9811:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1140, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9825:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1139, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9825:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1142, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9837:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1141, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9837:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9795:53:0" - }, - "returnParameters": { - "id": 1146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1145, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9866:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1144, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9866:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9865:6:0" - }, - "scope": 1340, - "src": "9779:209:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1185, - "nodeType": "Block", - "src": "10052:113:0", - "statements": [ - { - "assignments": [ - 1172 - ], - "declarations": [ - { - "constant": false, - "id": 1172, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1185, - "src": "10062:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1171, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10062:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1180, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1176, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "10104:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1177, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "10114:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1174, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "10087:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1175, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10087:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10087:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1173, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "10077:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10077:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10062:63:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1182, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1172, - "src": "10153:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1181, - "name": "putConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1322, - "src": "10142:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10142:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1170, - "id": 1184, - "nodeType": "Return", - "src": "10135:23:0" - } - ] - }, - "documentation": null, - "id": 1186, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryConfirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1167, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1166, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1186, - "src": "10014:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1165, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "10014:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10013:15:0" - }, - "returnParameters": { - "id": 1170, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1169, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1186, - "src": "10046:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1168, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10046:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10045:6:0" - }, - "scope": 1340, - "src": "9994:171:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1213, - "nodeType": "Block", - "src": "10245:119:0", - "statements": [ - { - "assignments": [ - 1198 - ], - "declarations": [ - { - "constant": false, - "id": 1198, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1213, - "src": "10255:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1197, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10255:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1208, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1202, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1188, - "src": "10297:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1203, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "10307:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1204, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1190, - "src": "10318:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1205, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1192, - "src": "10321:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1200, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "10280:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10280:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10280:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1199, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "10270:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10270:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10255:69:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1210, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1198, - "src": "10352:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1209, - "name": "putConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1322, - "src": "10341:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10341:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1196, - "id": 1212, - "nodeType": "Return", - "src": "10334:23:0" - } - ] - }, - "documentation": null, - "id": 1214, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryConfirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1188, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10191:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1187, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "10191:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1190, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10206:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1189, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10206:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1192, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10214:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1191, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10214:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10190:31:0" - }, - "returnParameters": { - "id": 1196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1195, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10239:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1194, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10239:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10238:6:0" - }, - "scope": 1340, - "src": "10171:193:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1267, - "nodeType": "Block", - "src": "10424:355:0", - "statements": [ - { - "assignments": [ - 1222 - ], - "declarations": [ - { - "constant": false, - "id": 1222, - "name": "personalVote", - "nodeType": "VariableDeclaration", - "scope": 1267, - "src": "10434:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1221, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10434:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1226, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1224, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10473:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1223, - "name": "personalizeVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1339, - "src": "10457:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", - "typeString": "function (bytes32) view returns (bytes32)" - } - }, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10457:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10434:44:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10496:20:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1228, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10497:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1230, - "indexExpression": { - "argumentTypes": null, - "id": 1229, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1222, - "src": "10503:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10497:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "566f74656420616c7265616479", - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10518:15:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_230c30109b60c15b21799291aaf5c571045da3dc3f224d8bbd2f2e688c149a47", - "typeString": "literal_string \"Voted already\"" - }, - "value": "Voted already" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_230c30109b60c15b21799291aaf5c571045da3dc3f224d8bbd2f2e688c149a47", - "typeString": "literal_string \"Voted already\"" - } - ], - "id": 1227, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "10488:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10488:46:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1234, - "nodeType": "ExpressionStatement", - "src": "10488:46:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1235, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10545:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1237, - "indexExpression": { - "argumentTypes": null, - "id": 1236, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1222, - "src": "10551:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10545:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10567:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10545:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1240, - "nodeType": "ExpressionStatement", - "src": "10545:26:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1241, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "10585:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1243, - "indexExpression": { - "argumentTypes": null, - "id": 1242, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10596:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10585:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1244, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 565, - "src": "10605:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10605:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10585:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1265, - "nodeType": "Block", - "src": "10704:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10718:18:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1258, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "10718:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1260, - "indexExpression": { - "argumentTypes": null, - "id": 1259, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10729:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10718:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1262, - "nodeType": "ExpressionStatement", - "src": "10718:18:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10757:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1220, - "id": 1264, - "nodeType": "Return", - "src": "10750:12:0" - } - ] - }, - "id": 1266, - "nodeType": "IfStatement", - "src": "10581:192:0", - "trueBody": { - "id": 1257, - "nodeType": "Block", - "src": "10621:77:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1247, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "10635:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1249, - "indexExpression": { - "argumentTypes": null, - "id": 1248, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10646:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10635:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - }, - "id": 1252, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10654:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 1251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10659:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "10654:8:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - } - }, - "src": "10635:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1254, - "nodeType": "ExpressionStatement", - "src": "10635:27:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10683:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1220, - "id": 1256, - "nodeType": "Return", - "src": "10676:11:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1268, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "putVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1216, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1268, - "src": "10387:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1215, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10387:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10386:14:0" - }, - "returnParameters": { - "id": 1220, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1219, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1268, - "src": "10418:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1218, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10418:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10417:6:0" - }, - "scope": 1340, - "src": "10370:409:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1321, - "nodeType": "Block", - "src": "10842:363:0", - "statements": [ - { - "assignments": [ - 1276 - ], - "declarations": [ - { - "constant": false, - "id": 1276, - "name": "personalVote", - "nodeType": "VariableDeclaration", - "scope": 1321, - "src": "10852:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1275, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10852:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1280, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1278, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "10891:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1277, - "name": "personalizeVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1339, - "src": "10875:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", - "typeString": "function (bytes32) view returns (bytes32)" - } - }, - "id": 1279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10875:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10852:44:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10914:20:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1282, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10915:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1284, - "indexExpression": { - "argumentTypes": null, - "id": 1283, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1276, - "src": "10921:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10915:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "436f6e6669726d656420616c7265616479", - "id": 1286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10936:19:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_762a97ce67d271844ad9c09d89a5271fde7fe7537af208da055a904cd67ac7bc", - "typeString": "literal_string \"Confirmed already\"" - }, - "value": "Confirmed already" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_762a97ce67d271844ad9c09d89a5271fde7fe7537af208da055a904cd67ac7bc", - "typeString": "literal_string \"Confirmed already\"" - } - ], - "id": 1281, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "10906:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10906:50:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1288, - "nodeType": "ExpressionStatement", - "src": "10906:50:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1289, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10967:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1291, - "indexExpression": { - "argumentTypes": null, - "id": 1290, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1276, - "src": "10973:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10967:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10989:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10967:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1294, - "nodeType": "ExpressionStatement", - "src": "10967:26:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1295, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "11007:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1297, - "indexExpression": { - "argumentTypes": null, - "id": 1296, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "11018:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11007:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1298, - "name": "getNextThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 575, - "src": "11027:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11027:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11007:38:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1319, - "nodeType": "Block", - "src": "11130:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11144:18:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1312, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "11144:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1314, - "indexExpression": { - "argumentTypes": null, - "id": 1313, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "11155:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11144:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1316, - "nodeType": "ExpressionStatement", - "src": "11144:18:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11183:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1274, - "id": 1318, - "nodeType": "Return", - "src": "11176:12:0" - } - ] - }, - "id": 1320, - "nodeType": "IfStatement", - "src": "11003:196:0", - "trueBody": { - "id": 1311, - "nodeType": "Block", - "src": "11047:77:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1301, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "11061:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1303, - "indexExpression": { - "argumentTypes": null, - "id": 1302, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "11072:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11061:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - }, - "id": 1306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11080:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 1305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11085:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "11080:8:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - } - }, - "src": "11061:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1308, - "nodeType": "ExpressionStatement", - "src": "11061:27:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11109:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1274, - "id": 1310, - "nodeType": "Return", - "src": "11102:11:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1322, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "putConfirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1271, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1270, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1322, - "src": "10805:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1269, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10805:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10804:14:0" - }, - "returnParameters": { - "id": 1274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1273, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1322, - "src": "10836:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1272, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10836:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10835:6:0" - }, - "scope": 1340, - "src": "10785:420:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1338, - "nodeType": "Block", - "src": "11281:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1332, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1324, - "src": "11325:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1333, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "11331:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11331:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "id": 1330, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "11308:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11308:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11308:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1329, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "11298:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11298:45:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1328, - "id": 1337, - "nodeType": "Return", - "src": "11291:52:0" - } - ] - }, - "documentation": null, - "id": 1339, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "personalizeVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1325, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1324, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1339, - "src": "11236:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1323, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11236:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11235:14:0" - }, - "returnParameters": { - "id": 1328, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1327, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1339, - "src": "11272:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1326, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11272:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11271:9:0" - }, - "scope": 1340, - "src": "11211:139:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 1341, - "src": "93:11259:0" - } - ], - "src": "0:11353:0" - }, - "legacyAST": { - "absolutePath": "/build/contracts/Bridge.sol", - "exportedSymbols": { - "Bridge": [ - 1340 - ] - }, - "id": 1341, - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 1, - "literals": [ - "solidity", - "^", - "0.5", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "0:23:0" - }, - { - "absolutePath": "/build/contracts/openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "file": "./openzeppelin-solidity/contracts/token/ERC20/IERC20.sol", - "id": 2, - "nodeType": "ImportDirective", - "scope": 1341, - "sourceUnit": 10033, - "src": "25:66:0", - "symbolAliases": [], - "unitAlias": "" - }, - { - "baseContracts": [], - "contractDependencies": [], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 1340, - "linearizedBaseContracts": [ - 1340 - ], - "name": "Bridge", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 8, - "name": "ExchangeRequest", - "nodeType": "EventDefinition", - "parameters": { - "id": 7, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 4, - "indexed": false, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "137:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "137:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "indexed": false, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 8, - "src": "149:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 5, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "149:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "136:24:0" - }, - "src": "115:46:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 14, - "name": "NewEpoch", - "nodeType": "EventDefinition", - "parameters": { - "id": 13, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10, - "indexed": true, - "name": "oldEpoch", - "nodeType": "VariableDeclaration", - "scope": 14, - "src": "181:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 9, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "181:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 12, - "indexed": true, - "name": "newEpoch", - "nodeType": "VariableDeclaration", - "scope": 14, - "src": "204:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 11, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "180:46:0" - }, - "src": "166:61:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 18, - "name": "NewEpochCancelled", - "nodeType": "EventDefinition", - "parameters": { - "id": 17, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 16, - "indexed": true, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "256:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 15, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "255:20:0" - }, - "src": "232:44:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 24, - "name": "NewFundsTransfer", - "nodeType": "EventDefinition", - "parameters": { - "id": 23, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 20, - "indexed": true, - "name": "oldEpoch", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "304:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 19, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "304:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "indexed": true, - "name": "newEpoch", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "327:21:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 21, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "327:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "303:46:0" - }, - "src": "281:69:0" - }, - { - "anonymous": false, - "documentation": null, - "id": 32, - "name": "EpochStart", - "nodeType": "EventDefinition", - "parameters": { - "id": 31, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 26, - "indexed": true, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "372:18:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 25, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "372:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 28, - "indexed": false, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "392:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 27, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "392:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 30, - "indexed": false, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "400:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "400:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "371:36:0" - }, - "src": "355:53:0" - }, - { - "canonicalName": "Bridge.State", - "id": 48, - "members": [ - { - "constant": false, - "id": 35, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "437:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 33, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "437:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 34, - "length": null, - "nodeType": "ArrayTypeName", - "src": "437:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 37, - "name": "threshold", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "467:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 36, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "467:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 39, - "name": "rangeSize", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "491:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 38, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "491:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 41, - "name": "startBlock", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "515:15:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 40, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "515:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 43, - "name": "nonce", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "540:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 42, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "540:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 45, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "560:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 44, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "560:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 47, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "576:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "576:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "name": "State", - "nodeType": "StructDefinition", - "scope": 1340, - "src": "414:175:0", - "visibility": "public" - }, - { - "canonicalName": "Bridge.Status", - "id": 53, - "members": [ - { - "id": 49, - "name": "READY", - "nodeType": "EnumValue", - "src": "617:5:0" - }, - { - "id": 50, - "name": "VOTING", - "nodeType": "EnumValue", - "src": "676:6:0" - }, - { - "id": 51, - "name": "KEYGEN", - "nodeType": "EnumValue", - "src": "746:6:0" - }, - { - "id": 52, - "name": "FUNDS_TRANSFER", - "nodeType": "EnumValue", - "src": "789:14:0" - } - ], - "name": "Status", - "nodeType": "EnumDefinition", - "src": "595:253:0" - }, - { - "canonicalName": "Bridge.Vote", - "id": 64, - "members": [ - { - "id": 54, - "name": "CONFIRM_KEYGEN", - "nodeType": "EnumValue", - "src": "874:14:0" - }, - { - "id": 55, - "name": "CONFIRM_FUNDS_TRANSFER", - "nodeType": "EnumValue", - "src": "898:22:0" - }, - { - "id": 56, - "name": "START_VOTING", - "nodeType": "EnumValue", - "src": "930:12:0" - }, - { - "id": 57, - "name": "ADD_VALIDATOR", - "nodeType": "EnumValue", - "src": "952:13:0" - }, - { - "id": 58, - "name": "REMOVE_VALIDATOR", - "nodeType": "EnumValue", - "src": "975:16:0" - }, - { - "id": 59, - "name": "CHANGE_THRESHOLD", - "nodeType": "EnumValue", - "src": "1001:16:0" - }, - { - "id": 60, - "name": "CHANGE_RANGE_SIZE", - "nodeType": "EnumValue", - "src": "1027:17:0" - }, - { - "id": 61, - "name": "START_KEYGEN", - "nodeType": "EnumValue", - "src": "1054:12:0" - }, - { - "id": 62, - "name": "CANCEL_KEYGEN", - "nodeType": "EnumValue", - "src": "1076:13:0" - }, - { - "id": 63, - "name": "TRANSFER", - "nodeType": "EnumValue", - "src": "1099:8:0" - } - ], - "name": "Vote", - "nodeType": "EnumDefinition", - "src": "854:259:0" - }, - { - "constant": false, - "id": 68, - "name": "states", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1119:29:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State)" - }, - "typeName": { - "id": 67, - "keyType": { - "id": 65, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1127:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Mapping", - "src": "1119:22:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State)" - }, - "valueType": { - "contractScope": null, - "id": 66, - "name": "State", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 48, - "src": "1135:5:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage_ptr", - "typeString": "struct Bridge.State" - } - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 72, - "name": "dbTransferCount", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1155:47:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "typeName": { - "id": 71, - "keyType": { - "id": 69, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1163:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1155:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "valueType": { - "id": 70, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1174:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 76, - "name": "dbTransfer", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1208:42:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 75, - "keyType": { - "id": 73, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1216:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1208:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 74, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1227:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 80, - "name": "votesCount", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1256:42:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "typeName": { - "id": 79, - "keyType": { - "id": 77, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1264:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1256:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - }, - "valueType": { - "id": 78, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1275:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 84, - "name": "votes", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1304:37:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 83, - "keyType": { - "id": 81, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1312:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1304:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 82, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1323:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 88, - "name": "usedRange", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1347:41:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "typeName": { - "id": 87, - "keyType": { - "id": 85, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1355:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "1347:24:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - }, - "valueType": { - "id": 86, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1366:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 90, - "name": "status", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1395:20:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "typeName": { - "contractScope": null, - "id": 89, - "name": "Status", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 53, - "src": "1395:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 92, - "name": "epoch", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1422:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 91, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1422:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 94, - "name": "nextEpoch", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1445:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 93, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1445:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "public" - }, - { - "constant": false, - "id": 96, - "name": "minTxLimit", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1473:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 95, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1473:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 98, - "name": "maxTxLimit", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "1494:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 97, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1494:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "body": { - "id": 181, - "nodeType": "Block", - "src": "1643:403:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 118, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 115, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "1661:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1661:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1681:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1661:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 114, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13091, - "src": "1653:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 119, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1653:30:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 120, - "nodeType": "ExpressionStatement", - "src": "1653:30:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 122, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1701:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 123, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "1713:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 124, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1713:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1701:29:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 121, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13091, - "src": "1693:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1693:38:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 127, - "nodeType": "ExpressionStatement", - "src": "1693:38:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 132, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 128, - "name": "tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "1742:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 130, - "name": "_tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 105, - "src": "1765:14:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 129, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10032, - "src": "1758:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$10032_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1758:22:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "src": "1742:38:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "id": 133, - "nodeType": "ExpressionStatement", - "src": "1742:38:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 136, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 134, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "1791:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "30", - "id": 135, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1799:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1791:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 137, - "nodeType": "ExpressionStatement", - "src": "1791:9:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 141, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 138, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "1810:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 139, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "1819:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 140, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "1819:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "1810:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 142, - "nodeType": "ExpressionStatement", - "src": "1810:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 145, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 143, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "1842:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "31", - "id": 144, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1854:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "1842:13:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 146, - "nodeType": "ExpressionStatement", - "src": "1842:13:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 162, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 147, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "1866:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 149, - "indexExpression": { - "argumentTypes": null, - "id": 148, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "1873:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "1866:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 151, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 103, - "src": "1892:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 152, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 100, - "src": "1904:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 153, - "name": "rangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 111, - "src": "1915:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 154, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1926:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 157, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "1934:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 156, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1935:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 155, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1929:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 158, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1929:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 159, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1939:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "30", - "id": 160, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1942:1:0", - "subdenomination": null, - "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_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 150, - "name": "State", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "1886:5:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_State_$48_storage_ptr_$", - "typeString": "type(struct Bridge.State storage pointer)" - } - }, - "id": 161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1886:58:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_memory", - "typeString": "struct Bridge.State memory" - } - }, - "src": "1866:78:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 163, - "nodeType": "ExpressionStatement", - "src": "1866:78:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 168, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 164, - "name": "minTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "1955:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 165, - "name": "limits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 109, - "src": "1968:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", - "typeString": "uint256[2] memory" - } - }, - "id": 167, - "indexExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 166, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1975:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "1968:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1955:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 169, - "nodeType": "ExpressionStatement", - "src": "1955:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 174, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 170, - "name": "maxTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "1987:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 171, - "name": "limits", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 109, - "src": "2000:6:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", - "typeString": "uint256[2] memory" - } - }, - "id": 173, - "indexExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 172, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2007:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2000:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1987:22:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 175, - "nodeType": "ExpressionStatement", - "src": "1987:22:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 177, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2034:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - { - "argumentTypes": null, - "hexValue": "31", - "id": 178, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2037:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 176, - "name": "NewEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "2025:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2025:14:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 180, - "nodeType": "EmitStatement", - "src": "2020:19:0" - } - ] - }, - "documentation": null, - "id": 182, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 112, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 100, - "name": "threshold", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1528:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 99, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1528:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 103, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1544:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 101, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1544:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 102, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1544:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 105, - "name": "_tokenContract", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1573:22:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 104, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1573:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 109, - "name": "limits", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1597:21:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", - "typeString": "uint256[2]" - }, - "typeName": { - "baseType": { - "id": 106, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1597:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 108, - "length": { - "argumentTypes": null, - "hexValue": "32", - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1602:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "ArrayTypeName", - "src": "1597:7:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", - "typeString": "uint256[2]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 111, - "name": "rangeSize", - "nodeType": "VariableDeclaration", - "scope": 182, - "src": "1620:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 110, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "1620:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1527:108:0" - }, - "returnParameters": { - "id": 113, - "nodeType": "ParameterList", - "parameters": [], - "src": "1643:0:0" - }, - "scope": 1340, - "src": "1516:530:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "constant": false, - "id": 184, - "name": "tokenContract", - "nodeType": "VariableDeclaration", - "scope": 1340, - "src": "2052:27:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 183, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 10032, - "src": "2052:6:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 195, - "nodeType": "Block", - "src": "2101:81:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 190, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 187, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2119:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 188, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2129:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 189, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2129:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2119:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e207265616479207374617465", - "id": 191, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2143:20:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_965c39c15b78dbcd8a954511641ca86e15fc1ae6d6c30a67536872ccde75b679", - "typeString": "literal_string \"Not in ready state\"" - }, - "value": "Not in ready state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_965c39c15b78dbcd8a954511641ca86e15fc1ae6d6c30a67536872ccde75b679", - "typeString": "literal_string \"Not in ready state\"" - } - ], - "id": 186, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2111:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 192, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2111:53:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 193, - "nodeType": "ExpressionStatement", - "src": "2111:53:0" - }, - { - "id": 194, - "nodeType": "PlaceholderStatement", - "src": "2174:1:0" - } - ] - }, - "documentation": null, - "id": 196, - "name": "ready", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 185, - "nodeType": "ParameterList", - "parameters": [], - "src": "2101:0:0" - }, - "src": "2086:96:0", - "visibility": "internal" - }, - { - "body": { - "id": 212, - "nodeType": "Block", - "src": "2211:118:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 202, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 199, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2229:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 200, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2239:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2239:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2229:22:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 203, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2255:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 204, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2265:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 205, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2265:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2255:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2229:49:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e207265616479206f7220766f74696e67207374617465", - "id": 208, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2280:30:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e3f7359baa731593d4e3921720b92600c22ed1d950d208e0c826ad2eddebe96", - "typeString": "literal_string \"Not in ready or voting state\"" - }, - "value": "Not in ready or voting state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e3f7359baa731593d4e3921720b92600c22ed1d950d208e0c826ad2eddebe96", - "typeString": "literal_string \"Not in ready or voting state\"" - } - ], - "id": 198, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2221:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 209, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2221:90:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 210, - "nodeType": "ExpressionStatement", - "src": "2221:90:0" - }, - { - "id": 211, - "nodeType": "PlaceholderStatement", - "src": "2321:1:0" - } - ] - }, - "documentation": null, - "id": 213, - "name": "readyOrVoting", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 197, - "nodeType": "ParameterList", - "parameters": [], - "src": "2211:0:0" - }, - "src": "2188:141:0", - "visibility": "internal" - }, - { - "body": { - "id": 224, - "nodeType": "Block", - "src": "2351:83:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 219, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 216, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2369:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 217, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2379:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 218, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2379:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2369:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e20766f74696e67207374617465", - "id": 220, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2394:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_0cbee9834b110b21e0730bf5c3d2972fb9867ff221df239e7ae60883592f05d1", - "typeString": "literal_string \"Not in voting state\"" - }, - "value": "Not in voting state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_0cbee9834b110b21e0730bf5c3d2972fb9867ff221df239e7ae60883592f05d1", - "typeString": "literal_string \"Not in voting state\"" - } - ], - "id": 215, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2361:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2361:55:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 222, - "nodeType": "ExpressionStatement", - "src": "2361:55:0" - }, - { - "id": 223, - "nodeType": "PlaceholderStatement", - "src": "2426:1:0" - } - ] - }, - "documentation": null, - "id": 225, - "name": "voting", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 214, - "nodeType": "ParameterList", - "parameters": [], - "src": "2351:0:0" - }, - "src": "2335:99:0", - "visibility": "internal" - }, - { - "body": { - "id": 236, - "nodeType": "Block", - "src": "2456:83:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 228, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2474:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 229, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2484:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 230, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2484:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2474:23:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e206b657967656e207374617465", - "id": 232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2499:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_ed0fee6382e0651a224348a21558d03a4a439c3bd5edc24945894a3417c14010", - "typeString": "literal_string \"Not in keygen state\"" - }, - "value": "Not in keygen state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_ed0fee6382e0651a224348a21558d03a4a439c3bd5edc24945894a3417c14010", - "typeString": "literal_string \"Not in keygen state\"" - } - ], - "id": 227, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2466:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2466:55:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 234, - "nodeType": "ExpressionStatement", - "src": "2466:55:0" - }, - { - "id": 235, - "nodeType": "PlaceholderStatement", - "src": "2531:1:0" - } - ] - }, - "documentation": null, - "id": 237, - "name": "keygen", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 226, - "nodeType": "ParameterList", - "parameters": [], - "src": "2456:0:0" - }, - "src": "2440:99:0", - "visibility": "internal" - }, - { - "body": { - "id": 248, - "nodeType": "Block", - "src": "2568:99:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - }, - "id": 243, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 240, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "2586:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 241, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "2596:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 242, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "FUNDS_TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2596:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "2586:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420696e2066756e6473207472616e73666572207374617465", - "id": 244, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2619:29:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_6347c9fecd6f58520ad10dfd1347ce3dc42cc0eed7a4182ca64dd11c69fc3008", - "typeString": "literal_string \"Not in funds transfer state\"" - }, - "value": "Not in funds transfer state" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_6347c9fecd6f58520ad10dfd1347ce3dc42cc0eed7a4182ca64dd11c69fc3008", - "typeString": "literal_string \"Not in funds transfer state\"" - } - ], - "id": 239, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2578:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2578:71:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 246, - "nodeType": "ExpressionStatement", - "src": "2578:71:0" - }, - { - "id": 247, - "nodeType": "PlaceholderStatement", - "src": "2659:1:0" - } - ] - }, - "documentation": null, - "id": 249, - "name": "fundsTransfer", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 238, - "nodeType": "ParameterList", - "parameters": [], - "src": "2568:0:0" - }, - "src": "2545:122:0", - "visibility": "internal" - }, - { - "body": { - "id": 260, - "nodeType": "Block", - "src": "2699:81:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 255, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 252, - "name": "getPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 728, - "src": "2717:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2717:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 254, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2733:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "2717:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f7420612063757272656e742076616c696461746f72", - "id": 256, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2736:25:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8dc18d5bb1361900b9758b388df331056e31071cae84b276c0f03794c4dc634a", - "typeString": "literal_string \"Not a current validator\"" - }, - "value": "Not a current validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8dc18d5bb1361900b9758b388df331056e31071cae84b276c0f03794c4dc634a", - "typeString": "literal_string \"Not a current validator\"" - } - ], - "id": 251, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "2709:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 257, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2709:53:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 258, - "nodeType": "ExpressionStatement", - "src": "2709:53:0" - }, - { - "id": 259, - "nodeType": "PlaceholderStatement", - "src": "2772:1:0" - } - ] - }, - "documentation": null, - "id": 261, - "name": "currentValidator", - "nodeType": "ModifierDefinition", - "parameters": { - "id": 250, - "nodeType": "ParameterList", - "parameters": [], - "src": "2699:0:0" - }, - "src": "2673:107:0", - "visibility": "internal" - }, - { - "body": { - "id": 343, - "nodeType": "Block", - "src": "2829:475:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 281, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 277, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 271, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 269, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "2847:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "id": 270, - "name": "minTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 96, - "src": "2856:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2847:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 276, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 272, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "2870:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - }, - "id": 275, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 273, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2879:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "3130", - "id": 274, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2885:2:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "src": "2879:8:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_10000000000_by_1", - "typeString": "int_const 10000000000" - } - }, - "src": "2870:17:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2847:40:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "&&", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 280, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 278, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "2891:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": { - "argumentTypes": null, - "id": 279, - "name": "maxTxLimit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 98, - "src": "2900:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2891:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "2847:63:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 268, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13091, - "src": "2839:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 282, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2839:72:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 283, - "nodeType": "ExpressionStatement", - "src": "2839:72:0" - }, - { - "assignments": [ - 285 - ], - "declarations": [ - { - "constant": false, - "id": 285, - "name": "txRange", - "nodeType": "VariableDeclaration", - "scope": 343, - "src": "2922:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 284, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2922:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 295, - "initialValue": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 294, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "components": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 290, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 286, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13078, - "src": "2938:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "2938:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 288, - "name": "getStartBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 598, - 611 - ], - "referencedDeclaration": 598, - "src": "2953:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 289, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2953:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2938:30:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "id": 291, - "isConstant": false, - "isInlineArray": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "TupleExpression", - "src": "2937:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 292, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 621, - "src": "2972:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2972:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2937:49:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2922:64:0" - }, - { - "condition": { - "argumentTypes": null, - "id": 305, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "3000:55:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 296, - "name": "usedRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "3001:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 304, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 300, - "name": "txRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "3038:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 301, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3047:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 298, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "3021:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 299, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3021:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 302, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3021:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 297, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "3011:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 303, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3011:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3001:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 325, - "nodeType": "IfStatement", - "src": "2996:182:0", - "trueBody": { - "id": 324, - "nodeType": "Block", - "src": "3057:121:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 316, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 306, - "name": "usedRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "3071:9:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 314, - "indexExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 310, - "name": "txRange", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 285, - "src": "3108:7:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 311, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3117:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 308, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "3091:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3091:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 312, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3091:32:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 307, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "3081:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 313, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3081:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3071:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 315, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3128:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "3071:61:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 317, - "nodeType": "ExpressionStatement", - "src": "3071:61:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 322, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "3146:21:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 318, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3146:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 320, - "indexExpression": { - "argumentTypes": null, - "id": 319, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3153:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3146:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 321, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "3146:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 323, - "nodeType": "ExpressionStatement", - "src": "3146:21:0" - } - ] - } - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 329, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "3215:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 330, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3215:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 332, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13104, - "src": "3235:4:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_Bridge_$1340", - "typeString": "contract Bridge" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_Bridge_$1340", - "typeString": "contract Bridge" - } - ], - "id": 331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3227:7:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": "address" - }, - "id": 333, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3227:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 334, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "3242:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 326, - "name": "tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "3188:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "id": 328, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 10015, - "src": "3188:26:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3188:60:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 336, - "nodeType": "ExpressionStatement", - "src": "3188:60:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 338, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 263, - "src": "3279:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 339, - "name": "getNonce", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 654, - 667 - ], - "referencedDeclaration": 654, - "src": "3286:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 340, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3286:10:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 337, - "name": "ExchangeRequest", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "3263:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 341, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3263:34:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 342, - "nodeType": "EmitStatement", - "src": "3258:39:0" - } - ] - }, - "documentation": null, - "id": 344, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 266, - "modifierName": { - "argumentTypes": null, - "id": 265, - "name": "ready", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 196, - "src": "2823:5:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "2823:5:0" - } - ], - "name": "exchange", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 264, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 263, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 344, - "src": "2804:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 262, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "2804:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2803:12:0" - }, - "returnParameters": { - "id": 267, - "nodeType": "ParameterList", - "parameters": [], - "src": "2829:0:0" - }, - "scope": 1340, - "src": "2786:518:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 373, - "nodeType": "Block", - "src": "3404:119:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 358, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "3426:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 359, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3426:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 360, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 346, - "src": "3441:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 361, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "3447:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 362, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "3451:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 357, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1164, - "src": "3418:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_bytes32_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,bytes32,address,uint256) returns (bool)" - } - }, - "id": 363, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3418:39:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 372, - "nodeType": "IfStatement", - "src": "3414:103:0", - "trueBody": { - "id": 371, - "nodeType": "Block", - "src": "3459:58:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 367, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 348, - "src": "3496:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 368, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 350, - "src": "3500:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 364, - "name": "tokenContract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 184, - "src": "3473:13:0", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$10032", - "typeString": "contract IERC20" - } - }, - "id": 366, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 9986, - "src": "3473:22:0", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 369, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3473:33:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 370, - "nodeType": "ExpressionStatement", - "src": "3473:33:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 374, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 353, - "modifierName": { - "argumentTypes": null, - "id": 352, - "name": "readyOrVoting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "3373:13:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3373:13:0" - }, - { - "arguments": null, - "id": 355, - "modifierName": { - "argumentTypes": null, - "id": 354, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "3387:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3387:16:0" - } - ], - "name": "transfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 351, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 346, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 374, - "src": "3328:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 345, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "3328:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 348, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 374, - "src": "3342:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 347, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3342:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 350, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 374, - "src": "3354:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 349, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3354:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3327:38:0" - }, - "returnParameters": { - "id": 356, - "nodeType": "ParameterList", - "parameters": [], - "src": "3404:0:0" - }, - "scope": 1340, - "src": "3310:213:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 464, - "nodeType": "Block", - "src": "3582:638:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 389, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 385, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "3615:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 386, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3615:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "id": 384, - "name": "getNextPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "3600:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 387, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3600:26:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 388, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3630:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "3600:31:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "4e6f742061206e6578742076616c696461746f72", - "id": 390, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3633:22:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_44981c92ce908443b2fa5f878c54791e1a0c95d4cc04ea4f4d9224b3ec030922", - "typeString": "literal_string \"Not a next validator\"" - }, - "value": "Not a next validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_44981c92ce908443b2fa5f878c54791e1a0c95d4cc04ea4f4d9224b3ec030922", - "typeString": "literal_string \"Not a next validator\"" - } - ], - "id": 383, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "3592:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 391, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3592:64:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 392, - "nodeType": "ExpressionStatement", - "src": "3592:64:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 394, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "3682:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 395, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CONFIRM_KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3682:19:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 396, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3703:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 397, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "3706:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 393, - "name": "tryConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1186, - 1214 - ], - "referencedDeclaration": 1214, - "src": "3671:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_uint256_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,uint256,uint256) returns (bool)" - } - }, - "id": 398, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3671:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 463, - "nodeType": "IfStatement", - "src": "3667:547:0", - "trueBody": { - "id": 462, - "nodeType": "Block", - "src": "3710:504:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 404, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 399, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3724:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 401, - "indexExpression": { - "argumentTypes": null, - "id": 400, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3731:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3724:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 402, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "x", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "3724:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 403, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "3746:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3724:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 405, - "nodeType": "ExpressionStatement", - "src": "3724:23:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 411, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 406, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3761:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 408, - "indexExpression": { - "argumentTypes": null, - "id": 407, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3768:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3761:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 409, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "y", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "3761:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 410, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "3783:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3761:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 412, - "nodeType": "ExpressionStatement", - "src": "3761:23:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 415, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 413, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3802:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 414, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3815:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "3802:14:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 460, - "nodeType": "Block", - "src": "4084:120:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 453, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 450, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "4102:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 451, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "4111:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 452, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "FUNDS_TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4111:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "4102:30:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 454, - "nodeType": "ExpressionStatement", - "src": "4102:30:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 456, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4172:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 457, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4179:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 455, - "name": "NewFundsTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 24, - "src": "4155:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 458, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4155:34:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 459, - "nodeType": "EmitStatement", - "src": "4150:39:0" - } - ] - }, - "id": 461, - "nodeType": "IfStatement", - "src": "3798:406:0", - "trueBody": { - "id": 449, - "nodeType": "Block", - "src": "3818:248:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 419, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 416, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "3836:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 417, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "3845:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 418, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3845:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "3836:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 420, - "nodeType": "ExpressionStatement", - "src": "3836:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 427, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 421, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3875:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 423, - "indexExpression": { - "argumentTypes": null, - "id": 422, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3882:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3875:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 424, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 41, - "src": "3875:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 425, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13078, - "src": "3906:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 426, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "3906:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3875:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 428, - "nodeType": "ExpressionStatement", - "src": "3875:43:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 437, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 429, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "3936:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 431, - "indexExpression": { - "argumentTypes": null, - "id": 430, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3943:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "3936:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 432, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "3936:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 435, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "3967:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 434, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3968:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 433, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3962:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 436, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3962:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3936:34:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 438, - "nodeType": "ExpressionStatement", - "src": "3936:34:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 441, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 439, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "3988:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 440, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "3996:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3988:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 442, - "nodeType": "ExpressionStatement", - "src": "3988:17:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 444, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4039:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 445, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 376, - "src": "4046:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 446, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 378, - "src": "4049:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 443, - "name": "EpochStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "4028:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 447, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4028:23:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 448, - "nodeType": "EmitStatement", - "src": "4023:28:0" - } - ] - } - } - ] - } - } - ] - }, - "documentation": null, - "id": 465, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 381, - "modifierName": { - "argumentTypes": null, - "id": 380, - "name": "keygen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "3575:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "3575:6:0" - } - ], - "name": "confirmKeygen", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 379, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 376, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 465, - "src": "3552:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 375, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3552:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 378, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 465, - "src": "3560:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 377, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "3560:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3551:16:0" - }, - "returnParameters": { - "id": 382, - "nodeType": "ParameterList", - "parameters": [], - "src": "3582:0:0" - }, - "scope": 1340, - "src": "3529:691:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 520, - "nodeType": "Block", - "src": "4296:368:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 475, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 473, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4314:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 474, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4322:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "4314:9:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "46697273742065706f636820646f6573206e6f74206e6565642066756e6473207472616e73666572", - "id": 476, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4325:42:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_8ddae2cc9da30ed8c59c39c6a950ef823ea484ac89ff6f37abb0317fb5f679a1", - "typeString": "literal_string \"First epoch does not need funds transfer\"" - }, - "value": "First epoch does not need funds transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_8ddae2cc9da30ed8c59c39c6a950ef823ea484ac89ff6f37abb0317fb5f679a1", - "typeString": "literal_string \"First epoch does not need funds transfer\"" - } - ], - "id": 472, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "4306:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 477, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4306:62:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 478, - "nodeType": "ExpressionStatement", - "src": "4306:62:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 480, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "4394:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 481, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CONFIRM_FUNDS_TRANSFER", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4394:27:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 479, - "name": "tryConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1186, - 1214 - ], - "referencedDeclaration": 1186, - "src": "4383:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 482, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4383:39:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 519, - "nodeType": "IfStatement", - "src": "4379:279:0", - "trueBody": { - "id": 518, - "nodeType": "Block", - "src": "4424:234:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 486, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 483, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "4438:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 484, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "4447:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 485, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "READY", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4447:12:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "4438:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 487, - "nodeType": "ExpressionStatement", - "src": "4438:21:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 494, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 488, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4473:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 490, - "indexExpression": { - "argumentTypes": null, - "id": 489, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4480:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4473:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 491, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 41, - "src": "4473:28:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 492, - "name": "block", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13078, - "src": "4504:5:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_block", - "typeString": "block" - } - }, - "id": 493, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "number", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4504:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4473:43:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 495, - "nodeType": "ExpressionStatement", - "src": "4473:43:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 496, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4530:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 498, - "indexExpression": { - "argumentTypes": null, - "id": 497, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4537:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4530:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 499, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "4530:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "-", - "prefix": true, - "src": "4561:2:0", - "subExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 501, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4562:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "typeDescriptions": { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_minus_1_by_1", - "typeString": "int_const -1" - } - ], - "id": 500, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "4556:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint256_$", - "typeString": "type(uint256)" - }, - "typeName": "uint" - }, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4556:8:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4530:34:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 505, - "nodeType": "ExpressionStatement", - "src": "4530:34:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 508, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 506, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4578:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 507, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4586:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "4578:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 509, - "nodeType": "ExpressionStatement", - "src": "4578:17:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 511, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4625:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 512, - "name": "getX", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 678, - "src": "4632:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 513, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4632:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 514, - "name": "getY", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 689, - "src": "4640:4:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4640:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 510, - "name": "EpochStart", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "4614:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256,uint256)" - } - }, - "id": 516, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4614:33:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 517, - "nodeType": "EmitStatement", - "src": "4609:38:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 521, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 468, - "modifierName": { - "argumentTypes": null, - "id": 467, - "name": "fundsTransfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 249, - "src": "4265:13:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4265:13:0" - }, - { - "arguments": null, - "id": 470, - "modifierName": { - "argumentTypes": null, - "id": 469, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "4279:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "4279:16:0" - } - ], - "name": "confirmFundsTransfer", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 466, - "nodeType": "ParameterList", - "parameters": [], - "src": "4255:2:0" - }, - "returnParameters": { - "id": 471, - "nodeType": "ParameterList", - "parameters": [], - "src": "4296:0:0" - }, - "scope": 1340, - "src": "4226:438:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 530, - "nodeType": "Block", - "src": "4719:41:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 527, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "4747:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 526, - "name": "getParties", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 531, - 555 - ], - "referencedDeclaration": 555, - "src": "4736:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 528, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4736:17:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 525, - "id": 529, - "nodeType": "Return", - "src": "4729:24:0" - } - ] - }, - "documentation": null, - "id": 531, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getParties", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 522, - "nodeType": "ParameterList", - "parameters": [], - "src": "4689:2:0" - }, - "returnParameters": { - "id": 525, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 524, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 531, - "src": "4713:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 523, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4713:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4712:6:0" - }, - "scope": 1340, - "src": "4670:90:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 540, - "nodeType": "Block", - "src": "4819:45:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 537, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "4847:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 536, - "name": "getParties", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 531, - 555 - ], - "referencedDeclaration": 555, - "src": "4836:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 538, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4836:21:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 535, - "id": 539, - "nodeType": "Return", - "src": "4829:28:0" - } - ] - }, - "documentation": null, - "id": 541, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextParties", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 532, - "nodeType": "ParameterList", - "parameters": [], - "src": "4789:2:0" - }, - "returnParameters": { - "id": 535, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 534, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 541, - "src": "4813:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 533, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4813:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4812:6:0" - }, - "scope": 1340, - "src": "4766:98:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 554, - "nodeType": "Block", - "src": "4930:56:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 548, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "4947:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 550, - "indexExpression": { - "argumentTypes": null, - "id": 549, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 543, - "src": "4954:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "4947:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 551, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "4947:25:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 552, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "4947:32:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 547, - "id": 553, - "nodeType": "Return", - "src": "4940:39:0" - } - ] - }, - "documentation": null, - "id": 555, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getParties", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 544, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 543, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 555, - "src": "4890:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 542, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4890:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4889:13:0" - }, - "returnParameters": { - "id": 547, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 546, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 555, - "src": "4924:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 545, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "4924:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4923:6:0" - }, - "scope": 1340, - "src": "4870:116:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 564, - "nodeType": "Block", - "src": "5043:43:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 561, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5073:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 560, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 588, - "src": "5060:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 562, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5060:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 559, - "id": 563, - "nodeType": "Return", - "src": "5053:26:0" - } - ] - }, - "documentation": null, - "id": 565, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 556, - "nodeType": "ParameterList", - "parameters": [], - "src": "5013:2:0" - }, - "returnParameters": { - "id": 559, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 558, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 565, - "src": "5037:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 557, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5037:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5036:6:0" - }, - "scope": 1340, - "src": "4992:94:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 574, - "nodeType": "Block", - "src": "5147:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 571, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "5177:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 570, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 588, - "src": "5164:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 572, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5164:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 569, - "id": 573, - "nodeType": "Return", - "src": "5157:30:0" - } - ] - }, - "documentation": null, - "id": 575, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 566, - "nodeType": "ParameterList", - "parameters": [], - "src": "5117:2:0" - }, - "returnParameters": { - "id": 569, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 568, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 575, - "src": "5141:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 567, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5141:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5140:6:0" - }, - "scope": 1340, - "src": "5092:102:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 587, - "nodeType": "Block", - "src": "5262:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 582, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "5279:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 584, - "indexExpression": { - "argumentTypes": null, - "id": 583, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 577, - "src": "5286:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5279:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 585, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "threshold", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "5279:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 581, - "id": 586, - "nodeType": "Return", - "src": "5272:31:0" - } - ] - }, - "documentation": null, - "id": 588, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 578, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 577, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 588, - "src": "5222:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 576, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5222:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5221:13:0" - }, - "returnParameters": { - "id": 581, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 580, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 588, - "src": "5256:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 579, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5256:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5255:6:0" - }, - "scope": 1340, - "src": "5200:110:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 597, - "nodeType": "Block", - "src": "5368:44:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 594, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5399:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 593, - "name": "getStartBlock", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 598, - 611 - ], - "referencedDeclaration": 611, - "src": "5385:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 595, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5385:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 592, - "id": 596, - "nodeType": "Return", - "src": "5378:27:0" - } - ] - }, - "documentation": null, - "id": 598, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStartBlock", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 589, - "nodeType": "ParameterList", - "parameters": [], - "src": "5338:2:0" - }, - "returnParameters": { - "id": 592, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 591, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 598, - "src": "5362:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 590, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5362:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5361:6:0" - }, - "scope": 1340, - "src": "5316:96:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 610, - "nodeType": "Block", - "src": "5481:49:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 605, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "5498:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 607, - "indexExpression": { - "argumentTypes": null, - "id": 606, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 600, - "src": "5505:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5498:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 608, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "startBlock", - "nodeType": "MemberAccess", - "referencedDeclaration": 41, - "src": "5498:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 604, - "id": 609, - "nodeType": "Return", - "src": "5491:32:0" - } - ] - }, - "documentation": null, - "id": 611, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getStartBlock", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 601, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 600, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 611, - "src": "5441:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 599, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5441:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5440:13:0" - }, - "returnParameters": { - "id": 604, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 603, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 611, - "src": "5475:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 602, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5475:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5474:6:0" - }, - "scope": 1340, - "src": "5418:112:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 620, - "nodeType": "Block", - "src": "5587:43:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 617, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5617:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 616, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 644, - "src": "5604:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 618, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5604:19:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 615, - "id": 619, - "nodeType": "Return", - "src": "5597:26:0" - } - ] - }, - "documentation": null, - "id": 621, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 612, - "nodeType": "ParameterList", - "parameters": [], - "src": "5557:2:0" - }, - "returnParameters": { - "id": 615, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 614, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 621, - "src": "5581:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 613, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5581:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5580:6:0" - }, - "scope": 1340, - "src": "5536:94:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 630, - "nodeType": "Block", - "src": "5691:47:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 627, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "5721:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 626, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 644, - "src": "5708:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 628, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5708:23:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 625, - "id": 629, - "nodeType": "Return", - "src": "5701:30:0" - } - ] - }, - "documentation": null, - "id": 631, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 622, - "nodeType": "ParameterList", - "parameters": [], - "src": "5661:2:0" - }, - "returnParameters": { - "id": 625, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 624, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 631, - "src": "5685:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 623, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5685:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5684:6:0" - }, - "scope": 1340, - "src": "5636:102:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 643, - "nodeType": "Block", - "src": "5806:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 638, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "5823:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 640, - "indexExpression": { - "argumentTypes": null, - "id": 639, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 633, - "src": "5830:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "5823:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 641, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "rangeSize", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "5823:24:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 637, - "id": 642, - "nodeType": "Return", - "src": "5816:31:0" - } - ] - }, - "documentation": null, - "id": 644, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 634, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 633, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 644, - "src": "5766:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 632, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5766:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5765:13:0" - }, - "returnParameters": { - "id": 637, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 636, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 644, - "src": "5800:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 635, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5800:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5799:6:0" - }, - "scope": 1340, - "src": "5744:110:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 653, - "nodeType": "Block", - "src": "5907:39:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 650, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "5933:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 649, - "name": "getNonce", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 654, - 667 - ], - "referencedDeclaration": 667, - "src": "5924:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256) view returns (uint256)" - } - }, - "id": 651, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "5924:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 648, - "id": 652, - "nodeType": "Return", - "src": "5917:22:0" - } - ] - }, - "documentation": null, - "id": 654, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNonce", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 645, - "nodeType": "ParameterList", - "parameters": [], - "src": "5877:2:0" - }, - "returnParameters": { - "id": 648, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 647, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 654, - "src": "5901:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 646, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5901:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5900:6:0" - }, - "scope": 1340, - "src": "5860:86:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 666, - "nodeType": "Block", - "src": "6010:44:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 661, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6027:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 663, - "indexExpression": { - "argumentTypes": null, - "id": 662, - "name": "_epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 656, - "src": "6034:6:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6027:14:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 664, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "nonce", - "nodeType": "MemberAccess", - "referencedDeclaration": 43, - "src": "6027:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 660, - "id": 665, - "nodeType": "Return", - "src": "6020:27:0" - } - ] - }, - "documentation": null, - "id": 667, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNonce", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 657, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 656, - "name": "_epoch", - "nodeType": "VariableDeclaration", - "scope": 667, - "src": "5970:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 655, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "5970:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "5969:13:0" - }, - "returnParameters": { - "id": 660, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 659, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 667, - "src": "6004:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 658, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6004:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6003:6:0" - }, - "scope": 1340, - "src": "5952:102:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 677, - "nodeType": "Block", - "src": "6103:39:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 672, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6120:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 674, - "indexExpression": { - "argumentTypes": null, - "id": 673, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "6127:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6120:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 675, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "x", - "nodeType": "MemberAccess", - "referencedDeclaration": 45, - "src": "6120:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 671, - "id": 676, - "nodeType": "Return", - "src": "6113:22:0" - } - ] - }, - "documentation": null, - "id": 678, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getX", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 668, - "nodeType": "ParameterList", - "parameters": [], - "src": "6073:2:0" - }, - "returnParameters": { - "id": 671, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 670, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 678, - "src": "6097:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 669, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6097:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6096:6:0" - }, - "scope": 1340, - "src": "6060:82:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 688, - "nodeType": "Block", - "src": "6191:39:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 683, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6208:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 685, - "indexExpression": { - "argumentTypes": null, - "id": 684, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "6215:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6208:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 686, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "y", - "nodeType": "MemberAccess", - "referencedDeclaration": 47, - "src": "6208:15:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 682, - "id": 687, - "nodeType": "Return", - "src": "6201:22:0" - } - ] - }, - "documentation": null, - "id": 689, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getY", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 679, - "nodeType": "ParameterList", - "parameters": [], - "src": "6161:2:0" - }, - "returnParameters": { - "id": 682, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 681, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 689, - "src": "6185:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 680, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6185:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6184:6:0" - }, - "scope": 1340, - "src": "6148:82:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 727, - "nodeType": "Block", - "src": "6285:215:0", - "statements": [ - { - "assignments": [ - 697 - ], - "declarations": [ - { - "constant": false, - "id": 697, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 727, - "src": "6295:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 695, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6295:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 696, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6295:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 700, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 698, - "name": "getValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 780, - "src": "6325:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6325:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6295:45:0" - }, - { - "body": { - "id": 723, - "nodeType": "Block", - "src": "6390:86:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 717, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 712, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 697, - "src": "6408:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 714, - "indexExpression": { - "argumentTypes": null, - "id": 713, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6419:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6408:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 715, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "6425:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 716, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "6425:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "src": "6408:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 722, - "nodeType": "IfStatement", - "src": "6404:61:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 718, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6460:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6464:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6460:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 693, - "id": 721, - "nodeType": "Return", - "src": "6453:12:0" - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 708, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 705, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6367:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 706, - "name": "getParties", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 531, - 555 - ], - "referencedDeclaration": 531, - "src": "6371:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 707, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6371:12:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6367:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 724, - "initializationExpression": { - "assignments": [ - 702 - ], - "declarations": [ - { - "constant": false, - "id": 702, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 724, - "src": "6355:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 701, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6355:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 704, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 703, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6364:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6355:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 710, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6385:3:0", - "subExpression": { - "argumentTypes": null, - "id": 709, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 702, - "src": "6385:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 711, - "nodeType": "ExpressionStatement", - "src": "6385:3:0" - }, - "nodeType": "ForStatement", - "src": "6350:126:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 725, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6492:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 693, - "id": 726, - "nodeType": "Return", - "src": "6485:8:0" - } - ] - }, - "documentation": null, - "id": 728, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getPartyId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 690, - "nodeType": "ParameterList", - "parameters": [], - "src": "6255:2:0" - }, - "returnParameters": { - "id": 693, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 692, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 728, - "src": "6279:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 691, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6279:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6278:6:0" - }, - "scope": 1340, - "src": "6236:264:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 767, - "nodeType": "Block", - "src": "6568:214:0", - "statements": [ - { - "assignments": [ - 738 - ], - "declarations": [ - { - "constant": false, - "id": 738, - "name": "validators", - "nodeType": "VariableDeclaration", - "scope": 767, - "src": "6578:27:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6578:7:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 737, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6578:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 741, - "initialValue": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 739, - "name": "getNextValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "6608:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 740, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6608:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "6578:49:0" - }, - { - "body": { - "id": 763, - "nodeType": "Block", - "src": "6681:77:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 757, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 753, - "name": "validators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 738, - "src": "6699:10:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 755, - "indexExpression": { - "argumentTypes": null, - "id": 754, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6710:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6699:13:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 756, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 730, - "src": "6716:1:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "6699:18:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 762, - "nodeType": "IfStatement", - "src": "6695:52:0", - "trueBody": { - "expression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 760, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 758, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6742:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 759, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6746:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "6742:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 734, - "id": 761, - "nodeType": "Return", - "src": "6735:12:0" - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 746, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6654:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 747, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "6658:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "6658:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "6654:20:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 764, - "initializationExpression": { - "assignments": [ - 743 - ], - "declarations": [ - { - "constant": false, - "id": 743, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 764, - "src": "6642:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 742, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6642:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 745, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 744, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6651:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "6642:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "6676:3:0", - "subExpression": { - "argumentTypes": null, - "id": 750, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 743, - "src": "6676:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 752, - "nodeType": "ExpressionStatement", - "src": "6676:3:0" - }, - "nodeType": "ForStatement", - "src": "6637:121:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "30", - "id": 765, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "6774:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "functionReturnParameters": 734, - "id": 766, - "nodeType": "Return", - "src": "6767:8:0" - } - ] - }, - "documentation": null, - "id": 768, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextPartyId", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 731, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 730, - "name": "a", - "nodeType": "VariableDeclaration", - "scope": 768, - "src": "6530:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 729, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6530:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6529:11:0" - }, - "returnParameters": { - "id": 734, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 733, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 768, - "src": "6562:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 732, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "6562:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6561:6:0" - }, - "scope": 1340, - "src": "6506:276:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 779, - "nodeType": "Block", - "src": "6852:48:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 774, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6869:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 776, - "indexExpression": { - "argumentTypes": null, - "id": 775, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "6876:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6869:13:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 777, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "6869:24:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "functionReturnParameters": 773, - "id": 778, - "nodeType": "Return", - "src": "6862:31:0" - } - ] - }, - "documentation": null, - "id": 780, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getValidators", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 769, - "nodeType": "ParameterList", - "parameters": [], - "src": "6810:2:0" - }, - "returnParameters": { - "id": 773, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 772, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 780, - "src": "6834:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 770, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6834:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 771, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6834:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6833:18:0" - }, - "scope": 1340, - "src": "6788:112:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 791, - "nodeType": "Block", - "src": "6974:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 786, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "6991:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 788, - "indexExpression": { - "argumentTypes": null, - "id": 787, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "6998:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "6991:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 789, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "6991:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "functionReturnParameters": 785, - "id": 790, - "nodeType": "Return", - "src": "6984:35:0" - } - ] - }, - "documentation": null, - "id": 792, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getNextValidators", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 781, - "nodeType": "ParameterList", - "parameters": [], - "src": "6932:2:0" - }, - "returnParameters": { - "id": 785, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 784, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 792, - "src": "6956:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 782, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "6956:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 783, - "length": null, - "nodeType": "ArrayTypeName", - "src": "6956:9:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "6955:18:0" - }, - "scope": 1340, - "src": "6906:120:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 837, - "nodeType": "Block", - "src": "7093:296:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 800, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7115:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 801, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "START_VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7115:17:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 799, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1084, - "src": "7107:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 802, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7107:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 836, - "nodeType": "IfStatement", - "src": "7103:280:0", - "trueBody": { - "id": 835, - "nodeType": "Block", - "src": "7135:248:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 804, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "7149:11:0", - "subExpression": { - "argumentTypes": null, - "id": 803, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7149:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 805, - "nodeType": "ExpressionStatement", - "src": "7149:11:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 809, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 806, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "7174:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 807, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "7183:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 808, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7183:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "7174:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 810, - "nodeType": "ExpressionStatement", - "src": "7174:22:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 817, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 811, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7210:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 813, - "indexExpression": { - "argumentTypes": null, - "id": 812, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7217:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7210:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 814, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "threshold", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "7210:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 815, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 565, - "src": "7240:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 816, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7240:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7210:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 818, - "nodeType": "ExpressionStatement", - "src": "7210:44:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 825, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 819, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7268:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 821, - "indexExpression": { - "argumentTypes": null, - "id": 820, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7275:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7268:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 822, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "7268:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 823, - "name": "getValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 780, - "src": "7299:13:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 824, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7299:15:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "src": "7268:46:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 826, - "nodeType": "ExpressionStatement", - "src": "7268:46:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 827, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7328:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 829, - "indexExpression": { - "argumentTypes": null, - "id": 828, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7335:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7328:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 830, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "rangeSize", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "7328:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 831, - "name": "getRangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 621, - 644 - ], - "referencedDeclaration": 621, - "src": "7358:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7358:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "7328:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 834, - "nodeType": "ExpressionStatement", - "src": "7328:44:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 838, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 795, - "modifierName": { - "argumentTypes": null, - "id": 794, - "name": "readyOrVoting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 213, - "src": "7062:13:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7062:13:0" - }, - { - "arguments": null, - "id": 797, - "modifierName": { - "argumentTypes": null, - "id": 796, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7076:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7076:16:0" - } - ], - "name": "startVoting", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 793, - "nodeType": "ParameterList", - "parameters": [], - "src": "7052:2:0" - }, - "returnParameters": { - "id": 798, - "nodeType": "ParameterList", - "parameters": [], - "src": "7093:0:0" - }, - "scope": 1340, - "src": "7032:357:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 871, - "nodeType": "Block", - "src": "7471:202:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 852, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 849, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "7504:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 848, - "name": "getNextPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "7489:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7489:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 851, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7518:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7489:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416c726561647920612076616c696461746f72", - "id": 853, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7521:21:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_aeb0fe100da2796aa6136a3b1c66282f002b435141be331237dfa7127e6df6ff", - "typeString": "literal_string \"Already a validator\"" - }, - "value": "Already a validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_aeb0fe100da2796aa6136a3b1c66282f002b435141be331237dfa7127e6df6ff", - "typeString": "literal_string \"Already a validator\"" - } - ], - "id": 847, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "7481:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 854, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7481:62:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 855, - "nodeType": "ExpressionStatement", - "src": "7481:62:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 857, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7566:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "ADD_VALIDATOR", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7566:18:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 859, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "7586:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 856, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1109, - "src": "7558:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_address_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,address) returns (bool)" - } - }, - "id": 860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7558:38:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 870, - "nodeType": "IfStatement", - "src": "7554:113:0", - "trueBody": { - "id": 869, - "nodeType": "Block", - "src": "7598:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 866, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 840, - "src": "7646:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 861, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "7612:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 863, - "indexExpression": { - "argumentTypes": null, - "id": 862, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "7619:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "7612:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 864, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "7612:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "push", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7612:33:0", - "typeDescriptions": { - "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) returns (uint256)" - } - }, - "id": 867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7612:44:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 868, - "nodeType": "ExpressionStatement", - "src": "7612:44:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 872, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 843, - "modifierName": { - "argumentTypes": null, - "id": 842, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "7447:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7447:6:0" - }, - { - "arguments": null, - "id": 845, - "modifierName": { - "argumentTypes": null, - "id": 844, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7454:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7454:16:0" - } - ], - "name": "voteAddValidator", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 841, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 840, - "name": "validator", - "nodeType": "VariableDeclaration", - "scope": 872, - "src": "7421:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 839, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7421:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7420:19:0" - }, - "returnParameters": { - "id": 846, - "nodeType": "ParameterList", - "parameters": [], - "src": "7471:0:0" - }, - "scope": 1340, - "src": "7395:278:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 901, - "nodeType": "Block", - "src": "7758:192:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 886, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 883, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 874, - "src": "7791:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 882, - "name": "getNextPartyId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 768, - "src": "7776:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view returns (uint256)" - } - }, - "id": 884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7776:25:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "hexValue": "30", - "id": 885, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7805:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "7776:30:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "416c7265616479206e6f7420612076616c696461746f72", - "id": 887, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "7808:25:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2332ed568e8af3d64f1f2b0b098c504cab97ba4128fb9f08cfa3f851ced05961", - "typeString": "literal_string \"Already not a validator\"" - }, - "value": "Already not a validator" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2332ed568e8af3d64f1f2b0b098c504cab97ba4128fb9f08cfa3f851ced05961", - "typeString": "literal_string \"Already not a validator\"" - } - ], - "id": 881, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "7768:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7768:66:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 889, - "nodeType": "ExpressionStatement", - "src": "7768:66:0" - }, - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 891, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "7857:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "REMOVE_VALIDATOR", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "7857:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 893, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 874, - "src": "7880:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 890, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1109, - "src": "7849:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_address_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,address) returns (bool)" - } - }, - "id": 894, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7849:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 900, - "nodeType": "IfStatement", - "src": "7845:99:0", - "trueBody": { - "id": 899, - "nodeType": "Block", - "src": "7892:52:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 896, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 874, - "src": "7923:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 895, - "name": "_removeValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 967, - "src": "7906:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "7906:27:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 898, - "nodeType": "ExpressionStatement", - "src": "7906:27:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 902, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 877, - "modifierName": { - "argumentTypes": null, - "id": 876, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "7734:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7734:6:0" - }, - { - "arguments": null, - "id": 879, - "modifierName": { - "argumentTypes": null, - "id": 878, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "7741:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "7741:16:0" - } - ], - "name": "voteRemoveValidator", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 875, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 874, - "name": "validator", - "nodeType": "VariableDeclaration", - "scope": 902, - "src": "7708:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 873, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7708:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7707:19:0" - }, - "returnParameters": { - "id": 880, - "nodeType": "ParameterList", - "parameters": [], - "src": "7758:0:0" - }, - "scope": 1340, - "src": "7679:271:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 966, - "nodeType": "Block", - "src": "8009:383:0", - "statements": [ - { - "body": { - "id": 946, - "nodeType": "Block", - "src": "8067:205:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 920, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8085:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 922, - "indexExpression": { - "argumentTypes": null, - "id": 921, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8092:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8085:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 923, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8085:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 925, - "indexExpression": { - "argumentTypes": null, - "id": 924, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8114:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8085:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "id": 926, - "name": "validator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 904, - "src": "8120:9:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8085:44:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 945, - "nodeType": "IfStatement", - "src": "8081:181:0", - "trueBody": { - "id": 944, - "nodeType": "Block", - "src": "8131:131:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 941, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 928, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8149:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 930, - "indexExpression": { - "argumentTypes": null, - "id": 929, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8156:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8149:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 931, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8149:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 933, - "indexExpression": { - "argumentTypes": null, - "id": 932, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8178:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8149:31:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 934, - "name": "getNextValidators", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 792, - "src": "8183:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view returns (address[] memory)" - } - }, - "id": 935, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8183:19:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 940, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 939, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 936, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "8203:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 937, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8203:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 938, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8222:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "8203:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8183:41:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "8149:75:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 942, - "nodeType": "ExpressionStatement", - "src": "8149:75:0" - }, - { - "id": 943, - "nodeType": "Break", - "src": "8242:5:0" - } - ] - } - } - ] - }, - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 916, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 911, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8036:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 915, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 912, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "8040:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 913, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8040:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 914, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8059:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "8040:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8036:24:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 947, - "initializationExpression": { - "assignments": [ - 908 - ], - "declarations": [ - { - "constant": false, - "id": 908, - "name": "i", - "nodeType": "VariableDeclaration", - "scope": 947, - "src": "8024:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 907, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8024:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 910, - "initialValue": { - "argumentTypes": null, - "hexValue": "30", - "id": 909, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8033:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "8024:10:0" - }, - "loopExpression": { - "expression": { - "argumentTypes": null, - "id": 918, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "8062:3:0", - "subExpression": { - "argumentTypes": null, - "id": 917, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 908, - "src": "8062:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 919, - "nodeType": "ExpressionStatement", - "src": "8062:3:0" - }, - "nodeType": "ForStatement", - "src": "8019:253:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 957, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "delete", - "prefix": true, - "src": "8281:57:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 948, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8288:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 950, - "indexExpression": { - "argumentTypes": null, - "id": 949, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8295:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8288:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 951, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8288:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 956, - "indexExpression": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 955, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 952, - "name": "getNextParties", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 541, - "src": "8317:14:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 953, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8317:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": { - "argumentTypes": null, - "hexValue": "31", - "id": 954, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "8336:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "src": "8317:20:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "8288:50:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 958, - "nodeType": "ExpressionStatement", - "src": "8281:57:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 964, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "8348:37:0", - "subExpression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 959, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8348:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 961, - "indexExpression": { - "argumentTypes": null, - "id": 960, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8355:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8348:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 962, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberName": "validators", - "nodeType": "MemberAccess", - "referencedDeclaration": 35, - "src": "8348:28:0", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage", - "typeString": "address[] storage ref" - } - }, - "id": 963, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "length", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8348:35:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 965, - "nodeType": "ExpressionStatement", - "src": "8348:37:0" - } - ] - }, - "documentation": null, - "id": 967, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_removeValidator", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 905, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 904, - "name": "validator", - "nodeType": "VariableDeclaration", - "scope": 967, - "src": "7982:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 903, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "7982:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "7981:19:0" - }, - "returnParameters": { - "id": 906, - "nodeType": "ParameterList", - "parameters": [], - "src": "8009:0:0" - }, - "scope": 1340, - "src": "7956:436:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 990, - "nodeType": "Block", - "src": "8474:127:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 977, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "8496:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 978, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CHANGE_THRESHOLD", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8496:21:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 979, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 969, - "src": "8519:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 976, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1134, - "src": "8488:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,uint256) returns (bool)" - } - }, - "id": 980, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8488:41:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 989, - "nodeType": "IfStatement", - "src": "8484:111:0", - "trueBody": { - "id": 988, - "nodeType": "Block", - "src": "8531:64:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 981, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8545:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 983, - "indexExpression": { - "argumentTypes": null, - "id": 982, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8552:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8545:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 984, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "threshold", - "nodeType": "MemberAccess", - "referencedDeclaration": 37, - "src": "8545:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 985, - "name": "threshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 969, - "src": "8575:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8545:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 987, - "nodeType": "ExpressionStatement", - "src": "8545:39:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 991, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 972, - "modifierName": { - "argumentTypes": null, - "id": 971, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "8450:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8450:6:0" - }, - { - "arguments": null, - "id": 974, - "modifierName": { - "argumentTypes": null, - "id": 973, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8457:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8457:16:0" - } - ], - "name": "voteChangeThreshold", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 970, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 969, - "name": "threshold", - "nodeType": "VariableDeclaration", - "scope": 991, - "src": "8427:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 968, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8427:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8426:16:0" - }, - "returnParameters": { - "id": 975, - "nodeType": "ParameterList", - "parameters": [], - "src": "8474:0:0" - }, - "scope": 1340, - "src": "8398:203:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1014, - "nodeType": "Block", - "src": "8683:128:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1001, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "8705:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 1002, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CHANGE_RANGE_SIZE", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8705:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1003, - "name": "rangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "8729:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1000, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1134, - "src": "8697:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote,uint256) returns (bool)" - } - }, - "id": 1004, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8697:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1013, - "nodeType": "IfStatement", - "src": "8693:112:0", - "trueBody": { - "id": 1012, - "nodeType": "Block", - "src": "8741:64:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1010, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1005, - "name": "states", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "8755:6:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_State_$48_storage_$", - "typeString": "mapping(uint256 => struct Bridge.State storage ref)" - } - }, - "id": 1007, - "indexExpression": { - "argumentTypes": null, - "id": 1006, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8762:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "8755:17:0", - "typeDescriptions": { - "typeIdentifier": "t_struct$_State_$48_storage", - "typeString": "struct Bridge.State storage ref" - } - }, - "id": 1008, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "memberName": "rangeSize", - "nodeType": "MemberAccess", - "referencedDeclaration": 39, - "src": "8755:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "id": 1009, - "name": "rangeSize", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 993, - "src": "8785:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "8755:39:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1011, - "nodeType": "ExpressionStatement", - "src": "8755:39:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1015, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 996, - "modifierName": { - "argumentTypes": null, - "id": 995, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "8659:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8659:6:0" - }, - { - "arguments": null, - "id": 998, - "modifierName": { - "argumentTypes": null, - "id": 997, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8666:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8666:16:0" - } - ], - "name": "voteChangeRangeSize", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 994, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 993, - "name": "rangeSize", - "nodeType": "VariableDeclaration", - "scope": 1015, - "src": "8636:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 992, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "8636:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "8635:16:0" - }, - "returnParameters": { - "id": 999, - "nodeType": "ParameterList", - "parameters": [], - "src": "8683:0:0" - }, - "scope": 1340, - "src": "8607:204:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1038, - "nodeType": "Block", - "src": "8875:141:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1023, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "8897:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 1024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "START_KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8897:17:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 1022, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1084, - "src": "8889:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 1025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8889:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1037, - "nodeType": "IfStatement", - "src": "8885:125:0", - "trueBody": { - "id": 1036, - "nodeType": "Block", - "src": "8917:93:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1029, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1026, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "8931:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1027, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "8940:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 1028, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "8940:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "8931:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 1030, - "nodeType": "ExpressionStatement", - "src": "8931:22:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1032, - "name": "epoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 92, - "src": "8982:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1033, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "8989:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1031, - "name": "NewEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "8973:8:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$returns$__$", - "typeString": "function (uint256,uint256)" - } - }, - "id": 1034, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "8973:26:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1035, - "nodeType": "EmitStatement", - "src": "8968:31:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1039, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1018, - "modifierName": { - "argumentTypes": null, - "id": 1017, - "name": "voting", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 225, - "src": "8851:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8851:6:0" - }, - { - "arguments": null, - "id": 1020, - "modifierName": { - "argumentTypes": null, - "id": 1019, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "8858:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "8858:16:0" - } - ], - "name": "voteStartKeygen", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1016, - "nodeType": "ParameterList", - "parameters": [], - "src": "8841:2:0" - }, - "returnParameters": { - "id": 1021, - "nodeType": "ParameterList", - "parameters": [], - "src": "8875:0:0" - }, - "scope": 1340, - "src": "8817:199:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1061, - "nodeType": "Block", - "src": "9081:144:0", - "statements": [ - { - "condition": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1047, - "name": "Vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 64, - "src": "9103:4:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Vote_$64_$", - "typeString": "type(enum Bridge.Vote)" - } - }, - "id": 1048, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "CANCEL_KEYGEN", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9103:18:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - ], - "id": 1046, - "name": "tryVote", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 1084, - 1109, - 1134, - 1164 - ], - "referencedDeclaration": 1084, - "src": "9095:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_Vote_$64_$returns$_t_bool_$", - "typeString": "function (enum Bridge.Vote) returns (bool)" - } - }, - "id": 1049, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9095:27:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 1060, - "nodeType": "IfStatement", - "src": "9091:128:0", - "trueBody": { - "id": 1059, - "nodeType": "Block", - "src": "9124:95:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1053, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 1050, - "name": "status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "9138:6:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1051, - "name": "Status", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 53, - "src": "9147:6:0", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_enum$_Status_$53_$", - "typeString": "type(enum Bridge.Status)" - } - }, - "id": 1052, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "VOTING", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9147:13:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "src": "9138:22:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Status_$53", - "typeString": "enum Bridge.Status" - } - }, - "id": 1054, - "nodeType": "ExpressionStatement", - "src": "9138:22:0" - }, - { - "eventCall": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1056, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9198:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 1055, - "name": "NewEpochCancelled", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "9180:17:0", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 1057, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9180:28:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1058, - "nodeType": "EmitStatement", - "src": "9175:33:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1062, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": null, - "id": 1042, - "modifierName": { - "argumentTypes": null, - "id": 1041, - "name": "keygen", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 237, - "src": "9057:6:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9057:6:0" - }, - { - "arguments": null, - "id": 1044, - "modifierName": { - "argumentTypes": null, - "id": 1043, - "name": "currentValidator", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 261, - "src": "9064:16:0", - "typeDescriptions": { - "typeIdentifier": "t_modifier$__$", - "typeString": "modifier ()" - } - }, - "nodeType": "ModifierInvocation", - "src": "9064:16:0" - } - ], - "name": "voteCancelKeygen", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1040, - "nodeType": "ParameterList", - "parameters": [], - "src": "9047:2:0" - }, - "returnParameters": { - "id": 1045, - "nodeType": "ParameterList", - "parameters": [], - "src": "9081:0:0" - }, - "scope": 1340, - "src": "9022:203:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "public" - }, - { - "body": { - "id": 1083, - "nodeType": "Block", - "src": "9286:110:0", - "statements": [ - { - "assignments": [ - 1070 - ], - "declarations": [ - { - "constant": false, - "id": 1070, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1083, - "src": "9296:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1069, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9296:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1078, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1074, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1064, - "src": "9338:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1075, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9348:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1072, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9321:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1073, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9321:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1076, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9321:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1071, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9311:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1077, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9311:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9296:63:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1080, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1070, - "src": "9384:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1079, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9376:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1081, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9376:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1068, - "id": 1082, - "nodeType": "Return", - "src": "9369:20:0" - } - ] - }, - "documentation": null, - "id": 1084, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1065, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1064, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1084, - "src": "9248:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1063, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9248:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9247:15:0" - }, - "returnParameters": { - "id": 1068, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1067, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1084, - "src": "9280:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1066, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9280:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9279:6:0" - }, - "scope": 1340, - "src": "9231:165:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1108, - "nodeType": "Block", - "src": "9471:116:0", - "statements": [ - { - "assignments": [ - 1094 - ], - "declarations": [ - { - "constant": false, - "id": 1094, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1108, - "src": "9481:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1093, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9481:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1103, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1098, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1086, - "src": "9523:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1099, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9533:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1100, - "name": "addr", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1088, - "src": "9544:4:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 1096, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9506:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1097, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9506:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1101, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9506:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1095, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9496:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1102, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9496:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9481:69:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1105, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1094, - "src": "9575:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1104, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9567:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9567:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1092, - "id": 1107, - "nodeType": "Return", - "src": "9560:20:0" - } - ] - }, - "documentation": null, - "id": 1109, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1089, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1086, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1109, - "src": "9419:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1085, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9419:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1088, - "name": "addr", - "nodeType": "VariableDeclaration", - "scope": 1109, - "src": "9434:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1087, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9434:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9418:29:0" - }, - "returnParameters": { - "id": 1092, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1091, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1109, - "src": "9465:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1090, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9465:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9464:6:0" - }, - "scope": 1340, - "src": "9402:185:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1133, - "nodeType": "Block", - "src": "9658:115:0", - "statements": [ - { - "assignments": [ - 1119 - ], - "declarations": [ - { - "constant": false, - "id": 1119, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1133, - "src": "9668:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1118, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9668:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1128, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1123, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1111, - "src": "9710:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1124, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "9720:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1125, - "name": "num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1113, - "src": "9731:3:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1121, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9693:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1122, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9693:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1126, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9693:42:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1120, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9683:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1127, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9683:53:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9668:68:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1130, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1119, - "src": "9761:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1129, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9753:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9753:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1117, - "id": 1132, - "nodeType": "Return", - "src": "9746:20:0" - } - ] - }, - "documentation": null, - "id": 1134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1114, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1111, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1134, - "src": "9610:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1110, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9610:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1113, - "name": "num", - "nodeType": "VariableDeclaration", - "scope": 1134, - "src": "9625:8:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1112, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9625:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9609:25:0" - }, - "returnParameters": { - "id": 1117, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1116, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1134, - "src": "9652:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1115, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9652:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9651:6:0" - }, - "scope": 1340, - "src": "9593:180:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1163, - "nodeType": "Block", - "src": "9872:116:0", - "statements": [ - { - "assignments": [ - 1148 - ], - "declarations": [ - { - "constant": false, - "id": 1148, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1163, - "src": "9882:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1147, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9882:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1158, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1152, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1136, - "src": "9924:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1153, - "name": "hash", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1138, - "src": "9934:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "id": 1154, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1140, - "src": "9940:2:0", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 1155, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1142, - "src": "9944:5:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1150, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "9907:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1151, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "9907:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1156, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9907:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1149, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "9897:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1157, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9897:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "9882:69:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1160, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1148, - "src": "9976:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1159, - "name": "putVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1268, - "src": "9968:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1161, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "9968:13:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1146, - "id": 1162, - "nodeType": "Return", - "src": "9961:20:0" - } - ] - }, - "documentation": null, - "id": 1164, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1143, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1136, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9796:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1135, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "9796:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1138, - "name": "hash", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9811:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1137, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "9811:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1140, - "name": "to", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9825:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 1139, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "9825:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1142, - "name": "value", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9837:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1141, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "9837:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9795:53:0" - }, - "returnParameters": { - "id": 1146, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1145, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1164, - "src": "9866:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1144, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "9866:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "9865:6:0" - }, - "scope": 1340, - "src": "9779:209:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1185, - "nodeType": "Block", - "src": "10052:113:0", - "statements": [ - { - "assignments": [ - 1172 - ], - "declarations": [ - { - "constant": false, - "id": 1172, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1185, - "src": "10062:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1171, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10062:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1180, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1176, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1166, - "src": "10104:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1177, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "10114:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1174, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "10087:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1175, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10087:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1178, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10087:37:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1173, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "10077:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1179, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10077:48:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10062:63:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1182, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1172, - "src": "10153:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1181, - "name": "putConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1322, - "src": "10142:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1183, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10142:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1170, - "id": 1184, - "nodeType": "Return", - "src": "10135:23:0" - } - ] - }, - "documentation": null, - "id": 1186, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryConfirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1167, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1166, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1186, - "src": "10014:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1165, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "10014:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10013:15:0" - }, - "returnParameters": { - "id": 1170, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1169, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1186, - "src": "10046:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1168, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10046:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10045:6:0" - }, - "scope": 1340, - "src": "9994:171:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1213, - "nodeType": "Block", - "src": "10245:119:0", - "statements": [ - { - "assignments": [ - 1198 - ], - "declarations": [ - { - "constant": false, - "id": 1198, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1213, - "src": "10255:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1197, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10255:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1208, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1202, - "name": "voteType", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1188, - "src": "10297:8:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - { - "argumentTypes": null, - "id": 1203, - "name": "nextEpoch", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 94, - "src": "10307:9:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1204, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1190, - "src": "10318:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 1205, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1192, - "src": "10321:1:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 1200, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "10280:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1201, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "10280:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1206, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10280:43:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1199, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "10270:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10270:54:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10255:69:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1210, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1198, - "src": "10352:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1209, - "name": "putConfirm", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1322, - "src": "10341:10:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$returns$_t_bool_$", - "typeString": "function (bytes32) returns (bool)" - } - }, - "id": 1211, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10341:16:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 1196, - "id": 1212, - "nodeType": "Return", - "src": "10334:23:0" - } - ] - }, - "documentation": null, - "id": 1214, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "tryConfirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1193, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1188, - "name": "voteType", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10191:13:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - }, - "typeName": { - "contractScope": null, - "id": 1187, - "name": "Vote", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 64, - "src": "10191:4:0", - "typeDescriptions": { - "typeIdentifier": "t_enum$_Vote_$64", - "typeString": "enum Bridge.Vote" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1190, - "name": "x", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10206:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1189, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10206:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 1192, - "name": "y", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10214:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1191, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "10214:4:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10190:31:0" - }, - "returnParameters": { - "id": 1196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1195, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1214, - "src": "10239:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1194, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10239:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10238:6:0" - }, - "scope": 1340, - "src": "10171:193:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1267, - "nodeType": "Block", - "src": "10424:355:0", - "statements": [ - { - "assignments": [ - 1222 - ], - "declarations": [ - { - "constant": false, - "id": 1222, - "name": "personalVote", - "nodeType": "VariableDeclaration", - "scope": 1267, - "src": "10434:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1221, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10434:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1226, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1224, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10473:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1223, - "name": "personalizeVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1339, - "src": "10457:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", - "typeString": "function (bytes32) view returns (bytes32)" - } - }, - "id": 1225, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10457:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10434:44:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10496:20:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1228, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10497:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1230, - "indexExpression": { - "argumentTypes": null, - "id": 1229, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1222, - "src": "10503:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10497:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "566f74656420616c7265616479", - "id": 1232, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10518:15:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_230c30109b60c15b21799291aaf5c571045da3dc3f224d8bbd2f2e688c149a47", - "typeString": "literal_string \"Voted already\"" - }, - "value": "Voted already" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_230c30109b60c15b21799291aaf5c571045da3dc3f224d8bbd2f2e688c149a47", - "typeString": "literal_string \"Voted already\"" - } - ], - "id": 1227, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "10488:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10488:46:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1234, - "nodeType": "ExpressionStatement", - "src": "10488:46:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1239, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1235, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10545:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1237, - "indexExpression": { - "argumentTypes": null, - "id": 1236, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1222, - "src": "10551:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10545:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1238, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10567:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10545:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1240, - "nodeType": "ExpressionStatement", - "src": "10545:26:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1246, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1241, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "10585:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1243, - "indexExpression": { - "argumentTypes": null, - "id": 1242, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10596:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10585:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1244, - "name": "getThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 565, - 588 - ], - "referencedDeclaration": 565, - "src": "10605:12:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1245, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10605:14:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "10585:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1265, - "nodeType": "Block", - "src": "10704:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1261, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "10718:18:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1258, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "10718:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1260, - "indexExpression": { - "argumentTypes": null, - "id": 1259, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10729:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10718:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1262, - "nodeType": "ExpressionStatement", - "src": "10718:18:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1263, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10757:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1220, - "id": 1264, - "nodeType": "Return", - "src": "10750:12:0" - } - ] - }, - "id": 1266, - "nodeType": "IfStatement", - "src": "10581:192:0", - "trueBody": { - "id": 1257, - "nodeType": "Block", - "src": "10621:77:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1253, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1247, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "10635:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1249, - "indexExpression": { - "argumentTypes": null, - "id": 1248, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1216, - "src": "10646:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10635:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - }, - "id": 1252, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1250, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10654:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 1251, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10659:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "10654:8:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - } - }, - "src": "10635:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1254, - "nodeType": "ExpressionStatement", - "src": "10635:27:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1255, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10683:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1220, - "id": 1256, - "nodeType": "Return", - "src": "10676:11:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1268, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "putVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1217, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1216, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1268, - "src": "10387:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1215, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10387:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10386:14:0" - }, - "returnParameters": { - "id": 1220, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1219, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1268, - "src": "10418:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1218, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10418:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10417:6:0" - }, - "scope": 1340, - "src": "10370:409:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1321, - "nodeType": "Block", - "src": "10842:363:0", - "statements": [ - { - "assignments": [ - 1276 - ], - "declarations": [ - { - "constant": false, - "id": 1276, - "name": "personalVote", - "nodeType": "VariableDeclaration", - "scope": 1321, - "src": "10852:20:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1275, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10852:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 1280, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1278, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "10891:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - ], - "id": 1277, - "name": "personalizeVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1339, - "src": "10875:15:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bytes32_$", - "typeString": "function (bytes32) view returns (bytes32)" - } - }, - "id": 1279, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10875:21:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "10852:44:0" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1285, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "!", - "prefix": true, - "src": "10914:20:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1282, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10915:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1284, - "indexExpression": { - "argumentTypes": null, - "id": 1283, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1276, - "src": "10921:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "10915:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "436f6e6669726d656420616c7265616479", - "id": 1286, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10936:19:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_762a97ce67d271844ad9c09d89a5271fde7fe7537af208da055a904cd67ac7bc", - "typeString": "literal_string \"Confirmed already\"" - }, - "value": "Confirmed already" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_762a97ce67d271844ad9c09d89a5271fde7fe7537af208da055a904cd67ac7bc", - "typeString": "literal_string \"Confirmed already\"" - } - ], - "id": 1281, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 13091, - 13092 - ], - "referencedDeclaration": 13092, - "src": "10906:7:0", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 1287, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "10906:50:0", - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 1288, - "nodeType": "ExpressionStatement", - "src": "10906:50:0" - }, - { - "expression": { - "argumentTypes": null, - "id": 1293, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1289, - "name": "votes", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 84, - "src": "10967:5:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_bool_$", - "typeString": "mapping(bytes32 => bool)" - } - }, - "id": 1291, - "indexExpression": { - "argumentTypes": null, - "id": 1290, - "name": "personalVote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1276, - "src": "10973:12:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "10967:19:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1292, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "10989:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "10967:26:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 1294, - "nodeType": "ExpressionStatement", - "src": "10967:26:0" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 1300, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1295, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "11007:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1297, - "indexExpression": { - "argumentTypes": null, - "id": 1296, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "11018:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "11007:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 1298, - "name": "getNextThreshold", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 575, - "src": "11027:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 1299, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11027:18:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "11007:38:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": { - "id": 1319, - "nodeType": "Block", - "src": "11130:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1315, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "11144:18:0", - "subExpression": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1312, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "11144:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1314, - "indexExpression": { - "argumentTypes": null, - "id": 1313, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "11155:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11144:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1316, - "nodeType": "ExpressionStatement", - "src": "11144:18:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "66616c7365", - "id": 1317, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11183:5:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 1274, - "id": 1318, - "nodeType": "Return", - "src": "11176:12:0" - } - ] - }, - "id": 1320, - "nodeType": "IfStatement", - "src": "11003:196:0", - "trueBody": { - "id": 1311, - "nodeType": "Block", - "src": "11047:77:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 1307, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "baseExpression": { - "argumentTypes": null, - "id": 1301, - "name": "votesCount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 80, - "src": "11061:10:0", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_uint256_$", - "typeString": "mapping(bytes32 => uint256)" - } - }, - "id": 1303, - "indexExpression": { - "argumentTypes": null, - "id": 1302, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1270, - "src": "11072:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "11061:16:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - }, - "id": 1306, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "hexValue": "32", - "id": 1304, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11080:1:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": { - "argumentTypes": null, - "hexValue": "323535", - "id": 1305, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11085:3:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_255_by_1", - "typeString": "int_const 255" - }, - "value": "255" - }, - "src": "11080:8:0", - "typeDescriptions": { - "typeIdentifier": "t_rational_57896044618658097711785492504343953926634992332820282019728792003956564819968_by_1", - "typeString": "int_const 5789...(69 digits omitted)...9968" - } - }, - "src": "11061:27:0", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 1308, - "nodeType": "ExpressionStatement", - "src": "11061:27:0" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 1309, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "11109:4:0", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 1274, - "id": 1310, - "nodeType": "Return", - "src": "11102:11:0" - } - ] - } - } - ] - }, - "documentation": null, - "id": 1322, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "putConfirm", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1271, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1270, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1322, - "src": "10805:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1269, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "10805:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10804:14:0" - }, - "returnParameters": { - "id": 1274, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1273, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1322, - "src": "10836:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1272, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "10836:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "10835:6:0" - }, - "scope": 1340, - "src": "10785:420:0", - "stateMutability": "nonpayable", - "superFunction": null, - "visibility": "private" - }, - { - "body": { - "id": 1338, - "nodeType": "Block", - "src": "11281:69:0", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 1332, - "name": "vote", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1324, - "src": "11325:4:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "expression": { - "argumentTypes": null, - "id": 1333, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13088, - "src": "11331:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 1334, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11331:10:0", - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - ], - "expression": { - "argumentTypes": null, - "id": 1330, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13075, - "src": "11308:3:0", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 1331, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "referencedDeclaration": null, - "src": "11308:16:0", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 1335, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11308:34:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 1329, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 13082, - "src": "11298:9:0", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 1336, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "11298:45:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "functionReturnParameters": 1328, - "id": 1337, - "nodeType": "Return", - "src": "11291:52:0" - } - ] - }, - "documentation": null, - "id": 1339, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "personalizeVote", - "nodeType": "FunctionDefinition", - "parameters": { - "id": 1325, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1324, - "name": "vote", - "nodeType": "VariableDeclaration", - "scope": 1339, - "src": "11236:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1323, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11236:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11235:14:0" - }, - "returnParameters": { - "id": 1328, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1327, - "name": "", - "nodeType": "VariableDeclaration", - "scope": 1339, - "src": "11272:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 1326, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "11272:7:0", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "11271:9:0" - }, - "scope": 1340, - "src": "11211:139:0", - "stateMutability": "view", - "superFunction": null, - "visibility": "private" - } - ], - "scope": 1341, - "src": "93:11259:0" - } - ], - "src": "0:11353:0" - }, - "compiler": { - "name": "solc", - "version": "0.5.9+commit.e560f70d.Emscripten.clang" - }, - "networks": { - "44": { - "events": { - "0x3ef85928df9ae51bdb3eb4c00ec73b92b82307f319ac1b029de14796a0972609": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "oldEpoch", - "type": "uint256" - }, - { - "indexed": true, - "name": "newEpoch", - "type": "uint256" - } - ], - "name": "NewEpoch", - "type": "event", - "signature": "0x3ef85928df9ae51bdb3eb4c00ec73b92b82307f319ac1b029de14796a0972609" - }, - "0xddbb65cfe1ae4aec03cef0f9667c6d7ba3740927d0c60f4dd4d7104cc31d180a": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "epoch", - "type": "uint256" - } - ], - "name": "NewEpochCancelled", - "type": "event", - "signature": "0xddbb65cfe1ae4aec03cef0f9667c6d7ba3740927d0c60f4dd4d7104cc31d180a" - }, - "0xf4735b85cc98f9a712832825ecab4cfb1649d658f9a73c57a00ea7dde735c79b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "oldEpoch", - "type": "uint256" - }, - { - "indexed": true, - "name": "newEpoch", - "type": "uint256" - } - ], - "name": "NewFundsTransfer", - "type": "event", - "signature": "0xf4735b85cc98f9a712832825ecab4cfb1649d658f9a73c57a00ea7dde735c79b" - }, - "0xc33272939f066c227e913a4b3434d860794f185c551685c29451a3a38b9b259c": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "epoch", - "type": "uint256" - }, - { - "indexed": false, - "name": "x", - "type": "uint256" - }, - { - "indexed": false, - "name": "y", - "type": "uint256" - } - ], - "name": "EpochStart", - "type": "event", - "signature": "0xc33272939f066c227e913a4b3434d860794f185c551685c29451a3a38b9b259c" - }, - "0x62e1f484b3909b2c013673bad76a9f14b010600ba983f11ad26e83082883570e": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "ExchangeRequest", - "type": "event", - "signature": "0x62e1f484b3909b2c013673bad76a9f14b010600ba983f11ad26e83082883570e" - }, - "0x9273b6f22cee1ef3d7cdc2a9c031936003526bae368886259511f7dd40044b02": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "name": "value", - "type": "uint256" - }, - { - "indexed": false, - "name": "nonce", - "type": "uint256" - } - ], - "name": "ExchangeRequest", - "type": "event", - "signature": "0x9273b6f22cee1ef3d7cdc2a9c031936003526bae368886259511f7dd40044b02" - } - }, - "links": {}, - "address": "0x44c158FE850821ae69DaF37AADF5c539e9d0025B", - "transactionHash": "0x912e1b3c5341609e1d0c0cd5d81ff6b7d9b2e8f497bd393ea91af1a4038cba78" - } - }, - "schemaVersion": "3.0.11", - "updatedAt": "2019-10-28T13:22:54.868Z", - "devdoc": { - "methods": {} - }, - "userdoc": { - "methods": {} - } -} \ No newline at end of file diff --git a/src/oracle/ethWatcher/Dockerfile b/src/oracle/ethWatcher/Dockerfile index 5b67a29..9ca8e0f 100644 --- a/src/oracle/ethWatcher/Dockerfile +++ b/src/oracle/ethWatcher/Dockerfile @@ -10,6 +10,5 @@ COPY ./ethWatcher/package.json /watcher/ RUN npm install COPY ./ethWatcher/ethWatcher.js ./shared/db.js ./shared/logger.js ./shared/amqp.js ./shared/crypto.js ./shared/wait.js /watcher/ -COPY ./ethWatcher/Bridge.json /watcher/contracts_data/ ENTRYPOINT ["node", "ethWatcher.js"] diff --git a/src/oracle/ethWatcher/ethWatcher.js b/src/oracle/ethWatcher/ethWatcher.js index 23a83d6..f770fda 100644 --- a/src/oracle/ethWatcher/ethWatcher.js +++ b/src/oracle/ethWatcher/ethWatcher.js @@ -1,5 +1,4 @@ -const Web3 = require('web3') -const { utils } = require('ethers') +const ethers = require('ethers') const BN = require('bignumber.js') const axios = require('axios') @@ -9,15 +8,25 @@ const { connectRabbit, assertQueue } = require('./amqp') const { publicKeyToAddress } = require('./crypto') const { delay } = require('./wait') -const abiBridge = require('./contracts_data/Bridge.json').abi - const { HOME_RPC_URL, HOME_BRIDGE_ADDRESS, RABBITMQ_URL, HOME_START_BLOCK, VALIDATOR_PRIVATE_KEY } = process.env +const HOME_MAX_FETCH_RANGE_SIZE = parseInt(process.env.HOME_MAX_FETCH_RANGE_SIZE, 10) -const homeWeb3 = new Web3(HOME_RPC_URL) -const bridge = new homeWeb3.eth.Contract(abiBridge, HOME_BRIDGE_ADDRESS) -const validatorAddress = homeWeb3.eth.accounts.privateKeyToAccount(`0x${VALIDATOR_PRIVATE_KEY}`).address +const provider = new ethers.providers.JsonRpcProvider(HOME_RPC_URL) +const bridgeAbi = [ + 'event ExchangeRequest(uint value, uint nonce)', + 'event NewEpoch(uint indexed oldEpoch, uint indexed newEpoch)', + 'event NewEpochCancelled(uint indexed epoch)', + 'event NewFundsTransfer(uint indexed oldEpoch, uint indexed newEpoch)', + 'event EpochStart(uint indexed epoch, uint x, uint y)', + 'function getThreshold(uint epoch) view returns (uint)', + 'function getParties(uint epoch) view returns (uint)', + 'function getRangeSize() view returns (uint)', + 'function getValidators() view returns (address[])' +] +const bridge = new ethers.Contract(HOME_BRIDGE_ADDRESS, bridgeAbi, provider) +const validatorAddress = ethers.utils.computeAddress(`0x${VALIDATOR_PRIVATE_KEY}`) const foreignNonce = [] let channel @@ -25,6 +34,7 @@ let exchangeQueue let signQueue let keygenQueue let cancelKeygenQueue +let chainId let blockNumber let epoch let epochStart @@ -72,20 +82,18 @@ async function resetFutureMessages(queue) { } async function sendKeygen(event) { - const newEpoch = event.returnValues.newEpoch.toNumber() + const newEpoch = event.values.newEpoch.toNumber() keygenQueue.send({ epoch: newEpoch, blockNumber, - threshold: (await bridge.methods.getThreshold(newEpoch) - .call()).toNumber(), - parties: (await bridge.methods.getParties(newEpoch) - .call()).toNumber() + threshold: (await bridge.getThreshold(newEpoch)).toNumber(), + parties: (await bridge.getParties(newEpoch)).toNumber() }) logger.debug('Sent keygen start event') } function sendKeygenCancellation(event) { - const eventEpoch = event.returnValues.epoch.toNumber() + const eventEpoch = event.values.epoch.toNumber() cancelKeygenQueue.send({ epoch: eventEpoch, blockNumber @@ -94,36 +102,33 @@ function sendKeygenCancellation(event) { } async function sendSignFundsTransfer(event) { - const newEpoch = event.returnValues.newEpoch.toNumber() - const oldEpoch = event.returnValues.oldEpoch.toNumber() + const newEpoch = event.values.newEpoch.toNumber() + const oldEpoch = event.values.oldEpoch.toNumber() signQueue.send({ epoch: oldEpoch, blockNumber, newEpoch, nonce: foreignNonce[oldEpoch], - threshold: (await bridge.methods.getThreshold(oldEpoch) - .call()).toNumber(), - parties: (await bridge.methods.getParties(oldEpoch) - .call()).toNumber() + threshold: (await bridge.getThreshold(oldEpoch)).toNumber(), + parties: (await bridge.getParties(oldEpoch)).toNumber() }) logger.debug('Sent sign funds transfer event') foreignNonce[oldEpoch] += 1 redisTx.incr(`foreignNonce${oldEpoch}`) } -async function sendSign(event) { - const tx = await homeWeb3.eth.getTransaction(event.transactionHash) - const msg = utils.serializeTransaction({ +async function sendSign(event, transactionHash) { + const tx = await provider.getTransaction(transactionHash) + const msg = ethers.utils.serializeTransaction({ nonce: tx.nonce, - gasPrice: `0x${new BN(tx.gasPrice).toString(16)}`, - gasLimit: `0x${new BN(tx.gas).toString(16)}`, + gasPrice: tx.gasPrice, + gasLimit: tx.gasLimit, to: tx.to, - value: `0x${new BN(tx.value).toString(16)}`, - data: tx.input, - chainId: await homeWeb3.eth.net.getId() + data: tx.data, + chainId }) - const hash = homeWeb3.utils.sha3(msg) - const publicKey = utils.recoverPublicKey(hash, { + const hash = ethers.utils.keccak256(msg) + const publicKey = ethers.utils.recoverPublicKey(hash, { r: tx.r, s: tx.s, v: tx.v @@ -135,9 +140,8 @@ async function sendSign(event) { x: publicKey.substr(4, 64), y: publicKey.substr(68, 64) }), - value: (new BN(event.returnValues.value)).dividedBy(10 ** 18) - .toFixed(8, 3), - nonce: event.returnValues.nonce.toNumber() + value: (new BN(event.values.value)).dividedBy(10 ** 18).toFixed(8, 3), + nonce: event.values.nonce.toNumber() } exchangeQueue.send(msgToQueue) @@ -154,22 +158,19 @@ async function sendStartSign() { epoch, blockNumber, nonce: foreignNonce[epoch], - threshold: (await bridge.methods.getThreshold(epoch) - .call()).toNumber(), - parties: (await bridge.methods.getParties(epoch) - .call()).toNumber() + threshold: (await bridge.getThreshold(epoch)).toNumber(), + parties: (await bridge.getParties(epoch)).toNumber() }) foreignNonce[epoch] += 1 } async function processEpochStart(event) { - epoch = event.returnValues.epoch.toNumber() + epoch = event.values.epoch.toNumber() epochStart = blockNumber logger.info(`Epoch ${epoch} started`) - rangeSize = (await bridge.methods.getRangeSize() - .call()).toNumber() - isCurrentValidator = (await bridge.methods.getValidators() - .call()).includes(validatorAddress) + rangeSize = (await bridge.getRangeSize()).toNumber() + isCurrentValidator = (await bridge.getValidators()) + .includes(validatorAddress) if (isCurrentValidator) { logger.info(`${validatorAddress} is a current validator`) } else { @@ -186,10 +187,16 @@ async function initialize() { keygenQueue = await assertQueue(channel, 'keygenQueue') cancelKeygenQueue = await assertQueue(channel, 'cancelKeygenQueue') - const events = await bridge.getPastEvents('EpochStart', { - fromBlock: 1 - }) - epoch = events.length ? events[events.length - 1].returnValues.epoch.toNumber() : 0 + chainId = (await provider.getNetwork()).chainId + + const events = (await provider.getLogs({ + address: HOME_BRIDGE_ADDRESS, + fromBlock: 1, + toBlock: 'latest', + topics: bridge.filters.EpochStart().topics + })).map((log) => bridge.interface.parseLog(log)) + + epoch = events.length ? events[events.length - 1].values.epoch.toNumber() : 0 logger.info(`Current epoch ${epoch}`) epochStart = events.length ? events[events.length - 1].blockNumber : 1 const saved = (parseInt(await redis.get('homeBlock'), 10) + 1) || parseInt(HOME_START_BLOCK, 10) @@ -206,10 +213,11 @@ async function initialize() { blockNumber = saved foreignNonce[epoch] = parseInt(await redis.get(`foreignNonce${epoch}`), 10) || 0 } - rangeSize = (await bridge.methods.getRangeSize().call()).toNumber() + rangeSize = (await bridge.getRangeSize()).toNumber() logger.debug(`Range size ${rangeSize}`) logger.debug('Checking if current validator') - isCurrentValidator = (await bridge.methods.getValidators().call()).includes(validatorAddress) + isCurrentValidator = (await bridge.getValidators()) + .includes(validatorAddress) if (isCurrentValidator) { logger.info(`${validatorAddress} is a current validator`) } else { @@ -226,60 +234,68 @@ async function initialize() { } async function loop() { - logger.debug(`Watching events in block #${blockNumber}`) - if (await homeWeb3.eth.getBlock(blockNumber) === null) { - logger.debug('No block') - await delay(1000) + const latestBlockNumber = await provider.getBlockNumber() + if (latestBlockNumber < blockNumber) { + logger.debug(`No block after ${latestBlockNumber}`) + await delay(2000) return } + const endBlock = Math.min(latestBlockNumber, blockNumber + HOME_MAX_FETCH_RANGE_SIZE - 1) + redisTx = redis.multi() - const bridgeEvents = await bridge.getPastEvents('allEvents', { + logger.debug(`Watching events in blocks #${blockNumber}-${endBlock}`) + + const bridgeEvents = (await provider.getLogs({ + address: HOME_BRIDGE_ADDRESS, fromBlock: blockNumber, - toBlock: blockNumber - }) + toBlock: endBlock, + topics: [] + })) - for (let i = 0; i < bridgeEvents.length; i += 1) { - const event = bridgeEvents[i] - switch (event.event) { - case 'NewEpoch': - await sendKeygen(event) - break - case 'NewEpochCancelled': - sendKeygenCancellation(event) - break - case 'NewFundsTransfer': - if (isCurrentValidator) { - await sendSignFundsTransfer(event) - } - break - case 'ExchangeRequest': - if (isCurrentValidator) { - await sendSign(event) - } - break - case 'EpochStart': - await processEpochStart(event) - break - default: - logger.warn('Unknown event %o', event) + for (let curBlockNumber = blockNumber, i = 0; curBlockNumber <= endBlock; curBlockNumber += 1) { + while (i < bridgeEvents.length && bridgeEvents[i].blockNumber === curBlockNumber) { + const event = bridge.interface.parseLog(bridgeEvents[i]) + logger.debug('%o %o', event, bridgeEvents[i]) + switch (event.name) { + case 'NewEpoch': + await sendKeygen(event) + break + case 'NewEpochCancelled': + sendKeygenCancellation(event) + break + case 'NewFundsTransfer': + if (isCurrentValidator) { + await sendSignFundsTransfer(event) + } + break + case 'ExchangeRequest': + if (isCurrentValidator) { + await sendSign(event, bridgeEvents[i].transactionHash) + } + break + case 'EpochStart': + await processEpochStart(event) + break + default: + logger.warn('Unknown event %o', event) + } + i += 1 + } + if ((curBlockNumber + 1 - epochStart) % rangeSize === 0) { + logger.info('Reached end of the current block range') + + if (lastTransactionBlockNumber > curBlockNumber - rangeSize) { + logger.info('Sending message to start signature generation for the ended range') + await sendStartSign() + } } } - if ((blockNumber + 1 - epochStart) % rangeSize === 0) { - logger.info('Reached end of the current block range') - - if (lastTransactionBlockNumber > blockNumber - rangeSize) { - logger.info('Sending message to start signature generation for the ended range') - await sendStartSign() - } - } - - blockNumber += 1 + blockNumber = endBlock + 1 // Exec redis tx - await redisTx.incr('homeBlock') - .exec() + await redisTx.incr('homeBlock').exec() await redis.save() } diff --git a/src/oracle/ethWatcher/package.json b/src/oracle/ethWatcher/package.json index 26ec5a6..a7517af 100644 --- a/src/oracle/ethWatcher/package.json +++ b/src/oracle/ethWatcher/package.json @@ -4,7 +4,6 @@ "dependencies": { "ioredis": "4.10.0", "amqplib": "0.5.3", - "web3": "1.0.0-beta.55", "ethers": "4.0.33", "bignumber.js": "9.0.0", "bech32": "1.1.3",