Meta-Transaction Support
Meta-transactions allow users to sign actions off-chain and have them relayed by a third party (the Broadcaster), enabling gasless or delegated execution.
How It Works
User signs a meta-transaction
Encodes the function, parameters, deadline, and gas constraints
Uses EIP-712 for secure signature
Broadcaster submits to contract
Verifies signature
Executes on behalf of the user
Pays gas fees
Contract validates
Checks nonce and replay protection
Enforces operation rules (timelock, roles, etc.)
Advantages
Gasless UX: Users don’t need ETH to interact
Security Preserved: Same checks as direct calls
Composable: Can be used with timelock + recovery
Example Usage
const metaTxParams = await secureOwnable.createMetaTxParams(
contractAddress,
functionSelector,
deadline,
maxGasPrice,
signer
);
const metaTx = await secureOwnable.generateUnsignedMetaTransactionForExisting(
txId,
metaTxParams
);
const signature = await walletClient.signMessage({ message: { raw: metaTx.message }, account: signer });
await secureOwnable.transferOwnershipApprovalWithMetaTx({
...metaTx,
signature
}, { from: broadcaster });
Broadcaster Role
Only designated Broadcasters can submit meta-transactions. They are expected to:
Validate user signatures
Cover transaction fees
Have no privileged access to the contract
Last updated