Skip to content

Commit

Permalink
f: feat: add script to create input and internals of gobject prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
coolaj86 committed Aug 7, 2024
1 parent 99cc17f commit 0191405
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/gobject-pre-prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ async function main() {
let selected = DashGov.selectEstimates(estimates, startPeriod, endPeriod);
let gobjData = DashGov.proposal.draftJson(selected, {
name,
url,
payment_address,
payment_amount,
url,
});

let now = Date.now();
Expand All @@ -53,8 +53,8 @@ async function main() {
let gobjCollateralBytes = DashGov.serializeForCollateralTx(gobj);
let gobjCollateralHex = DashGov.utils.bytesToHex(gobjCollateralBytes);

let gobjHashBytes = await DashGov.proposal.doubleSha256(gobjCollateralBytes);
let gobjId = DashGov.utils.bytesToHex(gobjHashBytes);
let gobjHashBytes = await DashGov.utils.doubleSha256(gobjCollateralBytes);
let gobjId = DashGov.utils.hashToId(gobjHashBytes);

console.log(
"gobject prepare",
Expand Down

0 comments on commit 0191405

Please sign in to comment.