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

Codegen Vm.sol to mark envOr functions as view #491

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

anikaraghu
Copy link
Contributor

In foundry-rs/foundry#6757, we marked the envOr functions as view functions. Updating equivalent function signatures here

Code diff is essentially the same as previous attempt #490, except this time I generated Vm.sol the correct way by running the scripts/vm.py script

forge compile and forge test still pass

@@ -148,7 +148,7 @@ abstract contract StdChains {

// lookup rpcUrl, in descending order of priority:
// current -> config (foundry.toml) -> environment variable -> default
function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private returns (Chain memory) {
function getChainWithUpdatedRpcUrl(string memory chainAlias, Chain memory chain) private view returns (Chain memory) {
Copy link
Contributor Author

@anikaraghu anikaraghu Jan 11, 2024

Choose a reason for hiding this comment

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

fixing compiler warning (also same below in StdUtils.sol)

Copy link
Collaborator

@mds1 mds1 left a comment

Choose a reason for hiding this comment

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

Thank you!

@mds1 mds1 merged commit 9454fee into foundry-rs:master Jan 11, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants