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)
- `ETHERSCAN_API_KEY` in `.env` activates trace resolving in non-forked tests HOT 2
- Fail to swap in Cruve.fi. Maybe there is compatibility bug to interact with Vyper contract. HOT 1
- Etherscan traces are only resolved for first instance of test run
- (anvil): `forge script` breaks when run with Blast mainnet RPC against anvil forks HOT 2
- Add support for the frame.sh desktop wallet HOT 1
- Detect used contract that haven't been initialised and return an explicit error message
- `--rpc-url` option is ignored by rpc cheatcodes HOT 1
- Forge script deployment producing wrong contract address on `Rootstock` network HOT 2
- [Improvement] change forge build sizes report to Bytes
- vm.getCode doesn't find artifacts by name HOT 5
- Can the team create a cheat code to test sending multiple transactions from an EOA in a single test function? HOT 4
- Display block number used on fork tests HOT 1
- `forge clone`: Clone verified contracts as foundry project HOT 2
- Enable jemalloc for Anvil
- forge no longer finds test HOT 1
- Arbitrum fork InvalidFEOpcode when calling getPricesInWei on Arbitrum: ArbGasInfo HOT 1
- Retrieving events from RPC works with `cast logs`, but not `vm.rpc` and `vm.eth_getLogs`
- Allow replacing `constant` or `immutable` in Foundry, or allow `mockCall` to replace constructor
- Where's the default priority-gas-price=3gwei set? Could you document all default values and alert people in the `cast send --help`? blindly calling caused much more spent in gas, 1000x times more than in Metamask
- Not able to perform testing using huff in WSL on foundry
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.