{
  "address": "0xf4e4eE67Ff6fe0ec4961Cd28CDc902649A371a01",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "voter",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "Claimed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint8",
          "name": "version",
          "type": "uint8"
        }
      ],
      "name": "Initialized",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IMajorCandidates",
          "name": "majorCandidates",
          "type": "address"
        }
      ],
      "name": "MajorCandidatesUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IRewarder",
          "name": "rewarder",
          "type": "address"
        }
      ],
      "name": "RewarderUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        }
      ],
      "name": "ShareUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IStake",
          "name": "stake",
          "type": "address"
        }
      ],
      "name": "StakeUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "contract IERC20",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "TokenUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "voter",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "Vote",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "period",
          "type": "uint256"
        }
      ],
      "name": "VoteFrozenPeriodUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "voter",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "Withdrawn",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "ACC_PRECISION",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "accPerShares",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        }
      ],
      "name": "claim",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract IERC20",
          "name": "_token",
          "type": "address"
        },
        {
          "internalType": "contract IRewarder",
          "name": "_rewarder",
          "type": "address"
        },
        {
          "internalType": "contract IStake",
          "name": "_stake",
          "type": "address"
        },
        {
          "internalType": "contract IMajorCandidates",
          "name": "_majorCandidates",
          "type": "address"
        }
      ],
      "name": "initialize",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "lastVoteTime",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "majorCandidates",
      "outputs": [
        {
          "internalType": "contract IMajorCandidates",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "onAllocate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "voter",
          "type": "address"
        }
      ],
      "name": "pendingReward",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "pending",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "rewarder",
      "outputs": [
        {
          "internalType": "contract IRewarder",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "stake",
      "outputs": [
        {
          "internalType": "contract IStake",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "token",
      "outputs": [
        {
          "internalType": "contract IERC20",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "voter",
          "type": "address"
        }
      ],
      "name": "unfrozenAt",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "voter",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "anchor",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "maxSlippage",
          "type": "uint256"
        }
      ],
      "name": "vote",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "voteFrozenPeriod",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "voteSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "voters",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "int256",
          "name": "rewardDebt",
          "type": "int256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "anchor",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "maxSlippage",
          "type": "uint256"
        }
      ],
      "name": "withdraw",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "candidate",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "anchor",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "maxSlippage",
          "type": "uint256"
        }
      ],
      "name": "withdrawAndClaim",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "transactionHash": "0x4b88ff5286597b7aed35a01a443d31fb5adc3fae3add98c4effef9a3ed1cd666",
  "receipt": {
    "to": null,
    "from": "0xF1658C608708172655A8e70a1624c29F956Ee63D",
    "contractAddress": "0xf4e4eE67Ff6fe0ec4961Cd28CDc902649A371a01",
    "transactionIndex": 33,
    "gasUsed": "1570781",
    "logsBloom": "0x00000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000008000000000000000000000010000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000080000000000000000000000000000000000000000004000000000000000000001200000000100000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000",
    "blockHash": "0xd19309ff5f3596c152a3865b1167d6ac6fe25e0c188c078f63b284b19d8fb8e9",
    "transactionHash": "0x4b88ff5286597b7aed35a01a443d31fb5adc3fae3add98c4effef9a3ed1cd666",
    "logs": [
      {
        "transactionIndex": 33,
        "blockNumber": 28316099,
        "transactionHash": "0x4b88ff5286597b7aed35a01a443d31fb5adc3fae3add98c4effef9a3ed1cd666",
        "address": "0x0000000000000000000000000000000000001010",
        "topics": [
          "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
          "0x0000000000000000000000000000000000000000000000000000000000001010",
          "0x000000000000000000000000f1658c608708172655a8e70a1624c29f956ee63d",
          "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484"
        ],
        "data": "0x000000000000000000000000000000000000000000000000000df38ae27f628a00000000000000000000000000000000000000000000000049d152a03725a9770000000000000000000000000000000000000000000000007136eda96a4aacfc00000000000000000000000000000000000000000000000049c35f1554a646ed0000000000000000000000000000000000000000000000007144e1344cca0f86",
        "logIndex": 204,
        "blockHash": "0xd19309ff5f3596c152a3865b1167d6ac6fe25e0c188c078f63b284b19d8fb8e9"
      }
    ],
    "blockNumber": 28316099,
    "cumulativeGasUsed": "8144110",
    "status": 1,
    "byzantium": true
  },
  "args": [],
  "numDeployments": 1,
  "solcInputHash": "28a0b0bba0d34a2e0f97b06f2c3c6d0b",
  "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IMajorCandidates\",\"name\":\"majorCandidates\",\"type\":\"address\"}],\"name\":\"MajorCandidatesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IRewarder\",\"name\":\"rewarder\",\"type\":\"address\"}],\"name\":\"RewarderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"}],\"name\":\"ShareUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IStake\",\"name\":\"stake\",\"type\":\"address\"}],\"name\":\"StakeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Vote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"period\",\"type\":\"uint256\"}],\"name\":\"VoteFrozenPeriodUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ACC_PRECISION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accPerShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"contract IRewarder\",\"name\":\"_rewarder\",\"type\":\"address\"},{\"internalType\":\"contract IStake\",\"name\":\"_stake\",\"type\":\"address\"},{\"internalType\":\"contract IMajorCandidates\",\"name\":\"_majorCandidates\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"lastVoteTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"majorCandidates\",\"outputs\":[{\"internalType\":\"contract IMajorCandidates\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"onAllocate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"pendingReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"pending\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewarder\",\"outputs\":[{\"internalType\":\"contract IRewarder\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stake\",\"outputs\":[{\"internalType\":\"contract IStake\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"unfrozenAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"voter\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"anchor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"vote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"voteFrozenPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"voteSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"voters\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"rewardDebt\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"anchor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"candidate\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"anchor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maxSlippage\",\"type\":\"uint256\"}],\"name\":\"withdrawAndClaim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Alexandas\",\"details\":\"Election contract\",\"kind\":\"dev\",\"methods\":{\"claim(address,address)\":{\"details\":\"voter claim reward for a specific candidate\",\"params\":{\"candidate\":\"candidate address\",\"to\":\"receiver address\"}},\"initialize(address,address,address,address)\":{\"details\":\"proxy initialize function\",\"params\":{\"_majorCandidates\":\"`MajorCandidates` contract\",\"_rewarder\":\"`Rewarder` contract\",\"_stake\":\"`Stake` contract\",\"_token\":\"ERC20 token address\"}},\"onAllocate(address,uint256)\":{\"details\":\"candidate allocate reward for the voters\",\"params\":{\"amount\":\"reward amount\",\"candidate\":\"candidate address\"}},\"pendingReward(address,address)\":{\"details\":\"pending reward for a voter given a candidate\",\"params\":{\"candidate\":\"candidate address\",\"voter\":\"voter address\"},\"returns\":{\"pending\":\"pending reward\"}},\"vote(address,address,uint256,address,uint256)\":{\"details\":\"voter vote a specific candidate\",\"params\":{\"amount\":\"reward amount\",\"anchor\":\"anchor candidate address\",\"candidate\":\"candidate address\",\"maxSlippage\":\"maximum rank change value for the candidate from the anchor candidate\",\"voter\":\"voter address\"}},\"withdraw(address,uint256,address,address,uint256)\":{\"details\":\"voter withdraw reward for a specific candidate\",\"params\":{\"amount\":\"reward amount\",\"anchor\":\"anchor candidate address\",\"candidate\":\"candidate address\",\"maxSlippage\":\"maximum rank change value for the candidate from the anchor candidate\",\"to\":\"receiver address\"}},\"withdrawAndClaim(address,uint256,address,address,uint256)\":{\"details\":\"voter withdraw votes and claim reward for a specific candidate\",\"params\":{\"amount\":\"reward amount\",\"anchor\":\"anchor candidate address\",\"candidate\":\"candidate address\",\"maxSlippage\":\"maximum rank change value for the candidate from the anchor candidate\",\"to\":\"receiver address\"}}},\"stateVariables\":{\"ACC_PRECISION\":{\"details\":\"return precision for shares\"},\"accPerShares\":{\"details\":\"return shares for a specific candidate\"},\"lastVoteTime\":{\"details\":\"last vote timestamp for voter\"},\"majorCandidates\":{\"details\":\"return `MajorCandidates` contract address\"},\"rewarder\":{\"details\":\"return `Rewarder` contract address\"},\"stake\":{\"details\":\"return `Stake` contract address\"},\"token\":{\"details\":\"return ERC20 token address\"},\"voteFrozenPeriod\":{\"details\":\"vote frozen period\"},\"voteSupply\":{\"details\":\"return votes for a specific candidate\"},\"voters\":{\"details\":\"return voter inforamtion\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/election/Election.sol\":\"Election\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"yul\":false},\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n *     function initialize() initializer public {\\n *         __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n *     }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n *     function initializeV2() reinitializer(2) public {\\n *         __ERC20Permit_init(\\\"MyToken\\\");\\n *     }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n *     _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n    /**\\n     * @dev Indicates that the contract has been initialized.\\n     * @custom:oz-retyped-from bool\\n     */\\n    uint8 private _initialized;\\n\\n    /**\\n     * @dev Indicates that the contract is in the process of being initialized.\\n     */\\n    bool private _initializing;\\n\\n    /**\\n     * @dev Triggered when the contract has been initialized or reinitialized.\\n     */\\n    event Initialized(uint8 version);\\n\\n    /**\\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.\\n     */\\n    modifier initializer() {\\n        bool isTopLevelCall = !_initializing;\\n        require(\\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n            \\\"Initializable: contract is already initialized\\\"\\n        );\\n        _initialized = 1;\\n        if (isTopLevelCall) {\\n            _initializing = true;\\n        }\\n        _;\\n        if (isTopLevelCall) {\\n            _initializing = false;\\n            emit Initialized(1);\\n        }\\n    }\\n\\n    /**\\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n     * used to initialize parent contracts.\\n     *\\n     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n     * initialization step. This is essential to configure modules that are added through upgrades and that require\\n     * initialization.\\n     *\\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n     * a contract, executing them in the right order is up to the developer or operator.\\n     */\\n    modifier reinitializer(uint8 version) {\\n        require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n        _initialized = version;\\n        _initializing = true;\\n        _;\\n        _initializing = false;\\n        emit Initialized(version);\\n    }\\n\\n    /**\\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n     */\\n    modifier onlyInitializing() {\\n        require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n        _;\\n    }\\n\\n    /**\\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n     * through proxies.\\n     */\\n    function _disableInitializers() internal virtual {\\n        require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n        if (_initialized < type(uint8).max) {\\n            _initialized = type(uint8).max;\\n            emit Initialized(type(uint8).max);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuardUpgradeable is Initializable {\\n    // Booleans are more expensive than uint256 or any type that takes up a full\\n    // word because each write operation emits an extra SLOAD to first read the\\n    // slot's contents, replace the bits taken up by the boolean, and then write\\n    // back. This is the compiler's defense against contract upgrades and\\n    // pointer aliasing, and it cannot be disabled.\\n\\n    // The values being non-zero value makes deployment a bit more expensive,\\n    // but in exchange the refund on every call to nonReentrant will be lower in\\n    // amount. Since refunds are capped to a percentage of the total\\n    // transaction's gas, it is best to keep them low in cases like this one, to\\n    // increase the likelihood of the full refund coming into effect.\\n    uint256 private constant _NOT_ENTERED = 1;\\n    uint256 private constant _ENTERED = 2;\\n\\n    uint256 private _status;\\n\\n    function __ReentrancyGuard_init() internal onlyInitializing {\\n        __ReentrancyGuard_init_unchained();\\n    }\\n\\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev Prevents a contract from calling itself, directly or indirectly.\\n     * Calling a `nonReentrant` function from another `nonReentrant`\\n     * function is not supported. It is possible to prevent this from happening\\n     * by making the `nonReentrant` function external, and making it call a\\n     * `private` function that does the actual work.\\n     */\\n    modifier nonReentrant() {\\n        // On the first call to nonReentrant, _notEntered will be true\\n        require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n        // Any calls to nonReentrant after this point will fail\\n        _status = _ENTERED;\\n\\n        _;\\n\\n        // By storing the original value once again, a refund is triggered (see\\n        // https://eips.ethereum.org/EIPS/eip-2200)\\n        _status = _NOT_ENTERED;\\n    }\\n\\n    /**\\n     * @dev This empty reserved space is put in place to allow future versions to add new\\n     * variables without shifting down storage in the inheritance chain.\\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n     */\\n    uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x8cc03c5ac17e8a7396e487cda41fc1f1dfdb91db7d528e6da84bee3b6dd7e167\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20Upgradeable {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `from` to `to` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(\\n        address from,\\n        address to,\\n        uint256 amount\\n    ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x4e733d3164f73f461eaf9d8087a7ad1ea180bdc8ba0d3d61b0e1ae16d8e63dff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResult(success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            // Look for revert reason and bubble it up if present\\n            if (returndata.length > 0) {\\n                // The easiest way to bubble the revert reason is using memory via assembly\\n                /// @solidity memory-safe-assembly\\n                assembly {\\n                    let returndata_size := mload(returndata)\\n                    revert(add(32, returndata), returndata_size)\\n                }\\n            } else {\\n                revert(errorMessage);\\n            }\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\"},\"contracts/election/Election.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';\\nimport '../libraries/SignedSafeMath.sol';\\nimport '../interfaces/IElection.sol';\\n\\n/// @dev Election contract\\n/// @author Alexandas\\ncontract Election is IElection, ReentrancyGuardUpgradeable {\\n\\tusing SignedSafeMath for int256;\\n\\n\\tstruct VoterInfo {\\n\\t\\tuint256 amount;\\n\\t\\tint256 rewardDebt;\\n\\t}\\n\\n\\t/// @dev return ERC20 token address\\n\\tIERC20 public override token;\\n\\n\\t/// @dev return `Rewarder` contract address\\n\\tIRewarder public override rewarder;\\n\\n\\t/// @dev return `Stake` contract address\\n\\tIStake public override stake;\\n\\n\\t/// @dev return `MajorCandidates` contract address\\n\\tIMajorCandidates public override majorCandidates;\\n\\n\\t/// @dev return precision for shares\\n\\tuint256 public override ACC_PRECISION;\\n\\n\\t/// @dev vote frozen period\\n\\tuint256 public voteFrozenPeriod;\\n\\n\\t/// @dev return voter inforamtion\\n\\tmapping(address => mapping(address => VoterInfo)) public voters;\\n\\n\\t/// @dev return votes for a specific candidate\\n\\tmapping(address => uint256) public override voteSupply;\\n\\n\\t/// @dev return shares for a specific candidate\\n\\tmapping(address => uint256) public accPerShares;\\n\\n\\t/// @dev last vote timestamp for voter\\n\\tmapping(address => mapping(address => uint256)) public lastVoteTime;\\n\\n\\tmodifier onlyStake() {\\n\\t\\trequire(msg.sender == address(stake), 'Election: caller must be Stake contract');\\n\\t\\t_;\\n\\t}\\n\\n\\t/// @dev proxy initialize function\\n\\t/// @param _token ERC20 token address\\n\\t/// @param _rewarder `Rewarder` contract\\n\\t/// @param _stake `Stake` contract\\n\\t/// @param _majorCandidates `MajorCandidates` contract\\n\\tfunction initialize(\\n\\t\\tIERC20 _token,\\n\\t\\tIRewarder _rewarder,\\n\\t\\tIStake _stake,\\n\\t\\tIMajorCandidates _majorCandidates\\n\\t) external initializer {\\n\\t\\t_setToken(_token);\\n\\t\\t_setRewarder(_rewarder);\\n\\t\\t_setStake(_stake);\\n\\t\\t_setMajorCandidates(_majorCandidates);\\n\\t\\t_setVoteFrozenPeriod(7 * 24 * 3600);\\n\\t\\tACC_PRECISION = 1e12;\\n\\t}\\n\\n\\t/// @dev voter vote a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @param amount reward amount\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction vote(\\n\\t\\taddress candidate,\\n\\t\\taddress voter,\\n\\t\\tuint256 amount,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external override nonReentrant {\\n\\t\\trequire(stake.isCandidateRegistered(candidate), 'Election: nonexistent candidate');\\n\\t\\ttoken.transferFrom(msg.sender, address(this), amount);\\n\\t\\tstake.voterAllocate(candidate);\\n\\t\\tvoters[candidate][voter].amount = voters[candidate][voter].amount + amount;\\n\\t\\tvoters[candidate][voter].rewardDebt = voters[candidate][voter].rewardDebt + int256((amount * accPerShares[candidate]) / ACC_PRECISION);\\n\\t\\tvoteSupply[candidate] = voteSupply[candidate] + amount;\\n\\t\\tlastVoteTime[candidate][voter] = block.timestamp;\\n\\t\\tmajorCandidates.upsetCandidateWithAnchor(candidate, voteSupply[candidate], anchor, maxSlippage);\\n\\n\\t\\temit Vote(candidate, voter, amount);\\n\\t}\\n\\n\\t/// @dev voter claim reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param to receiver address\\n\\tfunction claim(address candidate, address to) external override nonReentrant {\\n\\t\\tstake.voterAllocate(candidate);\\n\\t\\tVoterInfo storage voter = voters[candidate][msg.sender];\\n\\t\\tint256 accumulated = int256((voter.amount * accPerShares[candidate]) / ACC_PRECISION);\\n\\t\\tuint256 pending = (accumulated - voter.rewardDebt).toUInt256();\\n\\t\\tvoter.rewardDebt = accumulated;\\n\\t\\trewarder.mint(to, pending);\\n\\t\\temit Claimed(candidate, msg.sender, to, pending);\\n\\t}\\n\\n\\t/// @dev voter withdraw reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param amount reward amount\\n\\t/// @param to receiver address\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction withdraw(\\n\\t\\taddress candidate,\\n\\t\\tuint256 amount,\\n\\t\\taddress to,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external override nonReentrant {\\n\\t\\trequire(unfrozenAt(candidate, msg.sender) > block.timestamp, 'Election: vote is frozen');\\n\\t\\tstake.voterAllocate(candidate);\\n\\t\\tVoterInfo storage voter = voters[candidate][msg.sender];\\n\\t\\tvoter.rewardDebt = voter.rewardDebt - int256((amount * accPerShares[candidate]) / ACC_PRECISION);\\n\\t\\tvoter.amount = voter.amount - amount;\\n\\t\\tvoteSupply[candidate] = voteSupply[candidate] - amount;\\n\\t\\tif (stake.isCandidateRegistered(candidate)) {\\n\\t\\t\\tmajorCandidates.upsetCandidateWithAnchor(candidate, voteSupply[candidate], anchor, maxSlippage);\\n\\t\\t}\\n\\t\\ttoken.transfer(to, amount);\\n\\t\\temit Withdrawn(candidate, msg.sender, to, amount);\\n\\t}\\n\\n\\t/// @dev voter withdraw votes and claim reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param amount reward amount\\n\\t/// @param to receiver address\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction withdrawAndClaim(\\n\\t\\taddress candidate,\\n\\t\\tuint256 amount,\\n\\t\\taddress to,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external override nonReentrant {\\n\\t\\trequire(unfrozenAt(candidate, msg.sender) > block.timestamp, 'Election: vote is frozen');\\n\\t\\tstake.voterAllocate(candidate);\\n\\t\\tVoterInfo storage voter = voters[candidate][msg.sender];\\n\\t\\tint256 accumulated = int256((voter.amount * accPerShares[candidate]) / ACC_PRECISION);\\n\\t\\tuint256 pending = (accumulated - voter.rewardDebt).toUInt256();\\n\\t\\tvoter.rewardDebt = accumulated - int256((amount * accPerShares[candidate]) / ACC_PRECISION);\\n\\t\\tvoter.amount = voter.amount - amount;\\n\\t\\tvoteSupply[candidate] = voteSupply[candidate] - amount;\\n\\t\\tif (stake.isCandidateRegistered(candidate)) {\\n\\t\\t\\tmajorCandidates.upsetCandidateWithAnchor(candidate, voteSupply[candidate], anchor, maxSlippage);\\n\\t\\t}\\n\\t\\trewarder.mint(to, pending);\\n\\t\\ttoken.transfer(to, amount);\\n\\t\\temit Claimed(candidate, msg.sender, to, pending);\\n\\t\\temit Withdrawn(candidate, msg.sender, to, amount);\\n\\t}\\n\\n\\t/// @dev pending reward for a voter given a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @return pending pending reward\\n\\tfunction pendingReward(address candidate, address voter) public view override returns (uint256 pending) {\\n\\t\\tif (voteSupply[candidate] > 0) {\\n\\t\\t\\tuint256 pendingAllocation = stake.pendingVoterAllocation(candidate);\\n\\t\\t\\tint256 rewardDebt = voters[candidate][voter].rewardDebt;\\n\\t\\t\\tuint256 pendingShares = accPerShares[candidate] + ((pendingAllocation * ACC_PRECISION) / voteSupply[candidate]);\\n\\t\\t\\tpending = (int256((voters[candidate][voter].amount * pendingShares) / ACC_PRECISION) - rewardDebt).toUInt256();\\n\\t\\t}\\n\\t}\\n\\n\\t/// @dev candidate allocate reward for the voters\\n\\t/// @param candidate candidate address\\n\\t/// @param amount reward amount\\n\\tfunction onAllocate(address candidate, uint256 amount) external override onlyStake {\\n\\t\\tif (voteSupply[candidate] > 0) {\\n\\t\\t\\taccPerShares[candidate] = accPerShares[candidate] + ((amount * ACC_PRECISION) / voteSupply[candidate]);\\n\\t\\t\\temit ShareUpdated(candidate);\\n\\t\\t}\\n\\t}\\n\\n\\tfunction unfrozenAt(address candidate, address voter) public view returns(uint256) {\\n\\t\\trequire(lastVoteTime[candidate][voter] > 0, 'Election: nonexistent vote');\\n\\t\\treturn lastVoteTime[candidate][voter] + voteFrozenPeriod;\\n\\t}\\n\\n\\tfunction _setRewarder(IRewarder _rewarder) internal {\\n\\t\\trewarder = _rewarder;\\n\\t\\temit RewarderUpdated(_rewarder);\\n\\t}\\n\\n\\tfunction _setStake(IStake _stake) internal {\\n\\t\\tstake = _stake;\\n\\t\\temit StakeUpdated(_stake);\\n\\t}\\n\\n\\tfunction _setMajorCandidates(IMajorCandidates _majorCandidates) internal {\\n\\t\\tmajorCandidates = _majorCandidates;\\n\\t\\temit MajorCandidatesUpdated(_majorCandidates);\\n\\t}\\n\\n\\tfunction _setToken(IERC20 _token) internal {\\n\\t\\ttoken = _token;\\n\\t\\temit TokenUpdated(_token);\\n\\t}\\n\\n\\tfunction _setVoteFrozenPeriod(uint256 period) internal {\\n\\t\\tvoteFrozenPeriod = period;\\n\\t\\temit VoteFrozenPeriodUpdated(period);\\n\\t}\\n}\\n\",\"keccak256\":\"0xf5f50da5f8e3721ec1fd92457dd2ffa0bee8e1582ccc22b7dae0614b29cf5007\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/ICandidateRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport '../libraries/Types.sol';\\n\\n/// @dev Candidate registry interface\\n/// @author Alexandas\\ninterface ICandidateRegistry {\\n\\n\\t/// @dev emit when candidate registered\\n\\t/// @param candidate candidate address\\n\\tevent Register(address candidate);\\n\\n\\t/// @dev register a candidate with node manifest\\n\\t/// @param manifest node manifest\\n\\tfunction register(string memory manifest) external;\\n\\n\\t/// @dev return a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return candidate information\\n\\tfunction candidateInfo(address candidate) external view returns(Types.CandidateInfo memory);\\n\\n\\t/// @dev return a candidate address for a specific node manifest\\n\\t/// @param manifest node manifest\\n\\t/// @return candidate address\\n\\tfunction manifestMap(string memory manifest) external view returns(address);\\n\\n\\t/// @dev return whether a candidate is registered\\n\\t/// @param candidate candidate address\\n\\t/// @return whether the candidate is registered\\n\\tfunction isCandidateRegistered(address candidate) external view returns (bool);\\n\\n\\t/// @dev return grade of a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return candidate grade\\n\\tfunction gradeOf(address candidate) external view returns (Types.Grade);\\n\\n}\\n\",\"keccak256\":\"0xd8519308649be704107281712dcbe57e3720c5458193a2ab40dc51cebcb43b80\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol';\\n\\n/// @dev Burnable ERC20 Token interface\\n/// @author Alexandas\\ninterface IERC20 is IERC20Upgradeable {\\n\\n\\t/// @dev burn tokens\\n\\t/// @param amount token amount\\n\\tfunction burn(uint256 amount) external;\\n\\n\\t/// @dev burn tokens\\n\\t/// @param account user address\\n\\t/// @param amount token amount\\n\\tfunction burnFrom(address account, uint256 amount) external;\\n\\n}\\n\",\"keccak256\":\"0xb45f4f11d5a0a93d60c5238dfce558196db50b3986cee01f2e65b8781bcb7d4f\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IElection.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport './IRewarder.sol';\\nimport './IStake.sol';\\nimport './IMajorCandidates.sol';\\nimport './IERC20.sol';\\n\\n/// @dev Election contract interface\\n/// @author Alexandas\\ninterface IElection {\\n\\n\\t/// @dev emit when ERC20 token address updated\\n\\t/// @param token ERC20 token address\\n\\tevent TokenUpdated(IERC20 token);\\n\\n\\t/// @dev emit when `Rewarder` contract updated\\n\\t/// @param rewarder `Rewarder` contract \\n\\tevent RewarderUpdated(IRewarder rewarder);\\n\\n\\t/// @dev emit when `Stake` contract updated\\n\\t/// @param stake `Stake` contract \\n\\tevent StakeUpdated(IStake stake);\\n\\n\\t/// @dev emit when `MajorCandidates` contract updated\\n\\t/// @param majorCandidates `MajorCandidates` contract \\n\\tevent MajorCandidatesUpdated(IMajorCandidates majorCandidates);\\n\\n\\t/// @dev emit when vote frozen period updated\\n\\t/// @param period vote frozen period\\n\\tevent VoteFrozenPeriodUpdated(uint256 period);\\n\\n\\t/// @dev emit when shares updated for a specific candidate\\n\\t/// @param candidate candidate address\\n\\tevent ShareUpdated(address candidate);\\n\\n\\t/// @dev emit when voter voted for a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @param amount token amount\\n\\tevent Vote(address candidate, address voter, uint256 amount);\\n\\n\\t/// @dev emit when voter claimed the reward\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @param to receiver address\\n\\t/// @param amount reward amount\\n\\tevent Claimed(address candidate, address voter, address to, uint256 amount);\\n\\n\\t/// @dev emit when voter withdrawn the votes\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @param to receiver address\\n\\t/// @param amount reward amount\\n\\tevent Withdrawn(address candidate, address voter, address to, uint256 amount);\\n\\n\\t/// @dev voter vote a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @param amount reward amount\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction vote(\\n\\t\\taddress candidate,\\n\\t\\taddress voter,\\n\\t\\tuint256 amount,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external;\\n\\n\\t/// @dev voter claim reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param to receiver address\\n\\tfunction claim(address candidate, address to) external;\\n\\n\\t/// @dev voter withdraw reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param amount reward amount\\n\\t/// @param to receiver address\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction withdraw(\\n\\t\\taddress candidate,\\n\\t\\tuint256 amount,\\n\\t\\taddress to,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external;\\n\\n\\t/// @dev voter withdraw votes and claim reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param amount reward amount\\n\\t/// @param to receiver address\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction withdrawAndClaim(\\n\\t\\taddress candidate,\\n\\t\\tuint256 amount,\\n\\t\\taddress to,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external;\\n\\n\\t/// @dev candidate allocate reward for the voters\\n\\t/// @param candidate candidate address\\n\\t/// @param amount reward amount\\n\\tfunction onAllocate(address candidate, uint256 amount) external;\\n\\n\\t/// @dev return ERC20 token address\\n\\tfunction token() external view returns(IERC20);\\n\\n\\t/// @dev return `Rewarder` contract address\\n\\tfunction rewarder() external view returns(IRewarder);\\n\\n\\t/// @dev return `Stake` contract address\\n\\tfunction stake() external view returns(IStake);\\n\\n\\t/// @dev return `MajorCandidates` contract address\\n\\tfunction majorCandidates() external view returns(IMajorCandidates);\\n\\n\\t/// @dev return precision for shares\\n\\tfunction ACC_PRECISION() external view returns(uint256);\\n\\n\\t/// @dev return votes for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return votes for a specific candidate\\n\\tfunction voteSupply(address candidate) external view returns(uint256);\\n\\n\\t/// @dev pending reward for a voter given a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param voter voter address\\n\\t/// @return pending pending reward\\n\\tfunction pendingReward(address candidate, address voter) external view returns (uint256 pending);\\n\\n}\\n\",\"keccak256\":\"0xad12e388dbfd8245c6e33fc8bd3adeb0a77c5ebcf28fd189114044d026670e7d\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IMajorCandidates.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport './IElection.sol';\\nimport './IStake.sol';\\n\\n/// @dev MajorCandidates interface\\n/// @author Alexandas\\ninterface IMajorCandidates {\\n\\n\\t/// @dev emit when max major candidates changed\\n\\t/// @param max max major candidates\\n\\tevent MaxMajorCandidateUpdated(uint256 max);\\n\\n\\t/// @dev emit when `Election` contract changed\\n\\t/// @param election `Election` contract address\\n\\tevent ElectionUpdated(IElection election);\\n\\n\\t/// @dev emit when `Stake` contract updated\\n\\t/// @param stake `Stake` contract \\n\\tevent StakeUpdated(IStake stake);\\n\\n\\t/// @dev emit when a candidate insert or update in the sorted list\\n\\t/// @param candidate candidate address\\n\\t/// @param amount candidate votes\\n\\tevent UpsetCandidate(address candidate, uint256 amount);\\n\\n\\t/// @dev emit when a candidate removed from the sorted list\\n\\t/// @param candidate candidate address\\n\\tevent RemoveCandidate(address candidate);\\n\\n\\t/// @dev insert or update a candidate in the sorted list\\n\\t/// @param candidate candidate address\\n\\t/// @param amount candidate votes\\n\\t/// @param anchor anchor candidate address\\n\\t/// @param maxSlippage maximum rank change value for the candidate from the anchor candidate\\n\\tfunction upsetCandidateWithAnchor(\\n\\t\\taddress candidate,\\n\\t\\tuint256 amount,\\n\\t\\taddress anchor,\\n\\t\\tuint256 maxSlippage\\n\\t) external;\\n\\n\\t/// @dev emit removed a candidate from the sorted list\\n\\t/// @param candidate candidate address\\n\\tfunction remove(address candidate) external;\\n\\n\\t/// @dev return max major candidates\\n\\tfunction MAX_MAJOR_CANDIDATES() external view returns(uint256);\\n\\n\\t/// @dev return `Election` contract address\\n\\tfunction election() external view returns(IElection);\\n\\n\\t/// @dev return `Stake` contract address\\n\\tfunction stake() external view returns(IStake);\\n\\n\\t/// @dev return whether a candidate is existed in the sorted list\\n\\t/// @param candidate candidate address\\n\\t/// @return whether the candidate is existed in the sorted list\\n\\tfunction exists(address candidate) external view returns (bool);\\n\\n\\t/// @dev return whether a candidate is a major candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return existed the candidate is a major candidate\\n\\tfunction isMajor(address candidate) external view returns(bool existed);\\n\\n\\t/// @dev return all major candidates\\n\\t/// @return majors all major candidates\\n\\tfunction majorCandidateList() external view returns(address[] memory majors);\\n\\n\\n}\\n\",\"keccak256\":\"0xe81b3600f2652084188b90a53ca9078786c17c5ffa59486a56c4a62250660f9b\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IPools.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport './IERC20.sol';\\nimport './IRewarder.sol';\\nimport '../libraries/Types.sol';\\n\\n/// @dev Pools interface\\n/// @author Alexandas\\ninterface IPools {\\n\\n\\t/// @dev emit when ERC20 Token contract updated\\n\\t/// @param token ERC20 Token contract\\n\\tevent TokenUpdated(IERC20 token);\\n\\n\\t/// @dev emit when `Rewarder` contract updated\\n\\t/// @param rewarder `Rewarder` contract \\n\\tevent RewarderUpdated(IRewarder rewarder);\\n\\n\\t/// @dev emit when `rewardPerSecond` updated\\n\\t/// @param rewardPerSecond reward generated for per second\\n\\tevent RewardPerSecondUpdated(uint256 rewardPerSecond);\\n\\n\\t/// @dev emit when shares precision updated\\n\\t/// @param precision shares precision\\n\\tevent PrecisionUpdated(uint256 precision);\\n\\n\\t/// @dev emit when max coefficient updated\\n\\t/// @param maxCoef max coefficient\\n\\tevent MaxCoefUpdated(uint256 maxCoef);\\n\\n\\t/// @dev emit when add a pool\\n\\t/// @param grade pool grade\\n\\tevent AddPool(Types.Grade grade);\\n\\n\\t/// @dev emit when pool updated\\n\\t/// @param grade pool grade\\n\\tevent PoolUpdated(Types.Grade grade);\\n\\n\\t/// @dev return ERC20 token address\\n\\tfunction token() external view returns(IERC20);\\n\\n\\t/// @dev return `Rewarder` contract address\\n\\tfunction rewarder() external view returns(IRewarder);\\n\\n\\t/// @dev return precision for shares\\n\\tfunction ACC_PRECISION() external view returns(uint256);\\n\\n\\t/// @dev return max coefficient\\n\\tfunction MAXCOEF() external view returns(uint256);\\n\\n\\t/// @dev return total pools allocation points\\n\\tfunction totalAllocPoint() external view returns(uint256);\\n\\n\\t/// @dev return reward generated for per second\\n\\tfunction rewardPerSecond() external view returns(uint256);\\n\\n\\t/// @dev update a specific pool\\n\\t/// @param grade pool grade\\n\\t/// @return pool pool info\\n\\tfunction updatePool(Types.Grade grade) external returns (Types.PoolInfo memory pool);\\n\\n\\t/// @dev return a specific pool\\n\\t/// @param grade pool grade\\n\\t/// @return pool pool info\\n\\tfunction poolInfo(Types.Grade grade) external view returns(Types.PoolInfo memory);\\n\\n}\\n\",\"keccak256\":\"0xc5f1962a2579d1fadb8669766b62564436a6c4b779e38b0f9271fe74c7cbd613\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IRewarder.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport '@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol';\\nimport './IERC20.sol';\\n\\n/// @dev Rewarder interface\\n/// @author Alexandas\\ninterface IRewarder {\\n\\n\\t/// @dev emit when ERC20 token address updated\\n\\t/// @param token ERC20 token address\\n\\tevent TokenUpdated(IERC20 token);\\n\\n\\t/// @dev emit when auth address updated\\n\\t/// @param auth authorized address\\n\\tevent AuthUpdated(address auth);\\n\\n\\t/// @dev emit when reward minted\\n\\t/// @param from authorized address\\n\\t/// @param to receiver address\\n\\t/// @param amount token amount\\n\\tevent Minted(address from, address to, uint256 amount);\\n\\n\\t/// @dev return ERC20 token address\\n\\tfunction token() external view returns(IERC20);\\n\\n\\t/// @dev mint reward to receiver\\n\\t/// @param to receiver address\\n\\t/// @param amount token amount\\n\\tfunction mint(address to, uint256 amount) external;\\n\\n}\",\"keccak256\":\"0xc41fb19972737ba746c9dea24922b35745aaff3a6c5839993269a843bffe3160\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/ISlasher.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport '../libraries/Types.sol';\\nimport './IMajorCandidates.sol';\\nimport './IStake.sol';\\n\\n/// @dev Slasher interface\\n/// @author Alexandas\\ninterface ISlasher {\\n\\n\\t/// @dev emit when governance address updated\\n\\t/// @param governance governance address\\n\\tevent GovernanceUpdated(address governance);\\n\\n\\t/// @dev emit when `Stake` contract updated\\n\\t/// @param stake `Stake` contract \\n\\tevent StakeUpdated(IStake stake);\\n\\n\\t/// @dev emit when `MajorCandidates` contract updated\\n\\t/// @param majorCandidates `MajorCandidates` contract \\n\\tevent MajorCandidatesUpdated(IMajorCandidates majorCandidates);\\n\\n\\t/// @dev emit when default slash amount updated\\n\\t/// @param amount slash amount\\n\\tevent DefaultSlashAmountUpdated(uint256 amount);\\n\\n\\t/// @dev emit when public notice period updated\\n\\t/// @param period public notice period\\n\\tevent PublicNoticePeriodUpdated(uint256 period);\\n\\n\\t/// @dev emit when max coefficient updated\\n\\t/// @param maxCoef max coefficient\\n\\tevent MaxCoefUpdated(uint256 maxCoef);\\n\\n\\t/// @dev emit when drafter slash reward coefficient updated\\n\\t/// @param drafterCoef drafter slash reward coefficient\\n\\tevent DrafterCoefUpdated(uint64 drafterCoef);\\n\\n\\t/// @dev emit when validator slash reward coefficient updated\\n\\t/// @param validatorCoef validator slash reward coefficient\\n\\tevent ValidatorCoefUpdated(uint256 validatorCoef);\\n\\n\\t/// @dev emit when executor slash reward coefficient updated\\n\\t/// @param executorCoef executor slash reward coefficient\\n\\tevent ExecutorCoefUpdated(uint256 executorCoef);\\n\\n\\t/// @dev emit when slash drafted\\n\\t/// @param nonce slash number\\n\\t/// @param candidate candidate address\\n\\t/// @param slashBlock slashed block in posc\\n\\t/// @param manifest node manifest\\n\\t/// @param accuracy posc accuracy\\n\\tevent DraftSlash(uint256 nonce, address candidate, uint64 slashBlock, string manifest, uint64 accuracy);\\n\\n\\t/// @dev emit when slash drafted\\n\\t/// @param nonce slash number\\n\\tevent RejectSlash(uint256 nonce);\\n\\n\\t/// @dev emit when slash drafted\\n\\t/// @param nonce slash number\\n\\tevent ExecuteSlash(uint256 nonce, address executor);\\n\\n\\t/// @dev return `Stake` contract address\\n\\tfunction stake() external view returns(IStake);\\n\\n\\t/// @dev return `MajorCandidates` contract address\\n\\tfunction majorCandidates() external view returns(IMajorCandidates);\\n\\n\\t/// @dev return default slash amount\\n\\tfunction defaultSlashAmount() external view returns(uint256);\\n\\n\\t/// @dev return public notice period\\n\\tfunction publicNoticePeriod() external view returns(uint256);\\n\\n\\t/// @dev return current slash nonce\\n\\tfunction nonce() external view returns(uint256);\\n\\n\\t/// @dev return max coefficient\\n\\tfunction MAXCOEF() external view returns(uint64);\\n\\n\\t/// @dev return drafter slash reward coefficient\\n\\tfunction drafterCoef() external view returns(uint64);\\n\\n\\t/// @dev return validator slash reward coefficient\\n\\tfunction validatorCoef() external view returns(uint64);\\n\\n\\t/// @dev return executor slash reward coefficient\\n\\tfunction executorCoef() external view returns(uint64);\\n\\n\\t/// @dev return slash information at a specific nonce\\n\\t/// @param _nonce nonce number\\n\\t/// @return slash information\\n\\tfunction getSlashAt(uint256 _nonce) external view returns(Types.SlashInfo memory);\\n\\n\\t/// @dev return nonce given a candidate if the candidate is in slashing\\n\\t/// @param candidate candidate address\\n\\t/// @return nonce number\\n\\tfunction nonceOf(address candidate) external view returns(uint256);\\n\\n\\t/// @dev set drafter slash reward coefficient\\n\\t/// @param _drafterCoef drafter slash reward coefficient\\n\\tfunction setDrafterCoef(uint64 _drafterCoef) external;\\n\\n\\t/// @dev set validator slash reward coefficient\\n\\t/// @param _validatorCoef validator slash reward coefficient\\n\\tfunction setValidatorCoef(uint64 _validatorCoef) external;\\n\\n\\t/// @dev set executor slash reward coefficient\\n\\t/// @param _executorCoef executor slash reward coefficient\\n\\tfunction setExecutorCoef(uint64 _executorCoef) external;\\n\\n\\t/// @dev draft a slash\\n\\t/// @param slashBlock slashed block in posc\\n\\t/// @param manifest node manifest\\n\\t/// @param accuracy posc accuracy\\n\\t/// @param signatures major candidates signatures\\n\\tfunction draft(uint64 slashBlock, string memory manifest, uint64 accuracy, bytes[] memory signatures) external;\\n\\n\\t/// @dev reject a slash\\n\\t/// @param manifest node manifest\\n\\tfunction reject(string memory manifest) external;\\n\\n\\t/// @dev execute a slash\\n\\t/// @param manifest node manifest\\n\\tfunction execute(string memory manifest) external;\\n\\n\\t/// @dev return whether candidate is in slashing\\n\\t/// @param candidate candidate address\\n\\t/// @return whether candidate is in slashing\\n\\tfunction slashExists(address candidate) external view returns(bool);\\n\\n\\t/// @dev check whether signatures is valid\\n\\t/// @param hash message hash\\n\\t/// @param signatures signatures for major candidates\\n\\t/// @param signers major candidate signers\\n\\tfunction checkNSignatures(bytes32 hash, bytes[] memory signatures) external view returns(address[] memory signers);\\n\\n}\\n\",\"keccak256\":\"0x2a098f6fdb061970bf7f00c0018f3950b5d96d7d0702b21bfde897f973e6e36b\",\"license\":\"GPL-2.0-or-later\"},\"contracts/interfaces/IStake.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nimport './IElection.sol';\\nimport './IMajorCandidates.sol';\\nimport './ISlasher.sol';\\nimport './IPools.sol';\\nimport './ICandidateRegistry.sol';\\n\\n/// @dev Stake interface\\n/// @author Alexandas\\ninterface IStake is IPools, ICandidateRegistry {\\n\\n\\t/// @dev emit when `Election` contract changed\\n\\t/// @param election `Election` contract address\\n\\tevent ElectionUpdated(IElection election);\\n\\n\\t/// @dev emit when `MajorCandidates` contract updated\\n\\t/// @param majorCandidates `MajorCandidates` contract \\n\\tevent IMajorCandidatesUpdated(IMajorCandidates majorCandidates);\\n\\n\\t/// @dev emit when `Slasher` contract updated\\n\\t/// @param slasher `Slasher` contract \\n\\tevent SlasherUpdated(ISlasher slasher);\\n\\n\\t/// @dev emit when minimum stake updated\\n\\t/// @param amount minimum stake\\n\\tevent MinStakeUpdated(uint256 amount);\\n\\n\\t/// @dev emit when stake frozen period updated\\n\\t/// @param period stake frozen period\\n\\tevent StakeFrozenPeriodUpdated(uint256 period);\\n\\n\\t/// @dev emit when claim frozen period updated\\n\\t/// @param period claim frozen period\\n\\tevent ClaimFrozenPeriodUpdated(uint256 period);\\n\\n\\t/// @dev emit when a candidate upgraded\\n\\t/// @param candidate candidate address\\n\\t/// @param fromGrade from grade\\n\\t/// @param toGrade to grade\\n\\tevent Upgrade(address candidate, Types.Grade fromGrade, Types.Grade toGrade);\\n\\n\\t/// @dev emit when a candidate downgraded\\n\\t/// @param candidate candidate address\\n\\t/// @param fromGrade from grade\\n\\t/// @param toGrade to grade\\n\\tevent Downgrade(address candidate, Types.Grade fromGrade, Types.Grade toGrade);\\n\\n\\t/// @dev emit when a candidate staked tokens\\n\\t/// @param from token consumer\\n\\t/// @param candidate candidate address\\n\\t/// @param amount token amount\\n\\tevent Stake(address from, address candidate, uint256 amount);\\n\\n\\t/// @dev emit when a candidate withdraw tokens\\n\\t/// @param candidate candidate address\\n\\t/// @param to token receiver\\n\\t/// @param amount token amount\\n\\tevent Withdrawn(address candidate, address to, uint256 amount);\\n\\n\\t/// @dev emit when a candidate claimed reward\\n\\t/// @param candidate candidate address\\n\\t/// @param to token receiver\\n\\t/// @param pending token amount\\n\\tevent Claimed(address candidate, address to, uint256 pending);\\n\\n\\t/// @dev emit when a candidate quit from the protocol\\n\\t/// @param grade candidate grade\\n\\t/// @param candidate candidate address\\n\\tevent Quit(Types.Grade grade, address candidate);\\n\\n\\t/// @dev emit when a candidate allocate reward for the voters\\n\\t/// @param candidate candidate address\\n\\t/// @param amount token amount\\n\\tevent VoterAllocated(address candidate, uint256 amount);\\n\\n\\t/// @dev emit when the reward for a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param amount token amount\\n\\tevent CandidateAllocated(address candidate, uint256 amount);\\n\\n\\t/// @dev emit when the vote reward coefficient updated\\n\\t/// @param coef vote reward coefficient\\n\\tevent VoteRewardCoefUpdated(uint256 coef);\\n\\n\\t/// @dev emit when drafted a slash\\n\\t/// @param candidate candidate address\\n\\t/// @param pendingSlash pending slash amount\\n\\tevent DraftSlash(address candidate, uint256 pendingSlash);\\n\\n\\t/// @dev emit when rejected a slash\\n\\t/// @param candidate candidate address\\n\\t/// @param pendingSlash pending slash amount\\n\\tevent RejectSlash(address candidate, uint256 pendingSlash);\\n\\n\\t/// @dev emit when executed a slash\\n\\t/// @param candidate candidate address\\n\\t/// @param pendingSlash pending slash amount\\n\\t/// @param beneficiaries slash reward beneficiaries\\n\\t/// @param amounts slash reward amounts\\n\\t/// @param burned burned amount\\n\\tevent ExcuteSlash(address candidate, uint256 pendingSlash, address[] beneficiaries, uint256[] amounts, uint256 burned);\\n\\n\\t/// @dev return `Election` contract\\n\\tfunction election() external view returns(IElection);\\n\\n\\t/// @dev return `MajorCandidates` contract\\n\\tfunction majorCandidates() external view returns(IMajorCandidates);\\n\\n\\t/// @dev return `Slasher` contract\\n\\tfunction slasher() external returns(ISlasher);\\n\\n\\t/// @dev candidate stake tokens\\n\\t/// @param amount token amount\\n\\tfunction stake(uint256 amount) external;\\n\\n\\t/// @dev register a candidate and stake tokens\\n\\t/// @param amount token amount\\n\\t/// @param manifest node manifest\\n\\tfunction registerAndStake(uint256 amount, string memory manifest) external;\\n\\n\\t/// @dev candidate quit from the protocol\\n\\t/// @param to token receiver\\n\\tfunction quit(address to) external;\\n\\n\\t/// @dev candidate claim reward from the protocol\\n\\t/// @param to token receiver\\n\\tfunction claim(address to) external;\\n\\n\\t/// @dev candidate withdraw the tokens and claim reward from the protocol\\n\\t/// @param amount token amount\\n\\t/// @param to token receiver\\n\\t// function withdrawAndClaim(uint256 amount, address to) external;\\n\\n\\t/// @dev return pending reward for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return pending reward for the candidate\\n\\tfunction pendingReward(address candidate) external view returns (uint256 pending);\\n\\n\\t/// @dev set voter slash reward coefficient\\n\\t/// @param coef voter reward coefficient\\n\\tfunction setVoteRewardCoef(uint256 coef) external;\\n\\n\\t/// @dev set allocate the reward to voters from the candidate\\n\\t/// @param candidate candidate address\\n\\tfunction voterAllocate(address candidate) external;\\n\\n\\t/// @dev return voter reward coefficient for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return coef voter reward coefficient\\n\\tfunction voteRewardCoef(address candidate) external view returns (uint256 coef);\\n\\n\\t/// @dev return pending voters allocation for a specific candidate\\n\\t/// @param candidate candidate address\\n\\t/// @return pending pending voters allocation\\n\\tfunction pendingVoterAllocation(address candidate) external view returns (uint256 pending);\\n\\n\\t/// @dev return pending candidate allocation\\n\\t/// @param candidate candidate address\\n\\t/// @return pending pending candidate allocation\\n\\tfunction pendingCandidateAllocation(address candidate) external view returns (uint256 pending);\\n\\n\\t/// @dev upgrade a candidate\\n\\t/// @param candidate candidate address\\n\\tfunction upgrade(address candidate) external;\\n\\n\\t/// @dev downgrade a candidate\\n\\t/// @param candidate candidate address\\n\\tfunction downgrade(address candidate) external;\\n\\n\\t/// @dev draft a slash for a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param amount slash amount\\n\\t/// @return pendingSlash real slash amount\\n\\tfunction draftSlash(address candidate, uint256 amount) external returns(uint256 pendingSlash);\\n\\n\\t/// @dev reject a slash for a candidate\\n\\t/// @param candidate candidate address\\n\\t/// @param pendingSlash real slash amount\\n\\tfunction rejectSlash(address candidate, uint256 pendingSlash) external;\\n\\n\\t/// @dev executed a slash for a candiate\\n\\t/// @param candidate candidate address\\n\\t/// @param slash slash amount\\n\\t/// @param beneficiaries slash reward beneficiaries\\n\\t/// @param amounts slash reward amounts\\n\\t/// @param burned burned amount\\n\\tfunction executeSlash(\\n\\t\\taddress candidate, \\n\\t\\tuint256 slash,\\n\\t\\taddress[] memory beneficiaries, \\n\\t\\tuint256[] memory amounts,\\n\\t\\tuint256 burned\\n\\t) external;\\n}\",\"keccak256\":\"0x9eeba75d51080c9762f25fb5872a0dc0e92aa3f7ec3533957379e6f10cb7978a\",\"license\":\"GPL-2.0-or-later\"},\"contracts/libraries/SignedSafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nlibrary SignedSafeMath {\\n    int256 constant private _INT256_MIN = -2**255;\\n\\n    /**\\n     * @dev Returns the multiplication of two signed integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(int256 a, int256 b) internal pure returns (int256) {\\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n        // benefit is lost if 'b' is also tested.\\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n        if (a == 0) {\\n            return 0;\\n        }\\n\\n        require(!(a == -1 && b == _INT256_MIN), 'SignedSafeMath: multiplication overflow');\\n\\n        int256 c = a * b;\\n        require(c / a == b, 'SignedSafeMath: multiplication overflow');\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two signed integers. Reverts on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(int256 a, int256 b) internal pure returns (int256) {\\n        require(b != 0, 'SignedSafeMath: division by zero');\\n        require(!(b == -1 && a == _INT256_MIN), 'SignedSafeMath: division overflow');\\n\\n        int256 c = a / b;\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two signed integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a - b;\\n        require((b >= 0 && c <= a) || (b < 0 && c > a), 'SignedSafeMath: subtraction overflow');\\n\\n        return c;\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two signed integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(int256 a, int256 b) internal pure returns (int256) {\\n        int256 c = a + b;\\n        require((b >= 0 && c >= a) || (b < 0 && c < a), 'SignedSafeMath: addition overflow');\\n\\n        return c;\\n    }\\n\\n    function toUInt256(int256 a) internal pure returns (uint256) {\\n        require(a >= 0, 'Integer < 0');\\n        return uint256(a);\\n    }\\n}\",\"keccak256\":\"0x0e4a58629038a9130bf13ae2f79dedcc3aab53cbc9989f20d82d35271d1fd6eb\",\"license\":\"GPL-2.0-or-later\"},\"contracts/libraries/Types.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-2.0-or-later\\n\\npragma solidity >=0.8.0;\\n\\nlibrary Types {\\n\\n\\tenum Grade {\\n\\t\\tNull,\\n\\t\\tMajor,\\n\\t\\tSecondary\\n\\t}\\n\\n\\tstruct CandidateInfo {\\n\\t\\tGrade grade;\\n\\t\\tuint256 amount;\\n\\t\\tint256 rewardDebt;\\n\\t\\tuint256 allocation;\\n\\t\\tstring manifest;\\n\\t}\\n\\n\\tstruct PoolInfo {\\n\\t\\tuint256 accPerShare;\\n\\t\\tuint256 lastRewardTime;\\n\\t\\tuint256 allocPoint;\\n\\t}\\n\\n\\tenum SlashStatus {\\n\\t\\tDrafted,\\n\\t\\tRejected,\\n\\t\\tExecuted\\n\\t}\\n\\n\\tstruct SlashInfo {\\n\\t\\taddress candidate;\\n\\t\\taddress drafter;\\n\\t\\taddress[] validators;\\n\\t\\tuint256 amount;\\n\\t\\tuint256 timestamp;\\n\\t\\tSlashStatus status;\\n\\t}\\n\\n}\\n\",\"keccak256\":\"0x5260f5f3e8e5cf789e355d0f4827e5c6a9c4289545a2a9d94732830cd80a9a1e\",\"license\":\"GPL-2.0-or-later\"}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b50611b75806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806378438db7116100a2578063dcc3e06e11610071578063dcc3e06e14610275578063f0bfbcb614610288578063f562c29b1461029b578063f8c8765e146102bb578063fc0c546a146102ce57600080fd5b806378438db7146102295780639ced7e761461023c578063a398a7781461024f578063b17479e91461026257600080fd5b806332fcd966116100e957806332fcd966146101b95780633a4b66f1146101c25780634e7968e3146101e25780635501f1c61461020d5780636d40c7211461022057600080fd5b80630a08ba721461011b57806312d00cee146101305780631cc59aa31461016657806321c0b342146101a6575b600080fd5b61012e6101293660046114ea565b6102e1565b005b61015061013e366004611527565b603a6020526000908152604090205481565b60405161015d9190611558565b60405180910390f35b610198610174366004611566565b60396020908152600092835260408084209091529082529020805460019091015482565b60405161015d929190611599565b61012e6101b4366004611566565b6103de565b61015060375481565b6035546101d5906001600160a01b031681565b60405161015d91906115d3565b6101506101f0366004611566565b603c60209081526000928352604080842090915290825290205481565b61012e61021b3660046115e1565b610582565b61015060385481565b61012e6102373660046115e1565b6108a6565b61015061024a366004611566565b610cb5565b61015061025d366004611566565b610e27565b6036546101d5906001600160a01b031681565b6034546101d5906001600160a01b031681565b61012e610296366004611659565b610ea5565b6101506102a9366004611527565b603b6020526000908152604090205481565b61012e6102c93660046116b6565b611210565b6033546101d5906001600160a01b031681565b6035546001600160a01b031633146103145760405162461bcd60e51b815260040161030b90611761565b60405180910390fd5b6001600160a01b0382166000908152603a6020526040902054156103da576001600160a01b0382166000908152603a60205260409020546037546103589083611787565b61036291906117bc565b6001600160a01b0383166000908152603b602052604090205461038591906117d0565b6001600160a01b0383166000908152603b60205260409081902091909155517fe7e3d547051a0e581a3e50cc654fcfa1aad33db6c549b0a9ca485544b190f975906103d19084906117f1565b60405180910390a15b5050565b600260015414156104015760405162461bcd60e51b815260040161030b90611836565b6002600155603554604051632969b12160e11b81526001600160a01b03909116906352d36242906104369085906004016117f1565b600060405180830381600087803b15801561045057600080fd5b505af1158015610464573d6000803e3d6000fd5b505050506001600160a01b03821660008181526039602090815260408083203384528252808320603754948452603b90925282205481549193916104a89190611787565b6104b291906117bc565b905060006104ce8360010154836104c99190611846565b611314565b600184018390556034546040516340c10f1960e01b81529192506001600160a01b0316906340c10f19906105089087908590600401611887565b600060405180830381600087803b15801561052257600080fd5b505af1158015610536573d6000803e3d6000fd5b505050507f913c992353dc81b7a8ba31496c484e9b6306bd2f6c509a649a38fdf5e1c953b28533868460405161056f9493929190611895565b60405180910390a1505060018055505050565b600260015414156105a55760405162461bcd60e51b815260040161030b90611836565b6002600155426105b58633610e27565b116105d25760405162461bcd60e51b815260040161030b90611907565b603554604051632969b12160e11b81526001600160a01b03909116906352d36242906106029088906004016117f1565b600060405180830381600087803b15801561061c57600080fd5b505af1158015610630573d6000803e3d6000fd5b5050506001600160a01b03861660008181526039602090815260408083203384528252808320603754948452603b909252909120549092506106729087611787565b61067c91906117bc565b816001015461068b9190611846565b6001820155805461069d908690611917565b81556001600160a01b0386166000908152603a60205260409020546106c3908690611917565b6001600160a01b038088166000908152603a602052604090819020929092556035549151631e3d9b8b60e31b815291169063f1ecdc58906107089089906004016117f1565b60206040518083038186803b15801561072057600080fd5b505afa158015610734573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610758919061193c565b156107d8576036546001600160a01b038781166000908152603a602052604090819020549051633a7a74bd60e21b8152919092169163e9e9d2f4916107a5918a918890889060040161195d565b600060405180830381600087803b1580156107bf57600080fd5b505af11580156107d3573d6000803e3d6000fd5b505050505b60335460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061080a9087908990600401611887565b602060405180830381600087803b15801561082457600080fd5b505af1158015610838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085c919061193c565b507fa4195c37c2947bbe89165f03e320b6903116f0b10d8cfdb522330f7ce6f9fa24863386886040516108929493929190611895565b60405180910390a150506001805550505050565b600260015414156108c95760405162461bcd60e51b815260040161030b90611836565b6002600155426108d98633610e27565b116108f65760405162461bcd60e51b815260040161030b90611907565b603554604051632969b12160e11b81526001600160a01b03909116906352d36242906109269088906004016117f1565b600060405180830381600087803b15801561094057600080fd5b505af1158015610954573d6000803e3d6000fd5b505050506001600160a01b03851660008181526039602090815260408083203384528252808320603754948452603b90925282205481549193916109989190611787565b6109a291906117bc565b905060006109b98360010154836104c99190611846565b6037546001600160a01b038a166000908152603b6020526040902054919250906109e39089611787565b6109ed91906117bc565b6109f79083611846565b60018401558254610a09908890611917565b83556001600160a01b0388166000908152603a6020526040902054610a2f908890611917565b6001600160a01b03808a166000908152603a602052604090819020929092556035549151631e3d9b8b60e31b815291169063f1ecdc5890610a74908b906004016117f1565b60206040518083038186803b158015610a8c57600080fd5b505afa158015610aa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac4919061193c565b15610b44576036546001600160a01b038981166000908152603a602052604090819020549051633a7a74bd60e21b8152919092169163e9e9d2f491610b11918c918a908a9060040161195d565b600060405180830381600087803b158015610b2b57600080fd5b505af1158015610b3f573d6000803e3d6000fd5b505050505b6034546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990610b769089908590600401611887565b600060405180830381600087803b158015610b9057600080fd5b505af1158015610ba4573d6000803e3d6000fd5b505060335460405163a9059cbb60e01b81526001600160a01b03909116925063a9059cbb9150610bda9089908b90600401611887565b602060405180830381600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2c919061193c565b507f913c992353dc81b7a8ba31496c484e9b6306bd2f6c509a649a38fdf5e1c953b288338884604051610c629493929190611895565b60405180910390a17fa4195c37c2947bbe89165f03e320b6903116f0b10d8cfdb522330f7ce6f9fa248833888a604051610c9f9493929190611895565b60405180910390a1505060018055505050505050565b6001600160a01b0382166000908152603a602052604081205415610e21576035546040516301686a8f60e51b81526000916001600160a01b031690632d0d51e090610d049087906004016117f1565b60206040518083038186803b158015610d1c57600080fd5b505afa158015610d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d549190611983565b6001600160a01b038086166000818152603960209081526040808320948916835293815283822060010154928252603a9052918220546037549394509092610d9c9085611787565b610da691906117bc565b6001600160a01b0387166000908152603b6020526040902054610dc991906117d0565b6037546001600160a01b038089166000908152603960209081526040808320938b1683529290522054919250610e1b91849190610e07908590611787565b610e1191906117bc565b6104c99190611846565b93505050505b92915050565b6001600160a01b038083166000908152603c60209081526040808320938516835292905290812054610e6b5760405162461bcd60e51b815260040161030b906119d8565b6038546001600160a01b038085166000908152603c6020908152604080832093871683529290522054610e9e91906117d0565b9392505050565b60026001541415610ec85760405162461bcd60e51b815260040161030b90611836565b6002600155603554604051631e3d9b8b60e31b81526001600160a01b039091169063f1ecdc5890610efd9088906004016117f1565b60206040518083038186803b158015610f1557600080fd5b505afa158015610f29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4d919061193c565b610f695760405162461bcd60e51b815260040161030b90611a1c565b6033546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610f9d90339030908890600401611a2c565b602060405180830381600087803b158015610fb757600080fd5b505af1158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fef919061193c565b50603554604051632969b12160e11b81526001600160a01b03909116906352d36242906110209088906004016117f1565b600060405180830381600087803b15801561103a57600080fd5b505af115801561104e573d6000803e3d6000fd5b5050506001600160a01b03808716600090815260396020908152604080832093891683529290522054611083915084906117d0565b6001600160a01b038087166000818152603960209081526040808320948a16835293815283822094909455603754918152603b9093529120546110c69085611787565b6110d091906117bc565b6001600160a01b038087166000908152603960209081526040808320938916835292905220600101546111039190611a54565b6001600160a01b038087166000818152603960209081526040808320948a16835293815283822060010194909455908152603a9092529020546111479084906117d0565b6001600160a01b038087166000818152603a60208181526040808420968755603c82528084208b871685528252808420429055603654949093525292549251633a7a74bd60e21b815291169163e9e9d2f4916111ab9189918790879060040161195d565b600060405180830381600087803b1580156111c557600080fd5b505af11580156111d9573d6000803e3d6000fd5b505050507f66a9138482c99e9baf08860110ef332cc0c23b4a199a53593d8db0fc8f96fbfc85858560405161056f93929190611a2c565b600054610100900460ff16158080156112305750600054600160ff909116105b8061124a5750303b15801561124a575060005460ff166001145b6112665760405162461bcd60e51b815260040161030b90611adb565b6000805460ff191660011790558015611289576000805461ff0019166101001790555b6112928561133a565b61129b84611390565b6112a4836113db565b6112ad82611426565b6112b962093a80611471565b64e8d4a51000603755801561130d576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989061130490600190611aff565b60405180910390a15b5050505050565b6000808212156113365760405162461bcd60e51b815260040161030b90611b2f565b5090565b603380546001600160a01b0319166001600160a01b0383161790556040517f5ba6b30cd4b2f9e9e67f4feb9b9df10d5da3b057598e6901b217b7d590345e30906113859083906115d3565b60405180910390a150565b603480546001600160a01b0319166001600160a01b0383161790556040517f47c9042c3be42a955f60f9b75006522826af1a3bed83e26646997d3bcccda77c906113859083906115d3565b603580546001600160a01b0319166001600160a01b0383161790556040517f27a2474ca8353642fab173d2cadd631382797bbd4f01c76aa56f932bceaf580f906113859083906115d3565b603680546001600160a01b0319166001600160a01b0383161790556040517f476e1ab7433dee921bc37cd453322068187c39ca4847e6a0d4aa36f559b8461c906113859083906115d3565b60388190556040517ff83cccf9d4c5f0b2f475a2b0a0157a3ec7c2ebdfe2c11ba256779ab21e4ba54390611385908390611558565b60006001600160a01b038216610e21565b6114c0816114a6565b81146114cb57600080fd5b50565b8035610e21816114b7565b806114c0565b8035610e21816114d9565b6000806040838503121561150057611500600080fd5b600061150c85856114ce565b925050602061151d858286016114df565b9150509250929050565b60006020828403121561153c5761153c600080fd5b600061154884846114ce565b949350505050565b805b82525050565b60208101610e218284611550565b6000806040838503121561157c5761157c600080fd5b600061158885856114ce565b925050602061151d858286016114ce565b604081016115a78285611550565b610e9e6020830184611550565b6000610e21826114a6565b6000610e21826115b4565b611552816115bf565b60208101610e2182846115ca565b600080600080600060a086880312156115fc576115fc600080fd5b600061160888886114ce565b9550506020611619888289016114df565b945050604061162a888289016114ce565b935050606061163b888289016114ce565b925050608061164c888289016114df565b9150509295509295909350565b600080600080600060a0868803121561167457611674600080fd5b600061168088886114ce565b9550506020611691888289016114ce565b945050604061162a888289016114df565b6114c0816115b4565b8035610e21816116a2565b600080600080608085870312156116cf576116cf600080fd5b60006116db87876116ab565b94505060206116ec878288016116ab565b93505060406116fd878288016116ab565b925050606061170e878288016116ab565b91505092959194509250565b602781526000602082017f456c656374696f6e3a2063616c6c6572206d757374206265205374616b6520638152661bdb9d1c9858dd60ca1b602082015291505b5060400190565b60208082528101610e218161171a565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156117a1576117a1611771565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826117cb576117cb6117a6565b500490565b600082198211156117e3576117e3611771565b500190565b611552816114a6565b60208101610e2182846117e8565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291505b5060200190565b60208082528101610e21816117ff565b600082600160ff1b0182126000841215161561186457611864611771565b826001600160ff1b0301821360008412161561188257611882611771565b500390565b604081016115a782856117e8565b608081016118a382876117e8565b6118b060208301866117e8565b6118bd60408301856117e8565b6118ca6060830184611550565b95945050505050565b601881526000602082017f456c656374696f6e3a20766f74652069732066726f7a656e00000000000000008152915061182f565b60208082528101610e21816118d3565b60008282101561188257611882611771565b8015156114c0565b8051610e2181611929565b60006020828403121561195157611951600080fd5b60006115488484611931565b6080810161196b82876117e8565b6118b06020830186611550565b8051610e21816114d9565b60006020828403121561199857611998600080fd5b60006115488484611978565b601a81526000602082017f456c656374696f6e3a206e6f6e6578697374656e7420766f74650000000000008152915061182f565b60208082528101610e21816119a4565b601f81526000602082017f456c656374696f6e3a206e6f6e6578697374656e742063616e646964617465008152915061182f565b60208082528101610e21816119e8565b60608101611a3a82866117e8565b611a4760208301856117e8565b6115486040830184611550565b6000816001600160ff1b0303831360008312151615611a7557611a75611771565b81600160ff1b0383126000831216156117e3576117e3611771565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061175a565b60208082528101610e2181611a90565b600060ff8216610e21565b61155281611aeb565b60208101610e218284611af6565b600b81526000602082016a0496e7465676572203c20360ac1b8152915061182f565b60208082528101610e2181611b0d56fea2646970667358221220e25107854a89b8b7c33fe7fb95581c6a767b35276af6e7f4f5bdb4dd5f5e5e7564736f6c63430008090033",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101165760003560e01c806378438db7116100a2578063dcc3e06e11610071578063dcc3e06e14610275578063f0bfbcb614610288578063f562c29b1461029b578063f8c8765e146102bb578063fc0c546a146102ce57600080fd5b806378438db7146102295780639ced7e761461023c578063a398a7781461024f578063b17479e91461026257600080fd5b806332fcd966116100e957806332fcd966146101b95780633a4b66f1146101c25780634e7968e3146101e25780635501f1c61461020d5780636d40c7211461022057600080fd5b80630a08ba721461011b57806312d00cee146101305780631cc59aa31461016657806321c0b342146101a6575b600080fd5b61012e6101293660046114ea565b6102e1565b005b61015061013e366004611527565b603a6020526000908152604090205481565b60405161015d9190611558565b60405180910390f35b610198610174366004611566565b60396020908152600092835260408084209091529082529020805460019091015482565b60405161015d929190611599565b61012e6101b4366004611566565b6103de565b61015060375481565b6035546101d5906001600160a01b031681565b60405161015d91906115d3565b6101506101f0366004611566565b603c60209081526000928352604080842090915290825290205481565b61012e61021b3660046115e1565b610582565b61015060385481565b61012e6102373660046115e1565b6108a6565b61015061024a366004611566565b610cb5565b61015061025d366004611566565b610e27565b6036546101d5906001600160a01b031681565b6034546101d5906001600160a01b031681565b61012e610296366004611659565b610ea5565b6101506102a9366004611527565b603b6020526000908152604090205481565b61012e6102c93660046116b6565b611210565b6033546101d5906001600160a01b031681565b6035546001600160a01b031633146103145760405162461bcd60e51b815260040161030b90611761565b60405180910390fd5b6001600160a01b0382166000908152603a6020526040902054156103da576001600160a01b0382166000908152603a60205260409020546037546103589083611787565b61036291906117bc565b6001600160a01b0383166000908152603b602052604090205461038591906117d0565b6001600160a01b0383166000908152603b60205260409081902091909155517fe7e3d547051a0e581a3e50cc654fcfa1aad33db6c549b0a9ca485544b190f975906103d19084906117f1565b60405180910390a15b5050565b600260015414156104015760405162461bcd60e51b815260040161030b90611836565b6002600155603554604051632969b12160e11b81526001600160a01b03909116906352d36242906104369085906004016117f1565b600060405180830381600087803b15801561045057600080fd5b505af1158015610464573d6000803e3d6000fd5b505050506001600160a01b03821660008181526039602090815260408083203384528252808320603754948452603b90925282205481549193916104a89190611787565b6104b291906117bc565b905060006104ce8360010154836104c99190611846565b611314565b600184018390556034546040516340c10f1960e01b81529192506001600160a01b0316906340c10f19906105089087908590600401611887565b600060405180830381600087803b15801561052257600080fd5b505af1158015610536573d6000803e3d6000fd5b505050507f913c992353dc81b7a8ba31496c484e9b6306bd2f6c509a649a38fdf5e1c953b28533868460405161056f9493929190611895565b60405180910390a1505060018055505050565b600260015414156105a55760405162461bcd60e51b815260040161030b90611836565b6002600155426105b58633610e27565b116105d25760405162461bcd60e51b815260040161030b90611907565b603554604051632969b12160e11b81526001600160a01b03909116906352d36242906106029088906004016117f1565b600060405180830381600087803b15801561061c57600080fd5b505af1158015610630573d6000803e3d6000fd5b5050506001600160a01b03861660008181526039602090815260408083203384528252808320603754948452603b909252909120549092506106729087611787565b61067c91906117bc565b816001015461068b9190611846565b6001820155805461069d908690611917565b81556001600160a01b0386166000908152603a60205260409020546106c3908690611917565b6001600160a01b038088166000908152603a602052604090819020929092556035549151631e3d9b8b60e31b815291169063f1ecdc58906107089089906004016117f1565b60206040518083038186803b15801561072057600080fd5b505afa158015610734573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610758919061193c565b156107d8576036546001600160a01b038781166000908152603a602052604090819020549051633a7a74bd60e21b8152919092169163e9e9d2f4916107a5918a918890889060040161195d565b600060405180830381600087803b1580156107bf57600080fd5b505af11580156107d3573d6000803e3d6000fd5b505050505b60335460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061080a9087908990600401611887565b602060405180830381600087803b15801561082457600080fd5b505af1158015610838573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085c919061193c565b507fa4195c37c2947bbe89165f03e320b6903116f0b10d8cfdb522330f7ce6f9fa24863386886040516108929493929190611895565b60405180910390a150506001805550505050565b600260015414156108c95760405162461bcd60e51b815260040161030b90611836565b6002600155426108d98633610e27565b116108f65760405162461bcd60e51b815260040161030b90611907565b603554604051632969b12160e11b81526001600160a01b03909116906352d36242906109269088906004016117f1565b600060405180830381600087803b15801561094057600080fd5b505af1158015610954573d6000803e3d6000fd5b505050506001600160a01b03851660008181526039602090815260408083203384528252808320603754948452603b90925282205481549193916109989190611787565b6109a291906117bc565b905060006109b98360010154836104c99190611846565b6037546001600160a01b038a166000908152603b6020526040902054919250906109e39089611787565b6109ed91906117bc565b6109f79083611846565b60018401558254610a09908890611917565b83556001600160a01b0388166000908152603a6020526040902054610a2f908890611917565b6001600160a01b03808a166000908152603a602052604090819020929092556035549151631e3d9b8b60e31b815291169063f1ecdc5890610a74908b906004016117f1565b60206040518083038186803b158015610a8c57600080fd5b505afa158015610aa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac4919061193c565b15610b44576036546001600160a01b038981166000908152603a602052604090819020549051633a7a74bd60e21b8152919092169163e9e9d2f491610b11918c918a908a9060040161195d565b600060405180830381600087803b158015610b2b57600080fd5b505af1158015610b3f573d6000803e3d6000fd5b505050505b6034546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990610b769089908590600401611887565b600060405180830381600087803b158015610b9057600080fd5b505af1158015610ba4573d6000803e3d6000fd5b505060335460405163a9059cbb60e01b81526001600160a01b03909116925063a9059cbb9150610bda9089908b90600401611887565b602060405180830381600087803b158015610bf457600080fd5b505af1158015610c08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2c919061193c565b507f913c992353dc81b7a8ba31496c484e9b6306bd2f6c509a649a38fdf5e1c953b288338884604051610c629493929190611895565b60405180910390a17fa4195c37c2947bbe89165f03e320b6903116f0b10d8cfdb522330f7ce6f9fa248833888a604051610c9f9493929190611895565b60405180910390a1505060018055505050505050565b6001600160a01b0382166000908152603a602052604081205415610e21576035546040516301686a8f60e51b81526000916001600160a01b031690632d0d51e090610d049087906004016117f1565b60206040518083038186803b158015610d1c57600080fd5b505afa158015610d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d549190611983565b6001600160a01b038086166000818152603960209081526040808320948916835293815283822060010154928252603a9052918220546037549394509092610d9c9085611787565b610da691906117bc565b6001600160a01b0387166000908152603b6020526040902054610dc991906117d0565b6037546001600160a01b038089166000908152603960209081526040808320938b1683529290522054919250610e1b91849190610e07908590611787565b610e1191906117bc565b6104c99190611846565b93505050505b92915050565b6001600160a01b038083166000908152603c60209081526040808320938516835292905290812054610e6b5760405162461bcd60e51b815260040161030b906119d8565b6038546001600160a01b038085166000908152603c6020908152604080832093871683529290522054610e9e91906117d0565b9392505050565b60026001541415610ec85760405162461bcd60e51b815260040161030b90611836565b6002600155603554604051631e3d9b8b60e31b81526001600160a01b039091169063f1ecdc5890610efd9088906004016117f1565b60206040518083038186803b158015610f1557600080fd5b505afa158015610f29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4d919061193c565b610f695760405162461bcd60e51b815260040161030b90611a1c565b6033546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90610f9d90339030908890600401611a2c565b602060405180830381600087803b158015610fb757600080fd5b505af1158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fef919061193c565b50603554604051632969b12160e11b81526001600160a01b03909116906352d36242906110209088906004016117f1565b600060405180830381600087803b15801561103a57600080fd5b505af115801561104e573d6000803e3d6000fd5b5050506001600160a01b03808716600090815260396020908152604080832093891683529290522054611083915084906117d0565b6001600160a01b038087166000818152603960209081526040808320948a16835293815283822094909455603754918152603b9093529120546110c69085611787565b6110d091906117bc565b6001600160a01b038087166000908152603960209081526040808320938916835292905220600101546111039190611a54565b6001600160a01b038087166000818152603960209081526040808320948a16835293815283822060010194909455908152603a9092529020546111479084906117d0565b6001600160a01b038087166000818152603a60208181526040808420968755603c82528084208b871685528252808420429055603654949093525292549251633a7a74bd60e21b815291169163e9e9d2f4916111ab9189918790879060040161195d565b600060405180830381600087803b1580156111c557600080fd5b505af11580156111d9573d6000803e3d6000fd5b505050507f66a9138482c99e9baf08860110ef332cc0c23b4a199a53593d8db0fc8f96fbfc85858560405161056f93929190611a2c565b600054610100900460ff16158080156112305750600054600160ff909116105b8061124a5750303b15801561124a575060005460ff166001145b6112665760405162461bcd60e51b815260040161030b90611adb565b6000805460ff191660011790558015611289576000805461ff0019166101001790555b6112928561133a565b61129b84611390565b6112a4836113db565b6112ad82611426565b6112b962093a80611471565b64e8d4a51000603755801561130d576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989061130490600190611aff565b60405180910390a15b5050505050565b6000808212156113365760405162461bcd60e51b815260040161030b90611b2f565b5090565b603380546001600160a01b0319166001600160a01b0383161790556040517f5ba6b30cd4b2f9e9e67f4feb9b9df10d5da3b057598e6901b217b7d590345e30906113859083906115d3565b60405180910390a150565b603480546001600160a01b0319166001600160a01b0383161790556040517f47c9042c3be42a955f60f9b75006522826af1a3bed83e26646997d3bcccda77c906113859083906115d3565b603580546001600160a01b0319166001600160a01b0383161790556040517f27a2474ca8353642fab173d2cadd631382797bbd4f01c76aa56f932bceaf580f906113859083906115d3565b603680546001600160a01b0319166001600160a01b0383161790556040517f476e1ab7433dee921bc37cd453322068187c39ca4847e6a0d4aa36f559b8461c906113859083906115d3565b60388190556040517ff83cccf9d4c5f0b2f475a2b0a0157a3ec7c2ebdfe2c11ba256779ab21e4ba54390611385908390611558565b60006001600160a01b038216610e21565b6114c0816114a6565b81146114cb57600080fd5b50565b8035610e21816114b7565b806114c0565b8035610e21816114d9565b6000806040838503121561150057611500600080fd5b600061150c85856114ce565b925050602061151d858286016114df565b9150509250929050565b60006020828403121561153c5761153c600080fd5b600061154884846114ce565b949350505050565b805b82525050565b60208101610e218284611550565b6000806040838503121561157c5761157c600080fd5b600061158885856114ce565b925050602061151d858286016114ce565b604081016115a78285611550565b610e9e6020830184611550565b6000610e21826114a6565b6000610e21826115b4565b611552816115bf565b60208101610e2182846115ca565b600080600080600060a086880312156115fc576115fc600080fd5b600061160888886114ce565b9550506020611619888289016114df565b945050604061162a888289016114ce565b935050606061163b888289016114ce565b925050608061164c888289016114df565b9150509295509295909350565b600080600080600060a0868803121561167457611674600080fd5b600061168088886114ce565b9550506020611691888289016114ce565b945050604061162a888289016114df565b6114c0816115b4565b8035610e21816116a2565b600080600080608085870312156116cf576116cf600080fd5b60006116db87876116ab565b94505060206116ec878288016116ab565b93505060406116fd878288016116ab565b925050606061170e878288016116ab565b91505092959194509250565b602781526000602082017f456c656374696f6e3a2063616c6c6572206d757374206265205374616b6520638152661bdb9d1c9858dd60ca1b602082015291505b5060400190565b60208082528101610e218161171a565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156117a1576117a1611771565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826117cb576117cb6117a6565b500490565b600082198211156117e3576117e3611771565b500190565b611552816114a6565b60208101610e2182846117e8565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291505b5060200190565b60208082528101610e21816117ff565b600082600160ff1b0182126000841215161561186457611864611771565b826001600160ff1b0301821360008412161561188257611882611771565b500390565b604081016115a782856117e8565b608081016118a382876117e8565b6118b060208301866117e8565b6118bd60408301856117e8565b6118ca6060830184611550565b95945050505050565b601881526000602082017f456c656374696f6e3a20766f74652069732066726f7a656e00000000000000008152915061182f565b60208082528101610e21816118d3565b60008282101561188257611882611771565b8015156114c0565b8051610e2181611929565b60006020828403121561195157611951600080fd5b60006115488484611931565b6080810161196b82876117e8565b6118b06020830186611550565b8051610e21816114d9565b60006020828403121561199857611998600080fd5b60006115488484611978565b601a81526000602082017f456c656374696f6e3a206e6f6e6578697374656e7420766f74650000000000008152915061182f565b60208082528101610e21816119a4565b601f81526000602082017f456c656374696f6e3a206e6f6e6578697374656e742063616e646964617465008152915061182f565b60208082528101610e21816119e8565b60608101611a3a82866117e8565b611a4760208301856117e8565b6115486040830184611550565b6000816001600160ff1b0303831360008312151615611a7557611a75611771565b81600160ff1b0383126000831216156117e3576117e3611771565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181526d191e481a5b9a5d1a585b1a5e995960921b6020820152915061175a565b60208082528101610e2181611a90565b600060ff8216610e21565b61155281611aeb565b60208101610e218284611af6565b600b81526000602082016a0496e7465676572203c20360ac1b8152915061182f565b60208082528101610e2181611b0d56fea2646970667358221220e25107854a89b8b7c33fe7fb95581c6a767b35276af6e7f4f5bdb4dd5f5e5e7564736f6c63430008090033",
  "devdoc": {
    "author": "Alexandas",
    "details": "Election contract",
    "kind": "dev",
    "methods": {
      "claim(address,address)": {
        "details": "voter claim reward for a specific candidate",
        "params": {
          "candidate": "candidate address",
          "to": "receiver address"
        }
      },
      "initialize(address,address,address,address)": {
        "details": "proxy initialize function",
        "params": {
          "_majorCandidates": "`MajorCandidates` contract",
          "_rewarder": "`Rewarder` contract",
          "_stake": "`Stake` contract",
          "_token": "ERC20 token address"
        }
      },
      "onAllocate(address,uint256)": {
        "details": "candidate allocate reward for the voters",
        "params": {
          "amount": "reward amount",
          "candidate": "candidate address"
        }
      },
      "pendingReward(address,address)": {
        "details": "pending reward for a voter given a candidate",
        "params": {
          "candidate": "candidate address",
          "voter": "voter address"
        },
        "returns": {
          "pending": "pending reward"
        }
      },
      "vote(address,address,uint256,address,uint256)": {
        "details": "voter vote a specific candidate",
        "params": {
          "amount": "reward amount",
          "anchor": "anchor candidate address",
          "candidate": "candidate address",
          "maxSlippage": "maximum rank change value for the candidate from the anchor candidate",
          "voter": "voter address"
        }
      },
      "withdraw(address,uint256,address,address,uint256)": {
        "details": "voter withdraw reward for a specific candidate",
        "params": {
          "amount": "reward amount",
          "anchor": "anchor candidate address",
          "candidate": "candidate address",
          "maxSlippage": "maximum rank change value for the candidate from the anchor candidate",
          "to": "receiver address"
        }
      },
      "withdrawAndClaim(address,uint256,address,address,uint256)": {
        "details": "voter withdraw votes and claim reward for a specific candidate",
        "params": {
          "amount": "reward amount",
          "anchor": "anchor candidate address",
          "candidate": "candidate address",
          "maxSlippage": "maximum rank change value for the candidate from the anchor candidate",
          "to": "receiver address"
        }
      }
    },
    "stateVariables": {
      "ACC_PRECISION": {
        "details": "return precision for shares"
      },
      "accPerShares": {
        "details": "return shares for a specific candidate"
      },
      "lastVoteTime": {
        "details": "last vote timestamp for voter"
      },
      "majorCandidates": {
        "details": "return `MajorCandidates` contract address"
      },
      "rewarder": {
        "details": "return `Rewarder` contract address"
      },
      "stake": {
        "details": "return `Stake` contract address"
      },
      "token": {
        "details": "return ERC20 token address"
      },
      "voteFrozenPeriod": {
        "details": "vote frozen period"
      },
      "voteSupply": {
        "details": "return votes for a specific candidate"
      },
      "voters": {
        "details": "return voter inforamtion"
      }
    },
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 138,
        "contract": "contracts/election/Election.sol:Election",
        "label": "_initialized",
        "offset": 0,
        "slot": "0",
        "type": "t_uint8"
      },
      {
        "astId": 141,
        "contract": "contracts/election/Election.sol:Election",
        "label": "_initializing",
        "offset": 1,
        "slot": "0",
        "type": "t_bool"
      },
      {
        "astId": 423,
        "contract": "contracts/election/Election.sol:Election",
        "label": "_status",
        "offset": 0,
        "slot": "1",
        "type": "t_uint256"
      },
      {
        "astId": 467,
        "contract": "contracts/election/Election.sol:Election",
        "label": "__gap",
        "offset": 0,
        "slot": "2",
        "type": "t_array(t_uint256)49_storage"
      },
      {
        "astId": 3796,
        "contract": "contracts/election/Election.sol:Election",
        "label": "token",
        "offset": 0,
        "slot": "51",
        "type": "t_contract(IERC20)5771"
      },
      {
        "astId": 3801,
        "contract": "contracts/election/Election.sol:Election",
        "label": "rewarder",
        "offset": 0,
        "slot": "52",
        "type": "t_contract(IRewarder)6195"
      },
      {
        "astId": 3806,
        "contract": "contracts/election/Election.sol:Election",
        "label": "stake",
        "offset": 0,
        "slot": "53",
        "type": "t_contract(IStake)6698"
      },
      {
        "astId": 3811,
        "contract": "contracts/election/Election.sol:Election",
        "label": "majorCandidates",
        "offset": 0,
        "slot": "54",
        "type": "t_contract(IMajorCandidates)6050"
      },
      {
        "astId": 3815,
        "contract": "contracts/election/Election.sol:Election",
        "label": "ACC_PRECISION",
        "offset": 0,
        "slot": "55",
        "type": "t_uint256"
      },
      {
        "astId": 3818,
        "contract": "contracts/election/Election.sol:Election",
        "label": "voteFrozenPeriod",
        "offset": 0,
        "slot": "56",
        "type": "t_uint256"
      },
      {
        "astId": 3826,
        "contract": "contracts/election/Election.sol:Election",
        "label": "voters",
        "offset": 0,
        "slot": "57",
        "type": "t_mapping(t_address,t_mapping(t_address,t_struct(VoterInfo)3791_storage))"
      },
      {
        "astId": 3832,
        "contract": "contracts/election/Election.sol:Election",
        "label": "voteSupply",
        "offset": 0,
        "slot": "58",
        "type": "t_mapping(t_address,t_uint256)"
      },
      {
        "astId": 3837,
        "contract": "contracts/election/Election.sol:Election",
        "label": "accPerShares",
        "offset": 0,
        "slot": "59",
        "type": "t_mapping(t_address,t_uint256)"
      },
      {
        "astId": 3844,
        "contract": "contracts/election/Election.sol:Election",
        "label": "lastVoteTime",
        "offset": 0,
        "slot": "60",
        "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_uint256)49_storage": {
        "base": "t_uint256",
        "encoding": "inplace",
        "label": "uint256[49]",
        "numberOfBytes": "1568"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      },
      "t_contract(IERC20)5771": {
        "encoding": "inplace",
        "label": "contract IERC20",
        "numberOfBytes": "20"
      },
      "t_contract(IMajorCandidates)6050": {
        "encoding": "inplace",
        "label": "contract IMajorCandidates",
        "numberOfBytes": "20"
      },
      "t_contract(IRewarder)6195": {
        "encoding": "inplace",
        "label": "contract IRewarder",
        "numberOfBytes": "20"
      },
      "t_contract(IStake)6698": {
        "encoding": "inplace",
        "label": "contract IStake",
        "numberOfBytes": "20"
      },
      "t_int256": {
        "encoding": "inplace",
        "label": "int256",
        "numberOfBytes": "32"
      },
      "t_mapping(t_address,t_mapping(t_address,t_struct(VoterInfo)3791_storage))": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => mapping(address => struct Election.VoterInfo))",
        "numberOfBytes": "32",
        "value": "t_mapping(t_address,t_struct(VoterInfo)3791_storage)"
      },
      "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => mapping(address => uint256))",
        "numberOfBytes": "32",
        "value": "t_mapping(t_address,t_uint256)"
      },
      "t_mapping(t_address,t_struct(VoterInfo)3791_storage)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => struct Election.VoterInfo)",
        "numberOfBytes": "32",
        "value": "t_struct(VoterInfo)3791_storage"
      },
      "t_mapping(t_address,t_uint256)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => uint256)",
        "numberOfBytes": "32",
        "value": "t_uint256"
      },
      "t_struct(VoterInfo)3791_storage": {
        "encoding": "inplace",
        "label": "struct Election.VoterInfo",
        "members": [
          {
            "astId": 3788,
            "contract": "contracts/election/Election.sol:Election",
            "label": "amount",
            "offset": 0,
            "slot": "0",
            "type": "t_uint256"
          },
          {
            "astId": 3790,
            "contract": "contracts/election/Election.sol:Election",
            "label": "rewardDebt",
            "offset": 0,
            "slot": "1",
            "type": "t_int256"
          }
        ],
        "numberOfBytes": "64"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      },
      "t_uint8": {
        "encoding": "inplace",
        "label": "uint8",
        "numberOfBytes": "1"
      }
    }
  }
}