Skip to content

Instantly share code, notes, and snippets.

@guerrap
Last active November 21, 2022 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guerrap/1a679d7f5d010a3fc7886f1c09205837 to your computer and use it in GitHub Desktop.
Save guerrap/1a679d7f5d010a3fc7886f1c09205837 to your computer and use it in GitHub Desktop.
[Community Instructions] Update dxstats.eth content hash to v1.6.0

[Community Instructions] Update dxstats.eth content hash to v1.7.1

Dxstats v1.7.1 has been released. This post describes instructions to update dxstats.eth content hash record to deploy the release by the DXdao community.

DAO Base

Alchemy https://alchemy.daostack.io/dao/0x519b70055af55a007110b4ff99b0ea33071c720a

Use DXdao ENS Proposal until Alchemy is back online.

Proposal Scheme and Parameters

Schema Name: GenericSchemeENSPublicResolver

Method: setContenthash(node bytes32, hash bytes)

Proposal Title

Update dxstats.eth content hash to Dxstats v1.7.1

Proposal Description

This proposal updates the dxstats.eth resolver's content hash to Dxstats v1.7.1.

Verify the Build Content Identifier (CID)

Clone the repo and checkout the release tag:

git clone https://github.com/SwaprDAO/swapr-info && cd swapr-info && git checkout v1.7.1

Using Node v16.14.0, install dependencies using Yarn in CI:

yarn install --frozen-lockfile

Build the dapp

yarn ipfs-build

Calculate the content hash to IPFS using IPFS CLI

ipfs add -rn ./build

The build CID should match QmdDY98x8RaPzifGM3xxQsetLC8pVWGb2hxLNAg669basB

Calldata to ENS Public Resolver

Method: setContenthash(node bytes32, hash bytes)

Calldata (string):

node = dxstats.eth
hash = ipfs://QmdDY98x8RaPzifGM3xxQsetLC8pVWGb2hxLNAg669basB

Obtain bytes values

The node hash value is obtained using namehash:

ethers.utils.namehash('dxstats.eth')

The content hash is obtained using content-hash:

const contentHash = require("@ensdomains/content-hash")

contentHash.fromIpfs('QmdDY98x8RaPzifGM3xxQsetLC8pVWGb2hxLNAg669basB')

Calldata (bytes):

node = 0xf81244a480db48f38b9b4685898b9af34eef3227191aa1f3d7da4544aa434897
hash = 0xe30101701220dd0ccfb092e26502be97e89e442e77fb1110a9aaaee128c1016e65759808b2b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment