
Fiat Paymaster
Account Abstraction Paymaster that allows paying for gas fees with PayPal
Demo
About
This project is an implementation of an account abstraction paymaster using the ERC-4337 paradigm that was recently deployed throughout the Ethereum ecosystem. Using a PayPal integration, we allow users to pay for any transaction fees with fiat. This paymaster is generic and can be used by any dapp or wallet by setting the ` paymasterAndData` field to the address of our paymaster. This project is cross-chain by nature, as it is deployed on many different chains that support AA: - Optimism Mainnet - Polygon zkEVM - Gnosis Chain - Scroll - Goerli You can test it using our PayPal test account: - email: sb-mx70425265463@personal.example.com - password: &$}0XzO4
How it's made
We implemented a [TokenPaymaster](https://github.com/eth-infinitism/account-abstraction/blob/main/contracts/samples/TokenPaymaster.sol) called FPUSD (short for Fiat Paymaster USD). This paymaster _is_ an ERC-20 token that is used to pay for ERC-4337 transactions, and represents an USD balance in PayPal. Since there aren't currently many ERC-4337 supporting wallets, we use the high-level ` @account-abstraction/sdk` to create UserOperations and sign them in Metamask, which is later sent to a bundler to be included on the mempool. We spent some time doing a pull request to add token paymaster support to the trampoline wallet but this wallet was too unstable to complete it.