Skip to main content

Register Voter

In order to vote for an idea, it is first required that the contract's admin account registers the voter address. Indeed the vote entry point checks that the caller is registered, otherwise it fails.

To do so, it is necessary to call the register entry point of the smart contract. This entry point may only be called by the contract's admin account at address tz1MZrh8CvYkp7BfLQMcm6mg5FvL5HRZfACw. The section below presents how to import this account in the wallet.

Import admin account#

The process to is two-steps:

  1. download the admin faucet file (instructions)
  2. import it in wallet (instructions)

It is suggested that you name that account "Admin" for ease of use.

Register transaction#

The register entry point, called by the admin account, takes the voter account address as parameter.

The contract is available at this address:

KT1QMowNVCUngertU7bAeoZmU7XYm3gphE69

This section presents how to invoke the register entry point with the smart contract indexer Better Call Dev. Click the button blow to open the smart contract:

Click on the "Interact" tab and enter the parameters as presented above.

Below is an example screenshot (with parameter set to tz1dZydwVDuz6SH5jCUfCQjqV8YCQimL9GCp) of the interact panel:

Docusaurus with Keytar

If you don't have a dedicated user account, go to this previous section.

Once user address set, click on the "Execute" button and select "Thanos". A confirm popup should be displayed:

Docusaurus with Keytar

You may check the transation parameters in the "Operations" section:

[{    "kind":"transaction"    "to":"KT1QMowNVCUngertU7bAeoZmU7XYm3gphE69"    "amount":0    "mutez":true    "parameter":{        "entrypoint":"register"        "value":{            "string":"tz1dZydwVDuz6SH5jCUfCQjqV8YCQimL9GCp"        }    }}]

Once sent, the transaction should take a minute to be confirmed. When confirmed, you may click on 'storage' tab to visualize the contract storage and check that your user account is in the voters' list:

Docusaurus with Keytar

Next step is to go to the user interface to vote for or add a new idea!