-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fixes/zellic audit remediations vpmv2 #52
Fixes/zellic audit remediations vpmv2 #52
Conversation
return EntryPoint__factory.connect(epf.address, provider.getSigner()); | ||
} | ||
|
||
export async function getUserOpEvent(ep: 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.
Should be moved to utils
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.
done
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.
All good except a few comments that need to be removed / fixed
// const ev = await getUserOpEvent(entryPoint); | ||
// expect(ev.args.success).to.be.true; |
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 can be removed
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 to discuss this with @ankurdubey521
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.
done. pushed updated code
test/bundler-integration/token-paymaster/btpm-undeployed-wallet.ts
Outdated
Show resolved
Hide resolved
// await expect( | ||
// entryPoint.handleOps([userOp], await offchainSigner.getAddress()) | ||
// ).to.be.reverted; |
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.
can be removed or uncommented
{ | ||
sender: walletAddress, | ||
verificationGasLimit: 200000, // for positive case 200k | ||
// preVerificationGas: 55000, // min expected by bundler is 46k |
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 not needed
offchainSigner = ethersSigner[1]; | ||
depositorSigner = ethersSigner[2]; | ||
feeCollector = ethersSigner[3]; | ||
walletOwner = deployer; // ethersSigner[3]; |
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.
ethersSigner[0]
@@ -52,7 +52,7 @@ contract VerifyingSingletonPaymasterV2 is | |||
sstore(verifyingSigner.slot, _verifyingSigner) | |||
sstore(feeCollector.slot, _feeCollector) | |||
} | |||
unaccountedEPGasOverhead = 12000; | |||
unaccountedEPGasOverhead = 24000; |
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.
how is this value being decided here
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.
// Review | ||
// 10/11 actual gas used | ||
/* const paymasterIdBalanceDiffWithoutPremium = paymasterIdBalanceDiff | ||
.mul(BigNumber.from(10)) | ||
.div(BigNumber.from(11)); | ||
|
||
console.log( | ||
"paymasterIdBalanceDiffWithoutPremium ", | ||
paymasterIdBalanceDiffWithoutPremium.toString() | ||
); */ |
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.
please remove
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.
I'd like to keep it if I need to present more accounting check in future.
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.
LGTM except a comment that needs to be removed and also could you add the audit report as well to the audit folder
Summary
Related Issue: # (issue number)
Change Type
Checklist
Additional Information
Branch Naming