Skip to content

BaseBoard multi-chain (Base + Celo): unified wallet modal, Celo pricing/deploy, pixel links + content guard#3

Merged
omiaydin1 merged 2 commits into
mainfrom
devin/1781553336-baseboard-celo-unified
Jun 15, 2026
Merged

BaseBoard multi-chain (Base + Celo): unified wallet modal, Celo pricing/deploy, pixel links + content guard#3
omiaydin1 merged 2 commits into
mainfrom
devin/1781553336-baseboard-celo-unified

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Unified implementation of the full Base + Celo multi-chain architecture plus this round's requests. Supersedes #2 (do not merge #2). Base's shipped optimizations — bbox compression ladder, 9,500-block progressive log scan, optimistic canvas updates — are untouched and run on both chains.

Celo is now live. BaseBoard is deployed to Celo Mainnet (42220) at 0x7b5E66cD88305aB33CE2c2C400167B7fFF348a23 (deploy block 69652905), with on-chain PLOT_PRICE = 1.3 CELO and TREASURY = 0x71aad…812b (verified on-chain). The real address + deploy block are baked into the config defaults (still env-overridable); the placeholder is gone.

1. Wallet UI — single "Connect Wallet" button + modal

Reverted the inline raw-connector buttons. Disconnected state is now one clean Connect Wallet button that opens a selection modal. Coinbase Smart Wallet is offered everywhere except Celo (unsupported), where users are steered to MetaMask / Rabby / WalletConnect.

disconnected → [Connect Wallet] → Modal:
  - Coinbase Smart Wallet   (hidden when chainId === 42220)
  - MetaMask / Rabby / Browser Wallet  (injected)
  - WalletConnect           (when projectId configured)

2. Pricing

  • Base (8453): 0.00005 ETH per plot (unchanged).
  • Celo (42220): 1.3 CELO per plot (~0.1 USDC equiv).

3. Contract parametrized + deployed to Celo

PLOT_PRICE and TREASURY were hardcoded constants with no constructor — so the "deploy the existing contract" path could not set 1.3 CELO or the requested treasury. They are now immutable constructor args (public getters preserved, so the frontend ABI reads are unchanged):

constructor(uint256 plotPrice, address payable treasury) { ... }
  • scripts/deploy-celo.cjs deployed with 1.3 CELO + treasury 0x71aad…812b, captured the deploy block, and wrote NEXT_PUBLIC_CELO_*.
  • hardhat.config.cjs gains a celo network (chainId 42220, forno.celo.org).
  • Base deploy script keeps 0.00005 ETH + original treasury 0xce8353…f1e2.

4. Pixel Links + content-security guard (new feature)

Owners can attach an optional clickable URL to a plot. No contract change — the link rides in the existing on-chain imageUri string as a fragment alongside the zone bbox:

data:image/webp;base64,…#bb=x1,y1,x2,y2&link=<encodeURIComponent(url)>
  • PlotModal parses #link= and renders a clickable row; image src is stripZone'd so the fragment never breaks loading.
  • validateLinkUrl() runs before the tx: requires http(s), and blocks pornography / drugs / alcohol / gambling / phishing keywords. On a violation the save is stopped and the user sees: "Invalid or restricted URL layout detected. Please provide a safe destination link."

Verification

npm run lint, npm run build, and npx hardhat compile all pass with zero errors/warnings. Celo PLOT_PRICE/TREASURY/GRID_SIZE read back correctly from the deployed contract.

Post-merge (optional)

For parity with the committed defaults, you can also set NEXT_PUBLIC_CELO_CONTRACT_ADDRESS=0x7b5E66cD88305aB33CE2c2C400167B7fFF348a23 and NEXT_PUBLIC_CELO_DEPLOY_BLOCK=69652905 in Vercel — not required, since they're now the built-in defaults.

Link to Devin session: https://app.devin.ai/sessions/dd0d6a8816204b759805887b2ff9e351
Requested by: @omiaydin1

…ng/deploy, pixel links + content guard

- Multi-chain Base (8453) + Celo (42220): per-chain config (contract, price, treasury, deploy block, native symbol), wagmi celo chain/transport, canvas state isolation on chainId switch. Base optimizations (bbox compression ladder, 9500-block scan, optimistic updates) untouched.
- Wallet UI: single 'Connect Wallet' button opens a wallet-selection modal (MetaMask/Rabby/WalletConnect + Coinbase Smart Wallet, hidden on Celo).
- Pricing: Base 0.00005 ETH; Celo 1.3 CELO per plot.
- Contract: PLOT_PRICE + TREASURY are now constructor args (immutable) so Celo can deploy with 1.3 CELO + treasury 0x71aad...812b. Base deploy unchanged (0.00005 ETH, original treasury). Added scripts/deploy-celo.cjs + hardhat celo network.
- Pixel Links: optional clickable URL per plot, encoded in the on-chain imageUri fragment (#link=...), shown in PlotModal. Frontend content-security guard blocks porn/drugs/alcohol/gambling/phishing URLs with a clear toast/inline warning before the tx.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
baseboard Ready Ready Preview, Comment Jun 15, 2026 8:03pm

@devin-ai-integration devin-ai-integration Bot changed the base branch from devin/1780953440-baseboard-mini-app to main June 15, 2026 19:56
BaseBoard deployed to Celo (42220) at 0x7b5E66cD88305aB33CE2c2C400167B7fFF348a23 (block 69652905), price 1.3 CELO, treasury 0x71aad...812b. Replace placeholder defaults with the real contract address + deploy block (still env-overridable).

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@omiaydin1 omiaydin1 merged commit 538cadc into main Jun 15, 2026
2 checks passed
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