pimlicolabs / erc20-paymaster

An ERC-4337 Paymaster contract by Pimlico that is able to sponsor gas fees in exchange for ERC-20 tokens
https://pimlico.io
MIT License
72 stars 19 forks source link

using solady safeTransferLib #2

Closed leekt closed 1 year ago

leekt commented 1 year ago

As addressed in audit report, enabling any token with same code base will be easier for us to maintain the project. thus using safeTransfer, using modified version of solady's SafeTransferLib *modified because Entrypoint reverts on short errors

leekt commented 1 year ago

found weird behavior on entrypoint with this fixes, entrypoint cannot handle revert with less than 32 bytes : https://github.com/eth-infinitism/account-abstraction/blob/abff2aca61a8f0934e533d0d352978055fddbd96/contracts/core/EntryPoint.sol#L69

drortirosh commented 1 year ago

indeed it is a strange behaviour... hardhat reverts on returndatacopy if there is no return data, but geth silently returns..