[
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "_hubContractAddress",
        "type": "bytes32"
      },
      {
        "internalType": "uint16",
        "name": "_hubContractChainId",
        "type": "uint16"
      },
      {
        "internalType": "contract IVotes",
        "name": "_token",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "_targetSecondsPerBlock",
        "type": "uint256"
      },
      {
        "internalType": "uint16",
        "name": "_chainId",
        "type": "uint16"
      },
      {
        "internalType": "address",
        "name": "_wormholeRelayerAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_magistrateAddress",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "AddressInsufficientBalance",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "FailedInnerCall",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "InvalidIntendedRecipient",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint8",
        "name": "support",
        "type": "uint8"
      }
    ],
    "name": "InvalidVoteType",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "MessageAlreadyProcessed",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "NotStartedVote",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OnlyMessagesFromHub",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "OnlyRelayerAllowed",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "ProposalIdMustBeUnique",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "RelaySendFailed",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "VoteAlreadyCast",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "VoteFinished",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "VoteNotActive",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "VoteNotFinished",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "ZeroBalance",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "version",
        "type": "uint8"
      }
    ],
    "name": "Initialized",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousMagistrate",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newMagistrate",
        "type": "address"
      }
    ],
    "name": "MagistrateChanged",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "voter",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "proposalId",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "uint8",
        "name": "support",
        "type": "uint8"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "weight",
        "type": "uint256"
      },
      {
        "indexed": false,
        "internalType": "string",
        "name": "reason",
        "type": "string"
      }
    ],
    "name": "VoteCast",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "proposalId",
        "type": "uint256"
      },
      {
        "internalType": "uint8",
        "name": "support",
        "type": "uint8"
      }
    ],
    "name": "castVote",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "chainId",
    "outputs": [
      {
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "proposalId",
        "type": "uint256"
      },
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "hasVoted",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "hubContractAddress",
    "outputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "hubContractChainId",
    "outputs": [
      {
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "proposalId",
        "type": "uint256"
      }
    ],
    "name": "isProposal",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "magistrate",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }
    ],
    "name": "processedMessages",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "proposalVotes",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "againstVotes",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "forVotes",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "abstainVotes",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "name": "proposals",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "proposalCreation",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "localVoteStart",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "localVoteEnd",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "localVoteStartBlock",
        "type": "uint256"
      },
      {
        "internalType": "bool",
        "name": "voteFinished",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes",
        "name": "payload",
        "type": "bytes"
      },
      {
        "internalType": "bytes[]",
        "name": "",
        "type": "bytes[]"
      },
      {
        "internalType": "bytes32",
        "name": "sourceAddress",
        "type": "bytes32"
      },
      {
        "internalType": "uint16",
        "name": "sourceChain",
        "type": "uint16"
      },
      {
        "internalType": "bytes32",
        "name": "deliveryHash",
        "type": "bytes32"
      }
    ],
    "name": "receiveWormholeMessages",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "proposalId",
        "type": "uint256"
      }
    ],
    "name": "sendVoteResultToHub",
    "outputs": [],
    "stateMutability": "payable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "targetSecondsPerBlock",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "token",
    "outputs": [
      {
        "internalType": "contract IVotes",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newMagistrate",
        "type": "address"
      }
    ],
    "name": "transferMagistrate",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "withdraw",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "wormholeRelayer",
    "outputs": [
      {
        "internalType": "contract IWormholeRelayer",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "stateMutability": "payable",
    "type": "receive"
  }
]
