Smart Contracts (Testnet)

Module: election
back to overview
election
Methods: 12
Instances: 3
Initialization

Parameters
{
  "admin_account": "<AccountAddress>",
  "candidates": [
    {
      "hash": "<String of size 64 containing lowercase hex characters.>",
      "url": "<String>"
    }
  ],
  "delegation_string": "<String>",
  "election_description": "<String>",
  "election_end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "election_manifest": {
    "hash": "<String of size 64 containing lowercase hex characters.>",
    "url": "<String>"
  },
  "election_parameters": {
    "hash": "<String of size 64 containing lowercase hex characters.>",
    "url": "<String>"
  },
  "election_start": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "eligible_voters": {
    "hash": "<String of size 64 containing lowercase hex characters.>",
    "url": "<String>"
  },
  "guardians": [
    "<AccountAddress>"
  ]
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Event
None
Methods

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
{
  "Enum": [
    {
      "VerificationFailed": [
        "<String>"
      ]
    },
    {
      "VerificationSuccessful": []
    }
  ]
}
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
None
Errors
None
Return
[
  [
    "<AccountAddress>",
    {
      "decryption_share": {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              [
                "<UInt8>"
              ]
            ]
          }
        ]
      },
      "decryption_share_proof": {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              [
                "<UInt8>"
              ]
            ]
          }
        ]
      },
      "encrypted_share": {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              [
                "<UInt8>"
              ]
            ]
          }
        ]
      },
      "index": "<UInt32>",
      "public_key": {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              [
                "<UInt8>"
              ]
            ]
          }
        ]
      },
      "status": {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              {
                "Enum": [
                  {
                    "VerificationFailed": [
                      "<String>"
                    ]
                  },
                  {
                    "VerificationSuccessful": []
                  }
                ]
              }
            ]
          }
        ]
      }
    }
  ]
]

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
[
  "<UInt64>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
None

Parameters
None
Errors
None
Return
{
  "admin_account": "<AccountAddress>",
  "candidates": [
    {
      "hash": "<String of size 64 containing lowercase hex characters.>",
      "url": "<String>"
    }
  ],
  "delegation_string": "<String>",
  "election_description": "<String>",
  "election_end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "election_manifest": {
    "hash": "<String of size 64 containing lowercase hex characters.>",
    "url": "<String>"
  },
  "election_parameters": {
    "hash": "<String of size 64 containing lowercase hex characters.>",
    "url": "<String>"
  },
  "election_start": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
  "eligible_voters": {
    "hash": "<String of size 64 containing lowercase hex characters.>",
    "url": "<String>"
  },
  "guardian_keys": [
    [
      "<UInt8>"
    ]
  ]
}

Parameters
None
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
{
  "Enum": [
    {
      "None": []
    },
    {
      "Some": [
        [
          {
            "candidate": {
              "hash": "<String of size 64 containing lowercase hex characters.>",
              "url": "<String>"
            },
            "cummulative_votes": "<UInt64>"
          }
        ]
      ]
    }
  ]
}

Parameters
None
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "Malformed": []
    },
    {
      "IncorrectElectionPhase": []
    },
    {
      "DuplicateEntry": []
    }
  ]
}
Return
{
  "Enum": [
    {
      "None": []
    },
    {
      "Some": [
        [
          "<UInt8>"
        ]
      ]
    }
  ]
}


Release: 2024.12
Support CCDExplorer.io Uptime Backend Status CCDExplorer is supported by AesirX - Decentralized Consent & Data Ownership