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

Doc: how to use the WIP #3

Open
coolaj86 opened this issue Aug 7, 2024 · 0 comments
Open

Doc: how to use the WIP #3

coolaj86 opened this issue Aug 7, 2024 · 0 comments

Comments

@coolaj86
Copy link
Member

coolaj86 commented Aug 7, 2024

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"
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