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

evm: Explicitly check staticcalls #375

Merged
merged 3 commits into from
Apr 3, 2024
Merged

evm: Explicitly check staticcalls #375

merged 3 commits into from
Apr 3, 2024

Conversation

djb15
Copy link
Collaborator

@djb15 djb15 commented Apr 2, 2024

No description provided.

@djb15 djb15 added the evm Change to EVM Contracts label Apr 2, 2024
@djb15 djb15 linked an issue Apr 2, 2024 that may be closed by this pull request
@mdulin2
Copy link
Collaborator

mdulin2 commented Apr 3, 2024

Can you check the result on this one as well -

address(nttManager.token()).staticcall(abi.encodeWithSignature("decimals()"));

mdulin2
mdulin2 previously approved these changes Apr 3, 2024
Copy link
Collaborator

@mdulin2 mdulin2 left a comment

Choose a reason for hiding this comment

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

Add the check in the other location and I think it's good to go.

@RahulMaganti47 RahulMaganti47 self-requested a review April 3, 2024 19:01
RahulMaganti47
RahulMaganti47 previously approved these changes Apr 3, 2024
Copy link
Contributor

@RahulMaganti47 RahulMaganti47 left a comment

Choose a reason for hiding this comment

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

can you add a negative test for this? otherwise, lgtm

@djb15 djb15 dismissed stale reviews from RahulMaganti47 and mdulin2 via fbca62b April 3, 2024 19:02
@RahulMaganti47
Copy link
Contributor

Can you check the result on this one as well -

address(nttManager.token()).staticcall(abi.encodeWithSignature("decimals()"));

might be nice to add but probably not necessary since this is in the tests (unless that error is being tested specifically)?

@djb15 djb15 force-pushed the check-staticcalls branch 2 times, most recently from a56b7b5 to 8327dc8 Compare April 3, 2024 22:37
@mdulin2
Copy link
Collaborator

mdulin2 commented Apr 3, 2024

Can you check the result on this one as well -

address(nttManager.token()).staticcall(abi.encodeWithSignature("decimals()"));

might be nice to add but probably not necessary since this is in the tests (unless that error is being tested specifically)?

Ahh, you're right. I didn't see this was in the tests - I just saw library and figured it was under the hood.

@djb15 djb15 merged commit a03c740 into main Apr 3, 2024
4 checks passed
@djb15 djb15 deleted the check-staticcalls branch April 3, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evm Change to EVM Contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

evm: Check staticcall booleans
3 participants