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 1ea182b commit 8454346
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
4 changes: 2 additions & 2 deletions subnet/deployment-generator/src/config_gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const config = {
bootnode: (process.env.VERSION_BOOTNODE || 'feature-v1-release'),
// observer: (process.env.VERSION_OBSERVER || 'latest'),
relayer: process.env.VERSION_RELAYER || "feature-v1-release",
stats: process.env.VERSION_STATS || "reature-v1-release",
stats: process.env.VERSION_STATS || "feature-v1-release",
frontend: process.env.VERSION_FRONTEND || "feature-v1-release",
// csc: process.env.VERSION_CSC || "v0.2.0",
csc: process.env.VERSION_CSC || "feature-v0.2.1",
zero: (process.env.VERSION_ZERO || 'v0.1.1')
zero: (process.env.VERSION_ZERO || 'v0.1.0')
},
parentnet: {
network: process.env.PARENTNET || "testnet",
Expand Down
34 changes: 19 additions & 15 deletions subnet/deployment-generator/src/gen_other.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,26 @@ function genCommands() {
if (config.relayer_mode == 'lite'){

} else if (config.relayer_mode == 'full'){
commands += "\n 1. Deploy XDC-Zero\n"
commands += "\n 2. Add XDC-Zero Address to common.env\n"
commands += "\n 3. Restart Relayer\n"
commands += "\n 4. Confirm Relayer is running \n"
commands += ` Relayer: http://${config.public_ip}:4000\n`
commands += ` Frontend: http://${config.public_ip}:6000\n`
commands += "\n\nOPTIONAL: Deploy XDC-Zero crosschain framework\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 += " \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 += " - 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 += "\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"
commands += "\n3. Restart Relayer\n"
commands += ` docker compose --env-file docker-compose.env --profile services down\n`;
commands += ` docker compose --env-file docker-compose.env --profile services up -d\n`;
commands += "\n4. Confirm Relayer is running \n"
commands += ` Relayer: http://${config.public_ip}:4000\n`
commands += ` Frontend: http://${config.public_ip}:6000\n`
} else if (config.relayer_mode == 'temp'){
commands += "\n\nOPTIONAL: Deploy XDC-Zero crosschain framework (Require RELAYER_MODE=full)\n" //there is a branch here: user can decide to deploy REVERSE or NOT ( subnet > mainnet or subnet <> mainnet)
commands += "\n 1. Transfer funds to your SUBNET_WALLET\n"
commands += "\n 2. Deploy Reverse Checkpoint Smart Contract (Reverse CSC)\n"
commands += "\n 3. Deploy XDC-Zero \n"
commands += "\n 4. Add XDC-Zero Address to common.env\n"
commands += "\n 5. Restart Relayer\n"
commands += "\n 6. Confirm Relayer is running \n"
commands += ` Relayer: ${config.public_ip}:4000\n`
commands += ` Frontend: ${config.public_ip}:6000\n`

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

0 comments on commit 8454346

Please sign in to comment.