smartcontractkit / hardhat-starter-kit

A repo for boilerplate code for testing, deploying, and shipping chainlink solidity code.
MIT License
1.22k stars 492 forks source link

Wrong instruction for interacting with localhost node ? #40

Closed balibou closed 3 years ago

balibou commented 3 years ago

In 00_Deploy_Mocks.js l.34 the instruction is "Please run 'npx hardhat console' to interact with the deployed smart contracts!

Should it be npx hardhat node instead ?

fabioDMFerreira commented 3 years ago

The local network should be launched before starting the deployment. Otherwise, the script will exit before reaching the instruction log line.

The npx hardhat console instruction allows the interaction with the smart contracts. See more details about this instruction here.

balibou commented 3 years ago

@fabioDMFerreira when I run npx hardhat deploy without launching local network, the script (00_Deploy_Mocks.js) runs until the end. Maybe I don't get your point ...

fabioDMFerreira commented 3 years ago

That's odd, you shouldn't be able to deploy to a local network if you don't have any node running. Wondering where the smart contracts are being deployed.

The correct command to interact with the deployed smart contracts is npx hardhat console. The npx hardhat node is used to launch a node in the local network.

balibou commented 3 years ago

Ok thanks for your feedback :)