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

foundry: add chain id 31337 while forking chain #531

Merged
merged 1 commit into from
Sep 20, 2023
Merged

foundry: add chain id 31337 while forking chain #531

merged 1 commit into from
Sep 20, 2023

Conversation

jrcarlos2000
Copy link
Collaborator

Description

Addresses issues #524

Additional Information

Related Issues

_Closes #524

Your ENS/address: jrcarlos2000.eth

@technophile-04
Copy link
Collaborator

technophile-04 commented Sep 12, 2023

Tysm @jrcarlos2000 🙌 !!

"fork": "anvil --fork-url ${0:-mainnet} --chain-id 31337 --config-out localhost.json",

Curious about what ${0:-mainnet} do ?

Also, I was wondering if there a direct way to setup to this defult in foundry.toml file ?

Like even if we people manually do anvil --fork-url URL_WITH_API_KEY it will default to chainId 31337 because of default in foundry.toml 🤔 ?

@technophile-04 technophile-04 changed the title add chain id 31337 foundry: add chain id 31337 while forking chain Sep 12, 2023
@jrcarlos2000
Copy link
Collaborator Author

${0:-mainnet} will take the name of the network you declare in foundry.toml and use it for the fork. you can also pass an RPC_URL directly.

I was wondering if there a direct way to setup to this defult in foundry.toml file ?

anvil wiill override the value of the chain id specified in toml to the chain id of the RPC specified for the fork. for now the only way of using 31337 would be pass --chain-id @technophile-04

@jrcarlos2000 jrcarlos2000 self-assigned this Sep 20, 2023
@technophile-04
Copy link
Collaborator

got it thanks Carlos merging this 🙌

@technophile-04 technophile-04 merged commit 865a6c0 into scaffold-eth:foundry Sep 20, 2023
@github-actions github-actions bot mentioned this pull request Oct 5, 2023
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