-
Notifications
You must be signed in to change notification settings - Fork 119
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
just for diff #2698
base: master
Are you sure you want to change the base?
just for diff #2698
Conversation
*/ | ||
abstract contract BasePaymaster is IPaymaster, Ownable { | ||
|
||
IEntryPoint public entryPoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是oz的模板吗?可以有多个entryPoint吗?我们现在用自己的,以后方便接入大家都在用的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
接口固定了
|
||
contract SmartWalletV3 is SmartWallet, BaseAccount{ | ||
IEntryPoint private immutable _entryPoint; | ||
using ECDSA for bytes32; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
align
// Require the function call went through EntryPoint or owner | ||
function _requireFromEntryPointOrOwnerWhenUnlocked() internal view { | ||
require( | ||
msg.sender == address(entryPoint()) || (msg.sender == wallet.owner && !wallet.locked), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from entryPoint dont need unlocked?
} | ||
|
||
/// implement template method of BaseAccount | ||
function _validateAndUpdateNonce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function only validate but not update
function _validateAndUpdateNonce( | ||
UserOperation calldata userOp | ||
) internal override { | ||
if(userOp.nonce==0 && isDataless(userOp.callData)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need discuss
override | ||
returns (bytes memory context, uint256 sigTimeRange) | ||
{ | ||
(requiredPreFund); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if useless
(mode); | ||
(address sender, address payable token, , uint256 valueOfEth) = abi | ||
.decode(context, (address, address, uint256, uint256)); | ||
if (valueOfEth > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need discuss
No description provided.