-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support local deployment #371
Conversation
maybe we need delete bscChaindId in file package.json |
address: "0x37B8516a0F88E65D677229b402ec6C1e0E333004", | ||
balance: web3.utils.toBN("500000000000000000000").toString("hex") // 500e18 | ||
}, | ||
{ | ||
address: "0x6c468CF8c9879006E22EC4029696E005C2319C9D", | ||
balance: web3.utils.toBN("500000000000000000000").toString("hex") // 500e18 | ||
}, | ||
|
||
{ | ||
address: "0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186", | ||
balance: web3.utils.toBN("500000000000000000000000000").toString("hex") // 500000000e18 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we have private keys available for those accounts? or how we can access those funds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, they were already there in the template. You can add your own addresses to the list via the template, and manage the keys yourself.
This PR facilitates the generation of the genesis contracts for a local deployment of a BSC network.
The node-deploy repository currently modifies the genesis contract templates using
sed
which is prone to error and not easy to maintain due to overwriting the original files, but with this PR the genesis configurations for a local network can be generated simply by including the flag--network local
.Motivation
To run a local network several additional steps need to be coordinated to enable recently added features: e.g. initializing the whitelisted relayers, enabling the finality reward, enabling malicious vote slashing etc. These steps are normally performed through standard transactions or through governance, but the flows may be complicated especially in a local environment.
To facilitate these steps, the initialization is done in the contract code itself when generating the bytecode for the genesis contracts. This PR ensures that these initializations happen automatically when passing the
--network local
flag. (i.e.node generate-genesis.js --network local
.Additional improvements
bscChainId
value from thechainid
flag.node generate-initHolders.js --initHolders <commaSeparatedAddresses>