Skip to content

test failing when defining transient variables in solidity #897

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

Closed
gabririgo opened this issue Nov 25, 2024 · 3 comments
Closed

test failing when defining transient variables in solidity #897

gabririgo opened this issue Nov 25, 2024 · 3 comments
Labels

Comments

@gabririgo
Copy link

When running solidity coverage using transient storage in solidity (supported by solc v0.8.28) I get the following error:

Error in plugin solidity-coverage: Error: Could not instrument: protocol/extensions/adapters/AUniswapRouter.sol. (Please verify solc can compile this file without errors.) extraneous input 'tokensInCount' expecting {';', '='} (44:30)

Error happens here:
https://github.com/RigoBlock/v3-contracts/blob/9a0274b93fa9f0ca0046350227afb866e810782f/contracts/protocol/extensions/adapters/AUniswapRouter.sol#L44

Steps to reproduce:

  • run rigoblock v3-contracts repo from feat/uniswap v4 branch, run yarn coverage
  • alternatively, define a transient storage variable in a project, the error will be returned.
@cgewecke
Copy link
Member

@gabririgo Thanks for reporting. I think we just need to update the parser dependency to latest here to fix this...will publish a patch doing that in the next couple of hours.

If you want to try this change locally you can coerce your version of solidity-parser/parser to 0.19.0 using yarn resolutions.

Transient support was added to the parser in this release:
https://github.com/solidity-parser/parser/releases/tag/v0.19.0

@cgewecke
Copy link
Member

Should be fixed in 0.8.14 (just published). Closing, but please lmk if you're still seeing problems.

@gabririgo
Copy link
Author

works like a charm with 0.8.14! thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants