Draft
Conversation
Signed-off-by: Norman <norman@samourai.coop>
Signed-off-by: Norman <norman@samourai.coop>
Signed-off-by: Norman <norman@samourai.coop>
Signed-off-by: Norman <norman@samourai.coop>
Signed-off-by: Norman <norman@samourai.coop>
Signed-off-by: Norman <norman@samourai.coop>
❌ Deploy Preview for zenao failed.
|
46d271f to
f57f904
Compare
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #908
I created this PR to keep the 908 intact.
I updated with
mainbranch.I added docs and TODOs and added guards to avoid blocking the user (Making this EVM implementation silent)
Mostly done with Claude Code, it's a test.
EVM Profile Integration - Exploration Branch
This branch explores storing Zenao user profiles on EVM-compatible blockchains alongside the existing backend.
Architecture: Hybrid Backend + Blockchain
Profile reads: Backend first → EVM fallback if no data
Profile writes: Backend (always) + Blockchain (optional, if configured)
Smart Contracts Required
1. Profile Contract - Stores profile data on-chain
get(address, key)- Read a profile fieldgetBatch(addresses[], keys[])- Batch read multiple fieldsset(key, value)- Write a profile field (transaction)setBatch(keys[], values[])- Batch write multiple fields (transaction)Keys:
pfp(avatar),dn(display name),bio(IPFS CID)2. UserRegistry Contract - Maps Clerk userId ↔ wallet address (1:1)
linkWallet(userId)- Link caller's wallet to userIdgetWallet(userId)- Get wallet for a userIdgetUserId(wallet)- Get userId for a walletCurrent State
Implemented:
docs/EVM_SMART_CONTRACTS.mdNot yet deployed:
.env.example)To Activate
.env.local:NEXT_PUBLIC_EVM_RPC- RPC endpoint (e.g., Alchemy)NEXT_PUBLIC_EVM_PROFILE_CONTRACT_ADDRESS- Profile contract addressNEXT_PUBLIC_EVM_USER_REGISTRY_ADDRESS- UserRegistry contract addressCompatibility
Fully backward compatible: App works normally using only the backend if EVM env vars are not configured.
TODOs