Closed Meherabhossen closed 6 months ago
try to change the port number in ganache . Sometime firewall blocking access to some port in PC .
Also check anvil is not running on same port
https://github.com/Cyfrin/foundry-full-course-f23/discussions/318
https://github.com/Cyfrin/foundry-full-course-f23/discussions/873
Take a look on above url , hope this help
I run this command forge create SimpleStorage --rpc-url http://127.0.0.1:7550 --interactive But this errors had appeared , solution please §§
[⠃] Compiling...No files changed, compilation skipped [⠊] Compiling... Error: error sending request for url (http://127.0.0.1:7550/): error trying to connect: tcp connect error: Connection refused (os error 111)
Context:
* Error #0: error trying to connect: tcp connect error: Connection refused (os error 111)
Hi,
This error generally pops up when there is a TCP Connection problem meaning that your CLI cannot connect. What you should try to do is this :
foundryup
--rpc-url
with anvil first by opening a second terminal and typing anvil
use the rpc url of it generally it's : http://127.0.0.1:8545Try this
To solve this issue u have to open a new terminal with same directory to initialize Anvil
so to show it is running already
And your code line is not complete due to using interactive is to the fact there should be a private key that you should either use .env or using the latest keystore method
Or if you don't want to do that u can just compile it by using forge create SimpleStorage
it will automatically create using anvil default way but when u need to specify with private key follow the steps I gave you
if u use the wsl in vs code, you have to make sure ganache also in wsl, so you need to create a new wroking space in ganache und change it to wsl
Thanks for the tip!
On Fri, Mar 15, 2024, 3:47 PM Chujimafa @.***> wrote:
if u use the wsl in vs code, you have to make sure ganache also in wsl, so you need to create a new wroking space in ganache und change it to wsl
— Reply to this email directly, view it on GitHub https://github.com/Cyfrin/foundry-full-course-f23/issues/1294#issuecomment-1999824493, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEHRX5UPEQW4ZMNA3CWDO43YYMCWPAVCNFSM6AAAAABBQB6ZRKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJZHAZDINBZGM . You are receiving this because you commented.Message ID: @.***>
Going to close this for now, those who end up here, please see the discussion!
Discussed in https://github.com/Cyfrin/foundry-full-course-f23/discussions/1282