Fees and Meta-Transactions
SodaPop supports gasless owner settings through relayer-driven calls.
Supported Operations
setFeeMetaTxvia:- Client:
POST /fees/set-meta - Integration:
POST /integration/fees/set-meta
- Client:
setPayoutMetaTxvia:- Client:
POST /fees/set-payout-meta - Integration:
POST /integration/fees/set-payout-meta
- Client:
Validation Logic
Backend verifies:
- Nonce correctness (
factory.nonces(owner)expected value). - Signature deadline not expired.
- EIP-712 signature matches owner wallet.
SetFee Typed Data
const types = {
SetFee: [
{ name: 'user', type: 'address' },
{ name: 'feeBps', type: 'uint256' },
{ name: 'nonce', type: 'uint256' },
{ name: 'deadline', type: 'uint256' },
],
} as const;
SetPayout Typed Data
const types = {
SetPayout: [
{ name: 'user', type: 'address' },
{ name: 'payout', type: 'address' },
{ name: 'nonce', type: 'uint256' },
{ name: 'deadline', type: 'uint256' },
],
} as const;
Best Practices
- Fetch fresh nonce before signing.
- Use narrow deadline windows (for example 1 hour).
- Retry only after re-fetching nonce when backend rejects with nonce mismatch.