hello everyone! i make tutorial from ethereum docs and get error when i run deploy. js What's wrong? I have 0.3 rETH on ropsten testnetwork, but it's too low for deploy???
Mar 14, 2022, 9:51 AM
Have you run it through ropsten network in your deployment command? Like -network ropsten
Mar 14, 2022, 10:01 AM
yeah i run it from command line: npx hardhat --network ropsten run scripts/deploy.js
Mar 14, 2022, 10:05 AM
Please share deploy script
Mar 14, 2022, 10:09 AM
Guys, is it support or scam?
Mar 14, 2022, 10:12 AM
scam
never ever ever send your keys to anyone
never commit in git etc either
but you do need a .env config in hardhat so
google that
google that
Mar 14, 2022, 10:13 AM
i know this :)))
Mar 14, 2022, 10:13 AM
but it’s all local to your machine. nobody needs it
Mar 14, 2022, 10:13 AM
of course
Mar 14, 2022, 10:14 AM
Could you tell me why not to commit? Don’t really understand how they could extract data
Mar 14, 2022, 10:14 AM
it’s just bad practice, git is designed to share code, even if you delete later it’s in the history
it is to prevent a leak
Mar 14, 2022, 10:15 AM
you just asked why you should never share private key on a platform based on opensource?
Mar 14, 2022, 10:16 AM
Oh, ok got it, like if you ever commited private keys and remodel them later it’s still possible to get them, right?
Mar 14, 2022, 10:16 AM
yes
Mar 14, 2022, 10:16 AM
.env is the best solution😎
Mar 14, 2022, 10:16 AM
well he could use private repo and it’s still not wise
Mar 14, 2022, 10:16 AM
No, I thought it’s some sort of .git leaking too much info
Mar 14, 2022, 10:17 AM
yes of course as mentioned
Mar 14, 2022, 10:17 AM
of course
but I saw so many projects that got fucked
but I saw so many projects that got fucked
Mar 14, 2022, 10:17 AM
well nothings to say bitbucket or git won’t get hacked… or a build pipeline
either way - don’t commit wallet keys and usually api keys shouldn’t be - in many companies it’s sackable practice
Mar 14, 2022, 10:18 AM
Make a .env file and store all the private cide of the project.
After that give the path of the file in .gitignore
After that give the path of the file in .gitignore
Mar 14, 2022, 10:19 AM
i make a .env file in project folder with api link from alchemy and private key from metamask. Then i take this parameters by hardhat.config.js
Mar 14, 2022, 10:24 AM
ive done the same, i wasnt after help - he was.
Mar 14, 2022, 10:26 AM
i dont understand how to solve a problem... i think that myNFT.sol file not linked to .env or somthing...
heh i deploy contract, but it's very expensive >0,5rETH...
Mar 14, 2022, 11:16 AM
You need to use your env information in the deploy script not in you contract
Mar 14, 2022, 11:20 AM
yeah, that is it. but why so expensive gas price for deploy? how make it cheaper?
Mar 14, 2022, 11:24 AM
I dont know how to make your contract less expensive, check what u sre doing. Maybe u have a big loop, to much transaction to storage...
Mar 14, 2022, 11:29 AM
eth is super expensive, the more code the higher the price
Mar 14, 2022, 11:41 AM
so 0,5eth for contract deploy is ok?
Heh, now there is 3 contract deployed... what wrong i do...
Mar 14, 2022, 1:43 PM
you should show the error
Mar 14, 2022, 2:51 PM