Skip to content

Add token-gating#8

Closed
steven-tomlinson wants to merge 9 commits into
mainfrom
add-gating
Closed

Add token-gating#8
steven-tomlinson wants to merge 9 commits into
mainfrom
add-gating

Conversation

@steven-tomlinson
Copy link
Copy Markdown
Collaborator

Beta Linea Token Gating with Proof of Humanity or VIP Cpode option for gas-only mint.

steven-tomlinson added 9 commits November 22, 2025 17:47
- 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.
- 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.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread lockb0x/web3.js
Comment on lines +6 to +10
if (network.chainId !== 59144n) {
try {
await window.ethereum.request({
method: "wallet_switchEthereumChain",
params: [{ chainId: "0xe770" }], // 59144 hex
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use correct Linea mainnet chainId for network switch

In ensureLineaMainnet the code checks for chainId 59144 but asks MetaMask to switch to "0xe770", which is decimal 59248 and not the Linea mainnet ID. MetaMask will reject the request, so users on another network can never be switched to Linea and minting will fail. The chainId parameter should be 0xe708 to match the 59144 check.

Useful? React with 👍 / 👎.

Comment thread lockb0x/mint.js
Comment on lines +151 to +154
mintStatus.textContent = "Verifying Proof of Humanity...";
const pohResult = await checkPohAndPersist(wallet);
if (!pohResult.status || !pohResult.signature) {
mintStatus.textContent = "PoH verification failed. Cannot mint for free.";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge PoH free mint flow always rejects verified wallets

The PoH branch for the standard tier requires checkPohAndPersist to return a non-null signature before calling mintPoHFree, and otherwise shows “PoH verification failed” (mint.js lines 151‑154). However the only implementation of checkPohAndPersist (lockb0x/utils.js lines 323‑335) never sets or returns a signature—it only toggles localStorage—so this condition is never satisfied and PoH-verified wallets cannot use the free mint path. Either stop gating on a signature here or have the verifier populate one.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant