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

just for diff #2698

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

just for diff #2698

wants to merge 9 commits into from

Conversation

kl456123
Copy link
Contributor

No description provided.

*/
abstract contract BasePaymaster is IPaymaster, Ownable {

IEntryPoint public entryPoint;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是oz的模板吗?可以有多个entryPoint吗?我们现在用自己的,以后方便接入大家都在用的

Copy link
Contributor Author

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;
Copy link
Contributor

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),
Copy link
Contributor

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(
Copy link
Contributor

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)){
Copy link
Contributor

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);
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need discuss

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

Successfully merging this pull request may close these issues.

None yet

3 participants