Smart Contracts (Testnet)

Module: election
back to overview
election
Methods: 4
Instances: 5
Initialization

Parameters
{
  "admin_account": "<AccountAddress>",
  "candidates": [
    {
      "hash": "<String of size 64 containing lowercase hex characters.>",
      "url": "<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": []
    },
    {
      "MalformedConfig": []
    },
    {
      "MalformedElectionResult": []
    },
    {
      "ElectionClosed": []
    },
    {
      "Inconclusive": []
    }
  ]
}
Event
None
Methods

Parameters
[
  "<UInt8>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "MalformedConfig": []
    },
    {
      "MalformedElectionResult": []
    },
    {
      "ElectionClosed": []
    },
    {
      "Inconclusive": []
    }
  ]
}
Return
None

Parameters
[
  "<UInt64>"
]
Errors
{
  "Enum": [
    {
      "ParseParams": []
    },
    {
      "Unauthorized": []
    },
    {
      "MalformedConfig": []
    },
    {
      "MalformedElectionResult": []
    },
    {
      "ElectionClosed": []
    },
    {
      "Inconclusive": []
    }
  ]
}
Return
None

Parameters
None
Errors
None
Return
{
  "admin_account": "<AccountAddress>",
  "candidates": [
    {
      "hash": "<String of size 64 containing lowercase hex characters.>",
      "url": "<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>"
  ]
}

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


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