Lesson6: Error while $ forge create........ #1755
-
This is the code
This is the output
Can anyone tell me why this error is popping?? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Have you tried connecting to Ganache? Do you get "Listening on 127.0.0.1:8545" at the bottom after running |
Beta Was this translation helpful? Give feedback.
-
Hello @yasharyan0904, Please use the below command and let us know how it plays out. forge create src/SimpleStorage.sol:SimpleStorage --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://127.0.0.1:8545 if your |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
You need to run a second terminal where you will run the
anvil
command to spin up an anvil blockchain, and you leave it running, then you can run this commandforge create src/SimpleStorage.sol:SimpleStorage --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://127.0.0.1:8545
and everything should work just fine.