diff --git a/packages/website/pages/docs/guides/enable-a-proposer.mdx b/packages/website/pages/docs/guides/enable-a-proposer.mdx index 611e35fecaf..22407398590 100644 --- a/packages/website/pages/docs/guides/enable-a-proposer.mdx +++ b/packages/website/pages/docs/guides/enable-a-proposer.mdx @@ -1,4 +1,4 @@ -import { Callout, Steps } from "nextra-theme-docs"; +import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs"; import { contractAddressToLink } from "../../../utils/contractAddressToLink"; import { SEPOLIA_CONFIG, GRIMSVOTN_CONFIG } from "../../../domain/chain"; import { StyledLink } from "/components/StyledLink"; @@ -25,10 +25,34 @@ nano .env ### Set environment variables to enable a proposer - + Do **not** use a private key that is valuable to you. The private key will be stored in plain text in the `.env` file, and this is not secure. There is a real risk of losing your assets. You should **only use a test account**. + + To generate an isolated burner wallet locally: + + + + ```shell + cast wallet new | tee /dev/tty | + grep 'Private key:' | awk '{print "export PRIVATE_KEY="$3}' >> .env && source .env + ``` + + + ```js + var ethers = require('ethers'); + var crypto = require('crypto'); + + var id = crypto.randomBytes(32).toString('hex'); + var privateKey = "0x"+id; + console.log("SAVE BUT DO NOT SHARE THIS:", privateKey); + + var wallet = new ethers.Wallet(privateKey); + console.log("Address: " + wallet.address); + ``` + + Set the following environment variables to enable your node as a proposer: diff --git a/packages/website/pages/docs/guides/enable-a-prover.mdx b/packages/website/pages/docs/guides/enable-a-prover.mdx index c8536faa8c8..c558ff92e84 100644 --- a/packages/website/pages/docs/guides/enable-a-prover.mdx +++ b/packages/website/pages/docs/guides/enable-a-prover.mdx @@ -1,5 +1,5 @@ import Image from "next/image"; -import { Callout, Steps } from "nextra-theme-docs"; +import { Callout, Steps, Tab, Tabs } from "nextra-theme-docs"; # Enable a prover @@ -22,10 +22,34 @@ nano .env ### Set environment variables to enable prover - + Do **not** use a private key that is valuable to you. The private key will be - stored in plain text in the `.env` and this is not secure. There is a real - risk of losing your assets. You should **only use a test account**. + stored in plain text in the `.env` file, and this is not secure. There is a + real risk of losing your assets. You should **only use a test account**. + + To generate an isolated burner wallet locally: + + + + ```shell + cast wallet new | tee /dev/tty | + grep 'Private key:' | awk '{print "export PRIVATE_KEY="$3}' >> .env && source .env + ``` + + + ```js + var ethers = require('ethers'); + var crypto = require('crypto'); + + var id = crypto.randomBytes(32).toString('hex'); + var privateKey = "0x"+id; + console.log("SAVE BUT DO NOT SHARE THIS:", privateKey); + + var wallet = new ethers.Wallet(privateKey); + console.log("Address: " + wallet.address); + ``` + + Open the `.env` file and set the following environment variables to enable your node as a prover: