Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERC20Paymaster scenario #112

Open
adeelhasan opened this issue Sep 12, 2023 · 0 comments
Open

ERC20Paymaster scenario #112

adeelhasan opened this issue Sep 12, 2023 · 0 comments

Comments

@adeelhasan
Copy link
Contributor

Hello,

Can the ERC20Paymaster pay for gas with a USDC token if the wallet account has no ether?

The issue I am seeing is that the paymaster expects the transfer of USDC/token to be approved beforehand. However, since the wallet has no ether to start with, how does that approval happen?

In the ERC20Paymaster.t.sol file, on line 104, the wallet is funded with ether and does an approval first (on line 108.)

Maybe the token has to support permit, for this scenario to be supported, or perhaps I am just missing something here.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant