How Pledged 777
Actually Works
A full technical breakdown of the zero-fee pledge system — from wallet signature to permanent on-chain storage on Ritual Testnet. No gas, no IPFS, no middlemen.
Pledged 777 is a permanent genesis registry deployed on Ritual Testnet (Chain ID 1979). It lets any wallet claim one of exactly 777 slots by submitting a wallet address, a compressed image, and a 77-character message — all stored directly in contract storage.
The core innovation: you pay zero gas. Instead of requiring users to hold RITUAL tokens and pay transaction fees, a server-side relayer submits the on-chain transaction on your behalf. You only provide a cryptographic signature to prove ownership of your wallet.
Traditional dApps require users to pay gas for every on-chain action. Pledged 777 uses a meta-transaction relay pattern: you sign a message locally (free), and our server-side relayer submits the actual transaction to the blockchain, covering all gas costs.
The relayer holds a funded wallet with RITUAL test tokens. When a pledge request arrives, it verifies the signature, confirms the wallet hasn't pledged before, then submits the transaction and absorbs the gas cost entirely.
MetaMask (or any EIP-1193 provider) is prompted via eth_requestAccounts. No network switch required — you can be on any chain. Only your public address is read.
Your image is resized client-side to 64×64 px and compressed to JPEG at adaptive quality until it fits under 4,600 characters as a Base64 data URI — compact enough to store in contract storage without IPFS.
Your wallet signs a deterministic message via personal_sign (EIP-191). The message encodes your wallet address, binding the signature cryptographically to you. This is a local operation — it never hits the network and costs nothing.
Your address, signature, image, and message are posted to /api/pledge. The server recovers the signer via ecrecover, verifies it matches your address, confirms no prior pledge exists, then calls pledge() on the contract — paying all gas from the relayer wallet.
The contract assigns your wallet the next available rank (1–777), stores all data permanently in contract storage, and mints an ERC-721 token directly to your address. The transaction hash is returned and your entry appears in the Genesis List immediately.
The signature mechanism prevents anyone from pledging on behalf of another wallet. Here is the exact message that gets signed, deterministically constructed from your address:
The relayer recovers the signer with ecrecover and rejects any request where the recovered address doesn't match the submitted wallet. The check runs server-side before the transaction is ever sent.
hasPledged mapping. Even if the relayer were somehow bypassed, a second pledge from the same wallet would revert at the EVM level with no way around it.Unlike most NFT projects that store metadata on IPFS or centralized servers, Pledged 777 stores everything directly in contract storage. No external dependencies. No pins that expire. No servers that go offline.
The contract is also ERC-721 compliant. When you pledge, an NFT is minted to your wallet with a fully on-chain tokenURI that returns your image and metadata as a Base64-encoded JSON data URI — readable by any NFT marketplace or wallet without external requests.
The contract is fully open-source. You can read every pledge, verify the 777 hard-cap, and audit the code without trusting us. The relayer API is also published — every piece of the system is transparent.
Network: Ritual Testnet · Chain ID 1979