Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Node Admin Control Center #264

Open
JeffWScott opened this issue Oct 14, 2022 · 1 comment
Open

FEATURE: Node Admin Control Center #264

JeffWScott opened this issue Oct 14, 2022 · 1 comment

Comments

@JeffWScott
Copy link
Contributor

Node Admin Control Center

Task

Node owners need a page that allows them to view, create and act on governance motions.

Requirements:

Create a new menu item called "Node Admin" which has the following information:

  1. Details on the current open motion (if one exists)
    • Type of motion (stamp, masternode addition, DAO, etc)

    • date/time started deadline for response

    • current votes, something like 8 ✅ / 2 ❌

    • status

      • would say "passed" if enough votes are currently in to determine the motion passed.
      • would say "failed" if enough votes are currently in to determine the motion failed.
      • would say "open" if not enough information to determine pass or fail
    • A list of all nodes and their current response to the right of the node vk.

      • If the node responded YAY then show a checkmark. If the node responded NAY show an X and if the node has not responded yet show "pending"
      • If the node is controlled by the user using the wallet and the node has not responded then show YAY and NAY buttons where the "pending" would be.
      • Filter the user's nodes to the top.
  2. A list of nodes that the wallet owner has. This should can be auto-populated because you can compare the masternodes.S:members smart contract value to the user's accounts storage and determine that a user owns one of the nodes in the network.
  3. An Add New Node button that lets the user add a node to their node list. This would happen if a user is prepping to add a new node to the network but isn't voted in yet.
  4. Links to Node documentation (install instructions and architecture).
  5. A Create new motion button that opens a "Create Motion" modal
    • A dropdown of all the nodes that the user controls, they must pick one
    • when a node is selected enable a dropdown of the available motion types
    • when a motion type is selected then show input boxes to allow the input of info specific to each motion type (check below for motion descriptions)
    • a "submit motion" button that when clicked shows the TxDetails screen that shows the tx to be sent with a "confirm button that sends the tx to the blockchain.
      • show the tx success/fail message box

MORE TO COME

@JeffWScott
Copy link
Contributor Author

Election House

election_house.py

Purpose

The main contract which controls the voting on policies. Policies are other smart contracts that have an "interface" and are registered on this contract.

Hashes:

  • policies: A hash of all the currently registered policies

Variables

  • policy_interface: A list of functions that a registered policy contract MUST contain

Methods:

register_policy

args

  • contact: str the name of the smart contract to register

Used to register a policy contract.
Any contract that is to be registered must be OWNED by election_house.
If the policy passes the interface check then it is added to the policies hash with a value of True.

current_value_for_policy

args

  • policy: str a name of a policy
    Imports and returns the policy if it exists

vote

args

  • policy: str a name of a policy
  • value: any some value that will be passed to the registered policies vote method

once determining that the policy exists it will import the policy supplied in the policy arg and then call vote on that policy, passing in the callers vk and the value arg.

Relevant Items to Issue

  1. The keys of the election_house.policies hash are effectively a list of all current governance policies.
  2. All voting runs through this contract. The value arg for the vote method needs to be created differently depending on the name of the policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant