A frontend development tool for building EVVM (Ethereum Virtual Machine Virtualization) signature constructors.
Scaffold-EVVM helps you create and execute EIP-191 signed transactions for EVVM operations. This is a pure frontend application - no deployment functionality, just signature construction and transaction execution.
- β 23+ Signature Constructors - For all EVVM operations (Payments, Staking, NameService, P2PSwap)
- β Automatic Contract Discovery - Discovers Staking, NameService, and Estimator addresses from EVVM core
- β Meta-Transaction Pattern - EIP-191 gasless signatures submitted by executors (fishers)
- β Dual Nonce Support - Sync and async nonce systems for different operation types
- β Wallet Integration - WalletConnect/Reown support for all major wallets
- β Built-in Debug Console - View message formats, signatures, and transaction parameters
- β Block Explorer Integration - Direct links to Etherscan/Arbiscan for transactions
- Node.js 18+ and npm
- A WalletConnect Project ID (Get one free)
- An existing EVVM contract address (deployed on testnet)
# Clone the repository
git clone <your-repo-url>
cd scaffold-evvm
# Install dependencies
npm install-
Copy environment template:
cp .env.example .env
-
Configure .env:
# Required: WalletConnect Project ID NEXT_PUBLIC_PROJECT_ID=your_reown_project_id_here # Required: Your EVVM contract address NEXT_PUBLIC_EVVM_ADDRESS=0x...your_evvm_contract_address # Required: Network chain ID # 11155111 = Ethereum Sepolia # 421614 = Arbitrum Sepolia NEXT_PUBLIC_CHAIN_ID=11155111 # Optional: EVVM instance ID (if registered) NEXT_PUBLIC_EVVM_ID=
-
Start development server:
npm run dev
-
Open your browser:
http://localhost:3000
User provides EVVM address (.env)
β
App reads EVVM contract on-chain
β
Discovers contract addresses automatically:
β’ Staking: evvm.getStakingAddress()
β’ NameService: evvm.getNameServiceAddress()
β’ Estimator: evvm.getEstimatorAddress()
β
Ready to build signatures!
1. User fills form β Component collects parameters
2. Click "Sign" β Creates EIP-191 message
3. Wallet prompts β User signs message off-chain
4. Click "Execute" β Submits to EVVM contract
5. Transaction confirmed β View on block explorer
signPay- Single payment to address or usernamesignDispersePay- Multiple payments in one transactionsignPayMultiple- Batch payments (advanced)
signGoldenStaking- Become a golden fisher (special privileges)signPresaleStaking- Presale staking (1 MATE fixed)signPublicStaking- Public staking (5083 MATE per sMATE)signPublicServiceStaking- Staking for ecosystem services
signPreRegistrationUsername- Reserve a usernamesignRegistrationUsername- Register a usernamesignMakeOffer- Make an offer for a usernamesignWithdrawOffer- Withdraw your username offersignAcceptOffer- Accept an offer for your usernamesignRenewUsername- Renew your username registrationsignAddCustomMetadata- Add custom metadata to usernamesignRemoveCustomMetadata- Remove custom metadatasignFlushCustomMetadata- Remove all custom metadatasignFlushUsername- Delete username completely
signMakeOrder- Create a P2P swap ordersignCancelOrder- Cancel your swap ordersignDispatchOrderFillProportionalFee- Fill order with proportional feesignDispatchOrderFillFixedFee- Fill order with fixed fee
scaffold-evvm/
βββ src/
β βββ app/ # Next.js 15 pages
β β βββ page.tsx # Homepage with all constructors
β β βββ evvm/ # EVVM-specific pages
β β βββ faucet/ # Testnet faucet
β βββ components/
β β βββ SigConstructors/ # 23 signature constructor components
β β βββ Evvm/ # Payment constructors
β β βββ StakingFunctions/ # Staking constructors
β β βββ NameService/ # NameService constructors
β β βββ P2PSwap/ # P2PSwap constructors
β βββ hooks/
β β βββ useEvvmDeployment.ts # Contract discovery hook
β β βββ ...other hooks
β βββ lib/
β β βββ evvmSignatures.ts # Centralized signature builders
β β βββ evvmConfig.ts # EVVM configuration utilities
β β βββ viemClients.ts # Viem client setup
β βββ utils/
β β βββ transactionExecuters/ # Transaction execution functions
β β βββ evvmExecuter.ts # Payment executors
β β βββ stakingExecuter.ts # Staking executors
β β βββ nameServiceExecuter.ts # NameService executors
β β βββ p2pSwapExecuter.ts # P2PSwap executors
β βββ types/
β βββ evvm.ts # TypeScript type definitions
βββ .env # Your configuration (not committed)
βββ .env.example # Configuration template
βββ package.json
# Start development server (with env validation)
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Type checking
npm run type-check
# Validate environment configuration
npm run check-envEVVM uses EIP-191 signed messages instead of traditional contract calls:
- User signs message off-chain (no gas cost)
- Executor (fisher) submits on-chain (pays gas)
- Contract verifies signature and executes
- User receives result without paying gas
Message Format:
selector,evvmID,from,to,token,amount,priorityFee,nonce,priorityFlag,executor
Example:
0x4faa1fa2,1057,0xAlice,0xBob,0x001,1000000,0,42,false,0x0
- Sync Nonces (
priorityFlag: false) - Sequential, for operations requiring order - Async Nonces (
priorityFlag: true) - Parallel, for independent operations
Some operations require two signatures:
- EVVM signature - For payment/transfer
- Module signature - For specific module action
Examples: Staking, NameService, P2PSwap operations
- Ethereum Sepolia (Chain ID:
11155111) - Arbitrum Sepolia (Chain ID:
421614) - Local Anvil (Chain ID:
31337) - Any EVM-compatible testnet
- Check
.envhasNEXT_PUBLIC_EVVM_ADDRESSset - Run
npm run check-envto validate configuration - Ensure address format is valid (
0x...)
- Verify EVVM contract is deployed at the address
- Check network connection (RPC endpoint working)
- Ensure
NEXT_PUBLIC_CHAIN_IDmatches the actual network - Check browser console for detailed error messages
- Always fetch current nonce from contract before signing
- Use
getCurrentSyncNoncefor sync operations - Use
getNextRandomNoncefor async operations - Don't reuse old signatures
- Verify EVVM ID matches the deployed instance
- Check all parameters match between signing and execution
- Ensure
priorityFlagmatches nonce type - Confirm wallet is connected to correct network
- Must use sync nonce (
priorityFlag: false) - Requires 24-hour cooldown between stakes
- See critical fix in
evvmSignatures.ts:189-240
- Next.js 15 - React framework with App Router
- viem - Ethereum library for contract interactions
- wagmi - React hooks for Ethereum
- @reown/appkit - Wallet connection (WalletConnect)
- @evvm/viem-signature-library - Official EVVM signature builders
- β
Never commit
.envfile (in.gitignore) - β All signing happens client-side in browser
- β No private keys stored or transmitted
- β WalletConnect for secure wallet connections
β οΈ Testnet only - Not audited for mainnet
- EVVM Documentation
- EVVM Signature Structures
- Testnet Contracts Repo
- viem Documentation
- @evvm/viem-signature-library
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
- Built with @evvm/viem-signature-library
- Powered by EVVM - Ethereum Virtual Machine Virtualization
- Uses WalletConnect for wallet integration
- Issues: GitHub Issues
- Documentation: EVVM Docs
- Community: EVVM Discord
Made with β€οΈ for the EVVM ecosystem