GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — rigs/ethereum/scripts/proof.ts at main · tablelandnetwork/rigs Expand file tree/ Copy pathproof.tsMore file actions 50 lines (43 loc) · 1.43 KB / Copy pathproof.tsFile metadata and controls50 lines (43 loc) · 1.43 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 import { ethers, network, rigsConfig } from "hardhat"; import { buildTree, getListFromCSVs, hashEntry } from "../helpers/allowlist"; async function main() { console.log(`\nGetting proof for '${network.name}'...`); // Get owner account const [account] = await ethers.getSigners(); if (account.provider === undefined) { throw Error("missing provider"); } // Build merkle tree for allowlist const allowlist = await getListFromCSVs(rigsConfig.allowlistFiles); const allowlistTree = buildTree(allowlist); const waitlist = await getListFromCSVs(rigsConfig.waitlistFiles); const waitlistTree = buildTree(waitlist); // Get address let address = process.env.PROOF_ADDRESS; if (!address) { throw Error("no address found for proof (use env var PROOF_ADDRESS)"); } address = address.toLowerCase(); // Check allowlist let allowance = allowlist[address]; if (allowance === undefined) { console.log("Allowlist: no allowance"); } else { const proof = allowlistTree.getHexProof(hashEntry(address, allowance)); console.log("Allowlist:", proof); } // Check waitlist allowance = waitlist[address]; if (allowance === undefined) { console.log("Waitlist: no allowance"); } else { const proof = waitlistTree.getHexProof(hashEntry(address, allowance)); console.log("Waitlist:", proof); } } main() .then(() => process.exit(0)) .catch((error) => { console.error(error); process.exit(1); }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |