We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description
The owner can call setCap to set a new limit for the accepted funds.
setCap
After the cap was updated, an event is emitted.
https://github.com/monoceros-alpha/review-opyn-perp-vault-templates-2021-07/blob/518e4f6d174cae6ee75e316ad56789aaeb695069/code/contracts/core/OpynPerpVault.sol#L198-L201
When the event is emitted, the storage variable is used. This forces an expensive SLOAD operation.
SLOAD
Recommendation
Use the argument received in the method when emitting the event instead of the storage variable.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The owner can call
setCap
to set a new limit for the accepted funds.After the cap was updated, an event is emitted.
https://github.com/monoceros-alpha/review-opyn-perp-vault-templates-2021-07/blob/518e4f6d174cae6ee75e316ad56789aaeb695069/code/contracts/core/OpynPerpVault.sol#L198-L201
When the event is emitted, the storage variable is used. This forces an expensive
SLOAD
operation.Recommendation
Use the argument received in the method when emitting the event instead of the storage variable.
The text was updated successfully, but these errors were encountered: