-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat: create configurable pvg markup #136
Conversation
packages/executor/src/modules/eth.ts
Outdated
@@ -459,7 +459,7 @@ export class Eth { | |||
ov.perUserOp + | |||
ov.perUserOpWord * lengthInWord | |||
); | |||
return ret; | |||
return ret + this.config.pvgMarkup; |
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.
Shouldn't we add validation here to ensure the values are positive?
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.
ret
is always positive and pvgMarkup
is negative only when deliberately set to a negative value by a relayer, so I think validation is excessive
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 understand that this is possible only if set deliberately. I just want to ensure this doesn't cause an issue.
packages/executor/src/modules/eth.ts
Outdated
@@ -459,7 +459,7 @@ export class Eth { | |||
ov.perUserOp + | |||
ov.perUserOpWord * lengthInWord | |||
); | |||
return ret; | |||
return ret + this.config.pvgMarkup; |
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 understand that this is possible only if set deliberately. I just want to ensure this doesn't cause an issue.
Description
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that applyFurther comments (optional)