-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add tests for more sufficient gas consumption testing in callWithExactGas library #13326
Conversation
"@chainlink/contracts": patch | ||
--- | ||
|
||
Add Additional tests to the callWithExactGasLibrary to ensure proper gas usage |
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.
Imo there is no changeset required for changes like these
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 know but the the changeset checker kept causing problems without one.
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.
You can ignore the failing CI for changeset checker. It's not required
contracts/.gas-snapshot
Outdated
@@ -0,0 +1,52 @@ | |||
BurnMintERC677_approve:testApproveSuccess() (gas: 55512) |
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 delete, this is not the correct snapshot location. Any time you see an unexpected new file please ensure you intended to create it
#13331 fixes CI |
… conflicts but broke the CI
Quality Gate passedIssues Measures |
This PR replaces the one I just closed, #13217 which could not be merged due to an issue with the sigchecker not signing every commit.
The helper library
CallWithExactGas.sol
did not have any tests that ensured that all of the gas provided is properly consumed in the event that an incorrect amount of gas is passed in. CCIP makes extensive use of this library and so this tests attempts to ensure that all gas is properly utilized when contracts are called with the helper functions.Added two tests to
callWithExactGas.t.sol
test_callWithExactGasAndConsumeAll
which creates a mock contract and ensures that the amount of gas consumed is the same as the amount passed in.test_callWithExactGasAndConsumeMoreThanProvided
which attempts to consume more gas than is provided in the event that gasLimit > (63/64) of available gas passed to the child call in conjunction with EIP-150