Comments (6)
Ok sorry, I think the problem has been solved for now. When I was debugging I got confused between getChain
and vm.rpcUrl
. My problem was with getChain
, but made the issue more confusing because I tried to corroborate the issue by also checking vm.rpcUrl
. But vm.rpcUrl
I believe, only retrieves rpc urls you've configured via foundry.toml
, completely different from getChain
.
I'm assuming this based on the following (no chains were printed since I don't have any configured in my foundry.toml):
function test_Rpc() public {
string[2][] memory chains = vm.rpcUrls();
console.log("Printing Chains");
for (uint256 i = 0; i < chains.length; i++) {
string memory chain = chains[i][0];
string memory rpc = chains[i][1];
console.log("chain: %s, rpc: %s", chain, rpc);
}
assertEq(false, true);
}
Logs:
Printing Chains
Traces:
[6990] Repro_Fuzz::test_Rpc()
getChain
will initialize default rpc entries first and then attempt to override any of them using vm.rpcUrl
(which would be any entries you might have configured yourself).
getChain
seems to be working now with arbitrum_one
that I've updated to 1.8.1 so we can close this issue!
from foundry.
do you have a repro for this? I'm unable to reproduce this via console.log(vm.rpcUrl("arbitrum_one"));
[PASS] test_Increment() (gas: 6715)
Logs:
https://arb1.arbitrum.io/rpc
from foundry.
Ah sorry, been debugging further, I realized that I think the problem is that my forge-std
is out of date (1.5.2) and forge update lib/forge-std
doesn't seem to be pulling down the latest version. I'll close this issue since that's an entirely different problem!
from foundry.
So I managed to update my forge-std
to 1.8.1 (had to sync the git submodule, had the wrong remote path). I am still encountering this problem.
Further debugging has me thinking this might be related to problem with a prior cached rpc entry?
When I attempted to call forge cache clean
I got this issue
error: invalid value 'arbitrum_one' for '[CHAINS]...'
[possible values: all, mainnet, morden, ropsten, rinkeby, goerli, kovan, holesky, sepolia, optimism, optimism-kovan, optimism-goerli, optimism-sepolia, arbitrum, arbitrum-testnet, arbitrum-goerli, arbitrum-sepolia, arbitrum-nova, cronos, cronos-testnet, rsk, bsc, bsc-testnet, poa, sokol, scroll, scroll-alpha-testnet, scroll-sepolia, metis, xdai, polygon, mumbai, amoy, polygon-zkevm, polygon-zkevm-testnet, fantom, fantom-testnet, moonbeam, moonbeam-dev, moonriver, moonbase, dev, anvil-hardhat, evmos, evmos-testnet, chiado, oasis, emerald, emerald-testnet, filecoin-mainnet, filecoin-calibration-testnet, avalanche, fuji, celo, celo-alfajores, celo-baklava, aurora, aurora-testnet, canto, canto-testnet, boba, base, base-goerli, base-sepolia, syndr-sepolia, fraxtal, fraxtal-testnet, blast, blast-sepolia, linea, linea-goerli, zksync, zksync-testnet, mantle, mantle-testnet, viction, zora, zora-goerli, zora-sepolia, pgn, pgn-sepolia, mode, mode-sepolia, elastos, kakarot-sepolia]
tip: a similar value exists: 'arbitrum'
For more information, try '--help'.
How are these "possible values" retrieved? Seems strange to me that vm.getChain
starts with a default value of arbitrum_one
, but under these values arbitrum_one
is just arbitrum
. Perhaps the naming of arbitrum
changed and this is causing an issue?
from foundry.
is this now a CLI parser error?
unclear how to reproduce this
from foundry.
could you try using just "arbitrum"?
from foundry.
Related Issues (20)
- `forge test` crashes with `Message: called Option::unwrap() on a None value` HOT 16
- Forge create gives deserialization error: expected value at line 1 column 1 HOT 2
- vm.rollFork does not persist state when etch in test HOT 5
- `cast call --trace` ignores `--block` option HOT 2
- forge verify-bytecode incorrectly returning a partial match HOT 1
- The application panicked (crashed). on anvil
- Memory leak in latest foundry HOT 12
- expectCall started counting calls differently (and probably wrongly) HOT 6
- feat(script): show transaction hash while waiting for receipts HOT 1
- Feature Request: Decimal Preview for Stack Variables
- Feature request: add an option to specify block "pending" "latest" "finalized" for cast block-number HOT 4
- Missing contract struct in bindings (`forge bind`)
- Computed gas price changed with recent commit HOT 4
- vm.getFoundryVersion() HOT 1
- Getting InvalidFEOpcode in Mainnet transaction simulation HOT 2
- Apple Silicon (M1/M2) - no matching manifest for linux/arm64/v8 error with `ghcr.io/foundry-rs/foundry:latest` HOT 2
- AWS KMS signer broken HOT 1
- Failed to get EIP-1559 fees HOT 3
- Native assertions are not skipped for expectRevert HOT 3
- Address logged during script execution is different from the actual address deployed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry.