Skip to content

Commit

Permalink
add deploy with repo
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Jul 4, 2024
1 parent c781321 commit 1c67f46
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions cicd/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Deploy with Docker
## Deploy XDC Zero
1. create a .env like the following example
```
Expand All @@ -14,14 +15,13 @@ REVERSE_CSC=0x4444444444444444444444444444444444444444
docker run --env-file .env xinfinorg/xdc-zero:latest endpointandregisterchain.js
```

## Regist Application to XDC Zero

- add the output to .env
```
SUBNET_ZERO_CONTRACT=0x5555555555555555555555555555555555555555
PARENTNET_ZERO_CONTRACT=0x6666666666666666666666666666666666666666
```

## Deploy Subswap
3. Deploy Subswap
```
docker run --env-file .env xinfinorg/xdc-zero:latest subswap.js
Expand All @@ -32,7 +32,56 @@ SUBNET_APP=0x7777777777777777777777777777777777777777
PARENTNET_APP=0x8888888888888888888888888888888888888888
```


## Register Application to XDC Zero
4. Register Subswap to XDC-Zero
```
docker run --env-file .env xinfinorg/xdc-zero:latest applicationregister.js
```

<br/>
<br/>

# Deploy using this repository

1. Install packages
```
cd ../endpoint
yarn
cd ../applications/subswap/contract
yarn
cd cicd
yarn
```

2. Configure .env at cicd/mount/.env
```
PARENTNET=devnet
SUBNET_URL=
SUBNET_PK=0x1111111111111111111111111111111111111111111111111111111111111111
PARENTNET_PK=0x2222222222222222222222222222222222222222222222222222222222222222
CSC=0x3333333333333333333333333333333333333333
REVERSE_CSC=0x4444444444444444444444444444444444444444
```

3. Deploy endpoint and register chain
```
cd cicd
node endpointandregisterchain.js
```

4. Deploy Subswap
```
node subswap.js
```
- add the output to cicd/mount/.env
```
SUBNET_APP=0x7777777777777777777777777777777777777777
PARENTNET_APP=0x8888888888888888888888888888888888888888
```


5. Register Application
```
node applicationregister.js
```

0 comments on commit 1c67f46

Please sign in to comment.