truffle
truffle copied to clipboard
Update `truffle init` artifacts
ISSUE
Update truffle init
artifacts. See #5268.
SOLUTION
This PR follows the below mentioned steps to update truffle init
artifacts -
- [x] Remove
Migrations.sol
fromcontracts
. - [x] Remove
1_initial_migration.js
frommigrations
. - [x] Update the sample
truffle-config.js
including the following -- [x] Use Goerli or Sepolia as the testnet.
- [x] Change
.secret
to.env
. - [x] Get
mnemonic
andInfura project id
from.env
. - [x] The comment says auto create at
9545
, but the development environment config is8545
. What should be the ideal behaviour? I guess, the comment needs to be changed and usemanaged Ganache instance
instead ofdevelopment blockchain
.
- [x] Add a
.gitignore
with.env
in it.
Thanks @sukanyaparashar for taking this on! I've left a few comments. Note that issue#5268 also mentioned changing the comment on line 35 in
truffle-config.js
(from port9545
to8545
)
Thanks for the review @cliffoo. In regards to the point of changing the port from 9545
to 8545
, there is a catch here. Port 9545
is used by the managed Ganache when truffle develop
is run with no network config.
On the other hand, when truffle test
is run, it looks for the development
network settings in the config by default, where 8545
is mentioned (Note: ganache-cli has the default port 8545
).
Any thoughts on what should be the ideal default values for the development
configuration?
@sukanyaparashar Yea I think the development
network config is fine, the confusion comes from here, where it mentions a "development blockchain"
, which makes one wonder if it's referring to the development
network (it isn't). I don't really know how to call it instead, "dev"
? "ephemeral"
? Your call 😅
@sukanyaparashar Yea I think the
development
network config is fine, the confusion comes from here, where it mentions a"development blockchain"
, which makes one wonder if it's referring to thedevelopment
network (it isn't). I don't really know how to call it instead,"dev"
?"ephemeral"
? Your call 😅
I guess a better name will be "managed Ganache instance"
instead of a "development blockchain"
, may be?
Sounds fine by me 👍 It's nice that it maps to the variable name in code.
cooool - hit approval but if there is anything left to address from the comments above then do that first before merging :)
Thanks for your approval @eggplantzzz. Yeah! I need to fix few comments and wait for @cliffoo's approval as well.
Nice one! Thanks @sukanyaparashar
Thanks for the approval @cliffoo. I am making few more changes to the truffle-config.js
file comments, after discussing with @cds-amal and @gnidan to make it more appealing to the users to read (like recommending to use truffle dashboard
for better security practices).
The new truffle-config.js writeup looks great! Just a couple notes
Thanks for the quick review, @gnidan. I will make the suggested changes. :)