diff --git a/docs/dao-constitution.md b/docs/dao-constitution.md index 7a475997..555ec8be 100644 --- a/docs/dao-constitution.md +++ b/docs/dao-constitution.md @@ -5,7 +5,7 @@ sidebar_label: The Constitution of the Arbitrum DAO description: Read "The Constitution of the Arbitrum DAO", the ultimate governing document of the Arbitrum DAO. Arbitrum DAO's smart contracts implement the protocols described in this document. --- -import ConstitutionPartial from '@site/docs/partials/_constitution-content-partial.md'; +import ConstitutionPartial from '@site/docs/partials/_constitution-content-partial.mdx'; import { ConstitutionHash } from '@site/src/components/ConstitutionHash' import { PendingConstitutionNotice } from '@site/src/components/PendingConstitutionNotice' @@ -25,5 +25,5 @@ import { PendingConstitutionNotice } from '@site/src/components/PendingConstitu To compute this hash yourself, you can clone [ArbitrumFoundation/docs](https://github.com/ArbitrumFoundation/docs) to your local machine and run `yarn update-constitution-hash` from the root directory of the repo. Alternatively, you can install [Node.js](https://nodejs.org/en/), navigate to the `docs` folder, and run `node ./scripts/updateConstitutionHash.js`. -This will use the `keccak256` method from the [@ethersproject/solidity](https://github.com/ethers-io/ethers.js#readme) project to compute the hash of the Constitution's markdown source code, located in [`/ArbitrumFoundation/docs/blob/main/docs/partials/_constitution-content-partial.md`](https://github.com/ArbitrumFoundation/docs/blob/main/docs/partials/_constitution-content-partial.md). +This will use the `keccak256` method from the [@ethersproject/solidity](https://github.com/ethers-io/ethers.js#readme) project to compute the hash of the Constitution's markdown source code, located in [`/ArbitrumFoundation/docs/blob/main/docs/partials/_constitution-content-partial.mdx`](https://github.com/ArbitrumFoundation/docs/blob/main/docs/partials/_constitution-content-partial.mdx). diff --git a/docs/partials/_constitution-content-partial.md b/docs/partials/_constitution-content-partial.mdx similarity index 89% rename from docs/partials/_constitution-content-partial.md rename to docs/partials/_constitution-content-partial.mdx index baa1f4b5..f289b6ab 100644 --- a/docs/partials/_constitution-content-partial.md +++ b/docs/partials/_constitution-content-partial.mdx @@ -7,7 +7,8 @@ the ArbitrumDAO took effect on the date upon which AIP-1 was posted, located at \n \n ', + ' ', + ); + const constitutionHash = keccak256(['string'], [normalized]); + if (constitutionHash !== EXPECTED_HASH) { + console.error('Constitution content has changed — the normalization hack in this script is no longer needed.'); + console.error('Please remove the TEMPORARY HACK block and hash directly from the raw file content.'); + process.exit(1); + } fs.writeFileSync( './src/components/ConstitutionHash/constitutionHash.json', JSON.stringify({ constitutionHash }) diff --git a/src/components/ConstitutionHash/constitutionHash.json b/src/components/ConstitutionHash/constitutionHash.json index eb957940..38b29d72 100644 --- a/src/components/ConstitutionHash/constitutionHash.json +++ b/src/components/ConstitutionHash/constitutionHash.json @@ -1 +1 @@ -{"constitutionHash":"0xaab5f245cfb0475d03f6a323db09181ec9c25e5d95c6c6d660660242cfed8630"} \ No newline at end of file +{"constitutionHash":"0x263080bed3962d0476fa84fbb32ab81dfff1244e2b145f9864da24353b2f3b05"} \ No newline at end of file