Add gating#9
Conversation
- Created a new HTML page for minting the Lockb0x Sigil NFT, including wallet connection and minting instructions. - Added redirect pages for chapters 1 to 6 and chapter 1a of The Whispering Code, directing users to the corresponding Keya chapters.
…checks, and improve UI elements for minting tiers and design options.
- Updated contract address in contract-address.json. - Modified index.html to improve wallet connection checks and PoH verification. - Refactored mint.js to streamline PoH signature retrieval and minting logic. - Enhanced utils.js for better PoH verification handling and localStorage management. - Introduced Lockb0xSigil.sol contract with minting functionality and SVG metadata generation. - Added agent instructions for implementing wallet-compatible SVG JSON metadata without altering existing CBOR logic.
…for SEO - Added a carrier detection notification in the header. - Updated meta title and description for better clarity and SEO. - Improved Open Graph and Twitter card metadata for enhanced sharing. - Refactored hero image section and adjusted visibility logic. - Enhanced user guidance for Proof of Humanity verification. - Updated footer information for project attribution. - Improved wallet connection checks and error handling in lockb0x. - Added new styles for kaleidoscope effect and Web3Auth error overlay. - Implemented Web3Auth integration for MetaMask login. - Created contract interaction helpers for NFT ownership checks. - Developed interstitial page for Lockb0x Sigil NFT checks. - Added parameter validation and price table for minting. - Enhanced session management for Proof of Humanity verification. - Implemented network switching logic for Linea Mainnet and Sepolia. - Updated configuration for Web3Auth client ID.
…e assets, and sync all changes
- Created chapter1a-game-test.html for testing the interactive fiction game. - Implemented chapter1a-game.js containing the game logic, scenes, and state management. - Added header-logic.js for carrier detection and cookie consent management. - Introduced lockb0x-utils-global.js to load lockb0x utilities as a global module. - Configured contract-config.js to expose contract address and ABI for the dapp. - Included backup.txt with carrier detection logic and PoH/NFT badge handling.
…e lockb0xUtils for improved functionality
…ty with lockb0x utilities - Updated script tags in artefacts, fragments, keya, lockb0x, and primer HTML files to include anime.js and lockb0x utility scripts. - Removed deprecated header logic scripts and replaced them with a more streamlined approach for utility initialization. - Modified content in keya chapters to indicate upcoming development status. - Ensured backward compatibility checks for lockb0x utilities are in place across all updated files.
…cription of token-gating and contribution processes
…ons and project overview for AI agents
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export async function getTokenGatingState() { | ||
| let connected = false, wallet = null, poh = false, error = null; | ||
| try { | ||
| connected = await isMetaMaskConnected(); | ||
| wallet = getWalletConnected(); | ||
| poh = await isPohVerified(); |
There was a problem hiding this comment.
Resolve undefined isPohVerified in gating state
getTokenGatingState calls isPohVerified() but that function is never defined or exported in utils.js (only isPohVerifiedForAddress exists). As soon as this code runs it will throw a ReferenceError, so the gating state computation and any dependent redirects will always fail. Define the function or call the existing address-aware helper instead.
Useful? React with 👍 / 👎.
| if (network.chainId !== 59141n) { | ||
| try { | ||
| await window.ethereum.request({ | ||
| method: "wallet_switchEthereumChain", | ||
| params: [{ chainId: "0xe708" }], // 59141 hex |
There was a problem hiding this comment.
Switch to Linea Sepolia using correct chainId
ensureLineaSepolia requests wallet_switchEthereumChain with chainId 0xe708, which is 59144 (Linea mainnet) even though the check above is looking for 59141. On Sepolia this call will try to switch to the wrong network and throw, leaving callers unable to reach the intended testnet. Use the 59141 (0xe705/0xe704) chainId when requesting the switch.
Useful? React with 👍 / 👎.
| <script type="module"> | ||
| import { isMetaMaskConnected, getWalletConnected, hasLockb0xSigilNFT, ensureLineaSepolia, registerWalletEventHandlers } from './utils.js'; | ||
|
|
There was a problem hiding this comment.
Import gating helpers from modules that export them
The interstitial page imports hasLockb0xSigilNFT and ensureLineaSepolia from utils.js, but that module only exports the MetaMask helpers and lacks those names. The ES module will fail to load with a missing export error before any gating logic runs. Import the functions from the files that define them (e.g., contract.js/web3.js) or re-export them from utils.js.
Useful? React with 👍 / 👎.
Basic (insecure) token-gating.