Tenzro
Tutorial — Payments

Build a paymaster app

Tenzro ships ERC-4337 v0.8 account abstraction with the standard EntryPoint and a pluggable paymaster. Deploy a paymaster, deposit gas funds, and sponsor your users' UserOperations.
Level
Advanced
Time
~40 min
Prerequisites
EVM development tools, funded deployer wallet
Stack
Solidity · TypeScript
01

Deploy the paymaster

Compile a paymaster that approves UserOps matching your policy (allowlisted apps, fee caps, etc.).

tenzro contract deploy \
  --vm evm \
  --bytecode ./PaymasterSponsor.bin
02

Deposit into EntryPoint

The EntryPoint holds your gas reserve; deposit before any sponsored UserOp can clear.

await entryPoint.depositTo(paymaster, { value: parseEther("1") });
03

Sign a UserOperation with paymaster data

The PackedUserOperation includes paymaster fields per ERC-4337 v0.8 (40,000 gas penalty for paymaster validation).

const userOp = await buildUserOp({
  sender,
  callData,
  paymaster,
  paymasterData,
});
04

Submit through a bundler

The bundler verifies the paymaster signature against your policy and packs the UserOp.

await bundler.sendUserOperation(userOp, entryPoint);
Related
← All tutorials