Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Aug 10, 2024
1 parent 8454346 commit 257390e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
6 changes: 2 additions & 4 deletions subnet/deployment-generator/src/gen_env.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ PARENTNET_URL=${config.parentnet.url}
SUBNET_URL=http://${ip_record["subnet1"]}:8545
PARENTNET_PK=${config.parentnet.privatekey}
SUBNET_PK=
GRANDMASTER_PK=??
SUBNET_PK=${config.keys.grandmaster_pk}
CSC=
REVERSE_CSC=
Expand All @@ -144,8 +143,7 @@ SUBNET_URL=http://${config.ip_1}:8545
PARENTNET_PK=${config.parentnet.privatekey}
SUBNET_PK=
GRANDMASTER_PK=??
SUBNET_PK=${config.keys.grandmaster_pk}
CSC=
REVERSE_CSC=
Expand Down
17 changes: 11 additions & 6 deletions subnet/deployment-generator/src/gen_other.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,30 @@ function genCommands() {
} else {
commands += ` docker run --env-file contract_deploy.env xinfinorg/csc:${config.version.csc} ${csc_mode}\n`
}
commands += "\n4. Start services (relayer, backend, frontend)\n"
commands += "\n4. Add CSC configuration to common.env\n"
commands += " - copy step 3. output CHECKPOINT_CONTRACT to common.env\n"
commands += "\n5. Start services (relayer, backend, frontend)\n"
commands += ` docker compose --env-file docker-compose.env --profile services pull\n`;
commands += ` docker compose --env-file docker-compose.env --profile services up -d\n`;
commands += "\n5. Confirm Subnet services through browser UI\n"
commands += "\n6. Confirm Subnet services through browser UI\n"
commands += ` Frontend: http://${config.public_ip}:6000\n`
commands += ` Relayer: http://${config.public_ip}:4000\n`

if (config.relayer_mode == 'lite'){

} else if (config.relayer_mode == 'full'){
commands += "\n\nOPTIONAL: Deploy XDC-Zero crosschain framework\n"
commands += "\n1. Add CSC configuration to contract_deploy.env\n"
commands += " - copy CHECKPOINT_CONTRACT from common.env to CSC in contract_deploy.env\n"
commands += " - copy CHECKPOINT_CONTRACT from common.env to REVERSE_CSC in contract_deploy.env\n"
commands += "\n1. Deploy XDC-Zero\n"
commands += ` docker pull xinfinorg/xdc-zero:${config.version.zero}\n`
commands += ` docker run --env-file contract_deploy.env --network generated_docker_net xinfinorg/xdc-zero:${config.version.zero}\n`
commands += ` docker run --env-file contract_deploy.env --network generated_docker_net xinfinorg/xdc-zero:${config.version.zero} endpointandregisterchain\n`
commands += " \n(Optional) Deploy Subswap and Register Application to XDC-Zero\n"
commands += " - copy SUBNET_ZERO_CONTRACT and PARENTNET_ZERO_CONTRACT to contract_deploy.env\n"
commands += " docker run --env-file contract_deploy.env --network generated_docker_net xinfinorg/xdc-zero:v0.1.0 subswap.js\n"
commands += " docker run --env-file contract_deploy.env --network generated_docker_net xinfinorg/xdc-zero:v0.1.0 subswap\n"
commands += " - copy SUBNET_APP and PARENTNET_APP to contract_deploy.env)\n"
commands += " docker run --env-file contract_deploy.env --network generated_docker_net xinfinorg/xdc-zero:v0.1.0 applicationregister.js\n"
commands += " docker run --env-file contract_deploy.env --network generated_docker_net xinfinorg/xdc-zero:v0.1.0 applicationregister\n"
commands += "\n2. Add XDC-Zero Configuration to common.env\n"
commands += " - copy step 1. output SUBNET_ZERO_CONTRACT and PARENTNET_ZERO_CONTRACT to common.env\n"
commands += " - Add PARENTNET_ZERO_WALLET_PK to common.env, this should be different from PARENTNET_WALLET_PK\n"
Expand All @@ -129,7 +134,7 @@ function genCommands() {
commands += ` Relayer: http://${config.public_ip}:4000\n`
commands += ` Frontend: http://${config.public_ip}:6000\n`
} else if (config.relayer_mode == 'temp'){

} else {
console.log("Error: Invalid Relayer Mode")
exit()
Expand Down

0 comments on commit 257390e

Please sign in to comment.