We believe some functions are variables could benefit from renaming. These are our suggestions:
• The IOracle, DepositPaymaster and TokenPaymaster contracts all have a getTokenToEthOutputPrice function, but in all cases, it's not a price (because it accounts for the amount bought) and it appears to be described backwards. Something like getTokenValueOfEth would be clearer.
• The last parameter of validateUserOp in the IWallet interface should be missingWalletFunds or additionalFundsRequired to match how it's used in the EntryPoint contract.
• The gasUsedByValidateUserOp variable should be gasUsedByValidateWalletPrepayment
• The PaymentMode options should be paymasterDeposit and walletDeposit, because neither
uses the "stake" for gas payments.
• The sender parameter in the _call function of the SimpleWallet contract should be target.
• The maxPriorityFeePerGas component of the UserOperation struct should be priorityFeePerGas .
• In BasePaymaster, the setEntrypoint and _requireFromEntrypoint functions should capitalize the "p" for consistency with the rest of the code base.
We believe some functions are variables could benefit from renaming. These are our suggestions: • The IOracle, DepositPaymaster and TokenPaymaster contracts all have a getTokenToEthOutputPrice function, but in all cases, it's not a price (because it accounts for the amount bought) and it appears to be described backwards. Something like getTokenValueOfEth would be clearer. • The last parameter of validateUserOp in the IWallet interface should be missingWalletFunds or additionalFundsRequired to match how it's used in the EntryPoint contract. • The gasUsedByValidateUserOp variable should be gasUsedByValidateWalletPrepayment • The PaymentMode options should be paymasterDeposit and walletDeposit, because neither uses the "stake" for gas payments. • The sender parameter in the _call function of the SimpleWallet contract should be target. • The maxPriorityFeePerGas component of the UserOperation struct should be priorityFeePerGas . • In BasePaymaster, the setEntrypoint and _requireFromEntrypoint functions should capitalize the "p" for consistency with the rest of the code base.