Skip to content

Conversation

@andreibancioiu
Copy link
Contributor

@andreibancioiu andreibancioiu commented Apr 14, 2025

Reverse engineering of https://github.com/multiversx/mx-governance-service.

Copied some components from mx-governance-service and added a little bit of glue code, so that we can export governance proofs into a single file (quite useful for some internal tools).

These scripts should be placed somewhere else (this is not a good home for them).

Steps to generate proofs:

  1. clone this branch
  2. npm install
  3. copy the governance snapshots (JSON) to the folder snapshots
  4. get the root hashes (using mxpy, see below)
  5. set the root hashes in the dummy script src/governance/sandbox.spec.ts
  6. npm run test
  7. copy the newly generated files to https://github.com/multiversx/mx-bulk-ops-wizard/tree/main/governance_proofs

How to get root hashes (example for Supernova - for liquid staking providers Hatom and xLend):

mxpy contract query erd1qqqqqqqqqqqqqpgq2khda0rx207gvlqg92dq5rh0z03a8dqf78ssu0qlcc --function getProposalRootHash --proxy https://gateway.multiversx.com/ --arguments 0x02
[
    "e8fe84b2dcf17376a30cb99b4097a5493d94a81d39138874591762fb68506255"
]

mxpy contract query erd1qqqqqqqqqqqqqpgqdnpmeseu3j5t7grds9dfj8ttt70pev66ah0sydkq9x --function getProposalRootHash --proxy https://gateway.multiversx.com/ --arguments 0x02
[
    "8d45b99f1b9ccb1eb5abb0c817fc160be792543dcbdbc53a6a2281b047e72ff2"
]

@andreibancioiu andreibancioiu self-assigned this Apr 14, 2025
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

Successfully merging this pull request may close these issues.

2 participants