Replies: 1 comment
-
Hi @cswkim, glad you like the template. I will reply to your questions below but you might want to go through the Hardhat tutorial and check out the Hardhat documentation. Also, you might want to join the Hardhat Discord server and ask the Hardhat maintainers questions from now on - I am not a maintainer myself.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thank you so much for this template, it's made getting started a great deal easier, especially for a complete novice to web3. I just had some really basic development workflow questions, my apologies if this is in a FAQ somewhere.
Is the general best practice to test your contract on the built-in
hardhat
network first right? Then atestnet
like rinkby, ropsten, etc. And then finally when you are ready tomainnet
?You set the network in your
hardhat.config.ts
:const config: HardhatUserConfig = { defaultNetwork: "hardhat",
...?Is setting the network only relevant for deploying? Is anything else affected by changing the network?
If you follow the pattern in question 1), before deploying to each network do you need to manually change the network like in question 2) and then run
yarn deploy
? In general when you want to keep switching networks and run deployments, what is the best practice?I set-up an Infura account and created a project and used it's
PROJECT ID
as my.env
INFURA_API_KEY
. Is Infura for deploying to testnets and mainnet?You don't explicitly set the owner of the contract when deploying? I'm a little confused as to how the public contract methods with the
onlyOwner
modifier work? After I deployed to the defaulthardhat
network and opened a console usinghardhat console --network hardhat
I could execute publiconlyOwner
functions. But what about contracts deployed to a testnet or mainnet? Generally if you want to run some publiconlyOwner
functions one-off, like let's say apause()
orwithdraw()
function, would you do this from your local machine usinghardhat console
even for mainnet?I realize now most of the questions pertain to
hardhat
specifically, let me know and I'll just move them to a proper forum and close this discussion.Beta Was this translation helpful? Give feedback.
All reactions