consensusContract top-level constant

Contract const consensusContract

Implementation

const consensusContract = Contract(
  contractAddress: consensusContractAddress,
  abi: [
    // Register block producer
    {
      "type": "function",
      "name": "RegisterSBP",
      "inputs": [
        {"name": "sbpName", "type": "string"},
        {"name": "blockProducingAddress", "type": "address"},
        {"name": "rewardWithdrawAddress", "type": "address"}
      ]
    },
    // Update block producing address
    {
      "type": "function",
      "name": "UpdateSBPBlockProducingAddress",
      "inputs": [
        {"name": "sbpName", "type": "string"},
        {"name": "blockProducingAddress", "type": "address"}
      ]
    },
    // Update reward withdrawal address
    {
      "type": "function",
      "name": "UpdateSBPRewardWithdrawAddress",
      "inputs": [
        {"name": "sbpName", "type": "string"},
        {"name": "rewardWithdrawAddress", "type": "address"}
      ]
    },
    // Cancel block producer
    {
      "type": "function",
      "name": "RevokeSBP",
      "inputs": [
        {"name": "sbpName", "type": "string"}
      ]
    },
    // Withdraw block producing reward
    {
      "type": "function",
      "name": "WithdrawSBPReward",
      "inputs": [
        {"name": "sbpName", "type": "string"},
        {"name": "receiveAddress", "type": "address"}
      ]
    },
    // Vote for block producer
    {
      "type": "function",
      "name": "VoteForSBP",
      "inputs": [
        {"name": "sbpName", "type": "string"}
      ]
    },
    // Cancel voting
    {"type": "function", "name": "CancelSBPVoting", "inputs": []}
  ],
);