ERC20 Paymaster

πŸ’° ERC20 Token Paymaster Example

Ensure we have a token from supported token list.
For simple you can bridge usdc coin :

Mint USDC on Ethereum Sepolia:

http://faucet.circle.com

Bridge it to Soneium Minato:

https://soneium.org/en/bridges/

And then transfer it to your smart-account.

:::info
πŸ’‘ Steps are similar to Sponsorship paymaster except in STEP 3, in paymasterContext, we use token(value: address of the ERC20 token) instead of policyId
:::

  {
     //...
     paymasterContext: {
       calculateGasLimits: true,
       token: "0xE9A198d38483aD727ABC8b0B1e16B2d338CF0391",//erc20 token
     },
     //...
  }

What’s Next