Skip to content

Doc: how to use the WIP #3

@coolaj86

Description

@coolaj86

The demo is hard-coded for testnet right now. See usage in ./bin/gobject-prepare.js for an implementation that can be adapted to the browser.

  1. Clone and install the project:
    git clone https://github.com/dashhive/DashGov.js.git
    pushd ./DashGov.js/
    npm ci
  2. Load a private key with 1.00001000 DASH to use as the burn address (mistakenly called collateral in the DashCore docs)
    (not related to coinjoin, just as a number that happens to work without fee calculation or change)
    payment_address="$(dash-cli -testnet getnewaddress)"
    burn_address="$(dash-cli -testnet getnewaddress)"
    dash-cli -testnet sendtoaddress "$burn_address" 1.00001000
    dash-cli -testnet dumpprivkey "$burn_address" > "$burn_address".wif
  3. See a preview of the upcoming voting periods
    ./bin/gobject-prepare.js <start-index> <count> <amount>
    ./bin/gobject-prepare.js 1 12
    Screenshot 2024-08-07 at 11 01 24 AM
  4. Create a proposal
    NOTE The proposal names MUST BE UNIQUE (so change 001 to your favorite number)
    ./bin/gobject-prepare.js 1 3 100 https://example.com/proposal-001 proposal-001 "$payment_address" "$burn_address".wif
    Success ends with a gobject id that will be available to query after a few blocks are confirmed
  5. Confirm the details of the proposal
    # found in the `result` of the last message above
    dash-cli -testnet gobject get "$gobj_id"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions