eth-infinitism / account-abstraction

GNU General Public License v3.0
1.54k stars 639 forks source link

[N24] Naming suggestions #46

Closed drortirosh closed 2 years ago

drortirosh commented 2 years ago

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.

drortirosh commented 2 years ago

note that maxPriorityFeePerGas was left unchanged, since it defines the maximum, not actual fee paid by the user