Documentation Index
Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
Use this file to discover all available pages before exploring further.
Looking for Contributors! This Skill needs an implementation.Contributing a Skill involves:
- Writing a reference implementation with full functionality
- Adding comprehensive tests
- Writing documentation with usage examples
See the ethers-provider Skill for an example of a complete Skill implementation.Interested? Open an issue or PR at github.com/evmts/voltaire.
Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Gasless token approvals using EIP-2612 permit signatures and Uniswap’s Permit2 contract.
Why Permit?
Traditional ERC-20 approvals require two transactions:
approve() — User pays gas to approve spender
transferFrom() — Protocol transfers tokens
With permit, users sign a gasless message instead:
- User signs permit message (free, off-chain)
- Protocol calls
permit() + transferFrom() in one transaction
This improves UX significantly—users don’t pay for approvals.
Planned Implementation
This Skill should cover:
EIP-2612 Permit
// Sign a permit for ERC-20 tokens that support EIP-2612
const permit = await signPermit({
token: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC
owner: walletAddress,
spender: protocolAddress,
value: parseUnits('1000', 6),
deadline: Math.floor(Date.now() / 1000) + 3600, // 1 hour
signer
});
// permit contains { v, r, s, deadline, value }
// Protocol can now call token.permit(...) + token.transferFrom(...)
Permit2 (Uniswap)
// Permit2 works with ANY ERC-20, not just EIP-2612 tokens
const permit2 = await signPermit2({
token: '0x...', // Any ERC-20
amount: parseUnits('1000', 18),
expiration: Math.floor(Date.now() / 1000) + 86400, // 24 hours
nonce: 0,
spender: protocolAddress,
signer
});
// Protocol calls Permit2.permitTransferFrom(...)
Batch Permits
// Approve multiple tokens in one signature
const batchPermit = await signBatchPermit2({
tokens: [
{ token: USDC, amount: parseUnits('1000', 6) },
{ token: WETH, amount: parseUnits('1', 18) },
],
spender: protocolAddress,
signer
});
Tokens Supporting EIP-2612
Most major tokens support native permit:
- USDC
- DAI
- UNI
- AAVE
- Most new tokens
For tokens without native permit, use Permit2.
Resources