This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contracts.yml
75 lines (70 loc) · 3.04 KB
/
contracts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: "3.3"
services:
# Get ConstAddressDeployer compiled contract (JSON file)
contracts-init:
image: ghcr.io/topos-protocol/topos-smart-contracts:${TOPOS_MESSAGING_PROTOCOL_CONTRACTS_VERSION}
container_name: contracts-init
init: true
volumes:
- contracts:/usr/src/app/artifacts/contracts
networks:
- local-erc20-messaging-infra-docker
contracts-topos:
image: ghcr.io/topos-protocol/topos-smart-contracts:${TOPOS_MESSAGING_PROTOCOL_CONTRACTS_VERSION}
container_name: contracts-topos
init: true
environment:
- PRIVATE_KEY=${PRIVATE_KEY}
- TOKEN_DEPLOYER_SALT=${TOKEN_DEPLOYER_SALT}
- TOPOS_CORE_SALT=${TOPOS_CORE_SALT}
- TOPOS_CORE_PROXY_SALT=${TOPOS_CORE_PROXY_SALT}
- ERC20_MESSAGING_SALT=${ERC20_MESSAGING_SALT}
- SUBNET_REGISTRATOR_SALT=${SUBNET_REGISTRATOR_SALT}
- INCAL_HOST_PORT=${INCAL_HOST_PORT}
- INCAL_CHAIN_ID=${INCAL_CHAIN_ID}
- INCAL_LOGO_URL=${INCAL_LOGO_URL}
command: bash -c "
npx ts-node scripts/deploy-topos-msg-protocol http://topos-node-1:8545 $(cat /data/topos/node/node-1/consensus/validator.key) > /contracts/.env &&
echo export SUBNET_REGISTRATOR_CONTRACT_ADDRESS=$(npx ts-node scripts/deploy-subnet-registrator http://topos-node-1:8545 $(cat /data/topos/node/node-1/consensus/validator.key) $SUBNET_REGISTRATOR_SALT 4000000) >> /contracts/.env &&
source /contracts/.env &&
cat /contracts/.env &&
npm run register-subnet http://topos-node-1:8545 $(printenv SUBNET_REGISTRATOR_CONTRACT_ADDRESS) Incal $INCAL_CHAIN_ID http://localhost:$INCAL_HOST_PORT ws://localhost:$INCAL_HOST_PORT/ws INCA $INCAL_LOGO_URL $(cat /data/topos/node/node-1/consensus/validator.key) $(cat /data/incal/data-1/consensus/validator.key)"
volumes:
- contracts:/contracts
- topos-data:/data/topos
- incal-data:/data/incal
depends_on:
contracts-init:
condition: service_completed_successfully
topos-node-4:
condition: service_healthy
incal-node-4:
condition: service_healthy
networks:
- local-erc20-messaging-infra-docker
contracts-incal:
image: ghcr.io/topos-protocol/topos-smart-contracts:${TOPOS_MESSAGING_PROTOCOL_CONTRACTS_VERSION}
container_name: contracts-incal
init: true
environment:
- PRIVATE_KEY=${PRIVATE_KEY}
- TOKEN_DEPLOYER_SALT=${TOKEN_DEPLOYER_SALT}
- TOPOS_CORE_SALT=${TOPOS_CORE_SALT}
- TOPOS_CORE_PROXY_SALT=${TOPOS_CORE_PROXY_SALT}
- ERC20_MESSAGING_SALT=${ERC20_MESSAGING_SALT}
- SUBNET_REGISTRATOR_SALT=${SUBNET_REGISTRATOR_SALT}
command: bash -c "
npm run deploy:topos-msg-protocol http://incal-node-1:8545 $$(cat /data/incal/data-1/consensus/validator.key)"
volumes:
- incal-data:/data/incal
depends_on:
incal-init:
condition: service_completed_successfully
contracts-init:
condition: service_completed_successfully
incal-node-4:
condition: service_healthy
networks:
- local-erc20-messaging-infra-docker
volumes:
contracts: