Giter Club home page Giter Club logo

Comments (6)

ramenforbreakfast avatar ramenforbreakfast commented on June 5, 2024 1

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.

mattsse avatar mattsse commented on June 5, 2024

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.

ramenforbreakfast avatar ramenforbreakfast commented on June 5, 2024

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.

ramenforbreakfast avatar ramenforbreakfast commented on June 5, 2024

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.

mattsse avatar mattsse commented on June 5, 2024

is this now a CLI parser error?

unclear how to reproduce this

from foundry.

mattsse avatar mattsse commented on June 5, 2024

could you try using just "arbitrum"?

from foundry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.