Touch

Give NFTs to anyone you meet, by tapping your NFC card on their smartphone.

ETHGlobal San FranciscoShipped October 18, 2024Prize winner#nft
Visit Repo
Touch banner

About

Cherish your encounters.

This project enables users to easily give NFTs to people you meet with an NFC card, by combining Web NFC API, zero gas fees network, and embedded wallets with intuitive authentication flows. Share and collect NFTs every time you meet, and record your moments of encounters on blockchain.

How it's made

Smart contracts of this project are deployed on SKALE network's Calypso testnet for zero gas fees transactions. The web app uses PoW sFUEL distribution before submitting a transaction to get the gas tokens for free. The frontend is built with Next.js, wagmi, viem, tailwind css, shadcn/ui, and hosted on Vercel. Privy is used for creating embedded wallets and it makes users easily get onboard. Unfortunately the Web NFC API is only supported on some of the browsers in Android including Chrome, and iOS browsers are completely unsupported yet.

To get your NFC card registered, first go to the "Register" page, login with Privy, and fill in the form. After you press the create button, the "Name", "Introduction", and "Image" values are uploaded to IPFS with Pinata as your NFTs metadata. The NFT created is called "MyToken", which is an SBT. Then a collection of your NFTs that will be minted in the future via your NFC card will be created. This collection is called "Encounters collection", and the NFTs are described by the word "Encounters".

After that, a UUID secret token will be generated. The double hashed value of the secret token is then registered to the SecretTokenManager contract.

Finally the app requires you to tap an NFC card, and it writes the URL to the page "/encountered/[your MyToken token ID]" that mints "Encounters" NFTs of your collection. Alongside the original secret token generated before is recorded too. The secret token and its hashed values are used to verify that the "Encounters" minting is executed only via the NFC card. When you mint someone's "Encounters" NFT, the single hashed value of the secret token recorded in the NFC card is required as one of the function's arguments. The token hash is verified in the SecretTokenManager contract. If the hashed value of the given token hash matches the registered double hashed token, the verification successes.

After you finished your registration, you can now tap your NFC card to someone's smartphone to give your "Encounters" NFT. When the card is tapped the browser automatically opens the page to get "Encounters". The NFT receiver will be required to login with Privy too. After login and pressing the button, a prompt requiring to tap the NFC card appears. When you tap again this time the app reads the recorded secret token, and mint an "Encounter" NFT with that.

Prizes

  • SKALE Network · Best use of SKALE Native Integrations · Best use of SKALE Native Integrations

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

SignWallet

This Web3 wallet, powered by Layer Zero, provides a seamless multi-chain experience with built-in cross-chain bridging, allowing users to manage assets, view balances, and interact with NFTs across various blockchains.