-
Notifications
You must be signed in to change notification settings - Fork 50
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
Generator v0.1.7 #108
Generator v0.1.7 #108
Conversation
@@ -0,0 +1,175 @@ | |||
const crypto = require('crypto'); |
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.
All comparation in js, best practice use ===
matching with type.
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.
Thanks, updated
port = 20303+i-1 | ||
rpcport = 8545+i-1 | ||
wsport= 9555+i-1 |
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.
why -1?
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.
because 'i' starts at 1 in this loop.
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.
then can you start with 20302?
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.
sure, just thought it's easier to read when number is the same as start port
var config_env = ` | ||
INSTANCE_NAME=subnet${subnet_id} | ||
PRIVATE_KEY=${private_key} | ||
BOOTNODES=enode://cc566d1033f21c7eb0eb9f403bb651f3949b5f63b40683917\ |
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.
is this bootnode constant
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.
I guess so. It doesn't matter what value we use here.
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.
I don't get that... so any value will do? Then just put 000
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.
I just tested 0000 and aaaaa. It doesn't work. Seems it has to be a correct address format but any valid addr will work.
switch (config.parentnet.network){ | ||
case 'devnet': | ||
url='https://devnetstats.apothem.network/devnet' | ||
break | ||
case 'testnet': | ||
url='https://erpc.apothem.network/' | ||
break | ||
case 'mainnet': | ||
url='https://devnetstats.apothem.network/mainnet' //confirm url | ||
break | ||
default: |
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.
can you make json config for those mapping and import here?
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.
easier to change and expand
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.
Thanks, updated.
"validators": validators, | ||
"gap": 450, | ||
"epoch": 900, | ||
"xdcparentnet": "https://devnetstats.apothem.network/devnet", |
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.
need to make this as variable right?
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.
huh I never noticed this is fixed. Anyways in new CSC galaxy moved this config to different file. Will change next PR.
subnet/scripts/faucet/coin.js
Outdated
@@ -0,0 +1,41 @@ | |||
|
|||
|
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.
why 2 new lines?
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.
removed
var official_urls = { | ||
'devnet':'https://devnetstats.apothem.network/devnet' , | ||
'testnet':'https://erpc.apothem.network/' , | ||
'mainnet': 'https://devnetstats.apothem.network/mainnet' //confirm url | ||
} |
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.
this is not what I mean, have a json config put those values in, and read it. Like this way: https://github.com/XinFinOrg/XDC-blockchain-monitor/blob/main/config.json#L27
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.
hmm, I don't know, that creates more files. We don't have that many constants and the object is a form of json.
please rebase your commits also |
use another PR |
No description provided.