Skip to content
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

fix: migrate to bnb chain #112

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ jobs:
docker cp $ETH_TASK_ID:/data/ETHEREUM.env /etc/pantos/ETHEREUM.env

# Get the task ID for the bnb service
BNB_TASK_ID=$(docker ps --filter "name=stack-ethereum-contracts--1-bnb" --format "{{.ID}}")
BNB_CHAIN_TASK_ID=$(docker ps --filter "name=stack-ethereum-contracts--1-bnb" --format "{{.ID}}")
# Copy files from the bnb service
docker cp $BNB_TASK_ID:/data/keystore /etc/pantos/keystore.bnb
docker cp $BNB_TASK_ID:/data/BNB.env /etc/pantos/BNB.env
docker cp $BNB_CHAIN_TASK_ID:/data/keystore /etc/pantos/keystore.bnb
docker cp $BNB_CHAIN_TASK_ID:/data/BNB.env /etc/pantos/BNB.env
working-directory: ethereum-contracts

- name: Set env
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
environment:
PANTOS_ENV_FILE: /etc/pantos/service-node-config.env
APP_URL: http://localhost:808${INSTANCE-1}
BNB_PRIVATE_KEY: /etc/pantos/bnb-data/keystore
BNB_CHAIN_PRIVATE_KEY: /etc/pantos/bnb-data/keystore
ETHEREUM_PRIVATE_KEY: /etc/pantos/eth-data/keystore
volumes:
- type: volume
Expand Down Expand Up @@ -46,7 +46,7 @@ services:
environment:
PANTOS_ENV_FILE: /etc/pantos/service-node-config.env
APP_URL: http://localhost:808${INSTANCE-1}
BNB_PRIVATE_KEY: /etc/pantos/bnb-data/keystore
BNB_CHAIN_PRIVATE_KEY: /etc/pantos/bnb-data/keystore
ETHEREUM_PRIVATE_KEY: /etc/pantos/eth-data/keystore
PANTOS_STATUS_MONITOR: 1
ports:
Expand Down
14 changes: 7 additions & 7 deletions service-node-config.docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ PROTOCOL=0.1.0
AVALANCHE_ACTIVE=false

# BNB
#BNB_WITHDRAWAL_ADDRESS=' '
BNB_PRIVATE_KEY_PASSWORD=''
BNB_PROVIDER=http://bnb:8545
BNB_CHAIN_ID=31338
BNB_FALLBACK_PROVIDER=' '
BNB_CONFIRMATIONS=0
BNB_BLOCKS_UNTIL_RESUBMISSION=10
#BNB_CHAIN_WITHDRAWAL_ADDRESS=' '
BNB_CHAIN_PRIVATE_KEY_PASSWORD=''
BNB_CHAIN_PROVIDER=http://bnb:8545
BNB_CHAIN_CHAIN_ID=31338
BNB_CHAIN_FALLBACK_PROVIDER=' '
BNB_CHAIN_CONFIRMATIONS=0
BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION=10

# Celo
CELO_ACTIVE=false
Expand Down
38 changes: 19 additions & 19 deletions service-node-config.env
Original file line number Diff line number Diff line change
Expand Up @@ -72,25 +72,25 @@ AVALANCHE_PRIVATE_KEY_PASSWORD='<fill me>'
# AVALANCHE_BLOCKS_UNTIL_RESUBMISSION=
# AVALANCHE_DEPOSIT=
##### Section: bnb_chain #####
# BNB_ACTIVE=
# BNB_REGISTERED=
BNB_WITHDRAWAL_ADDRESS='<fill me>'
# BNB_PRIVATE_KEY=
BNB_PRIVATE_KEY_PASSWORD='<fill me>'
# BNB_PROVIDER=
# BNB_FALLBACK_PROVIDER=
# BNB_AVERAGE_BLOCK_TIME=
# BNB_PROVIDER_TIMEOUT=
# BNB_CHAIN_ID=
# BNB_HUB=
# BNB_FORWARDER=
# BNB_PAN_TOKEN=
# BNB_CONFIRMATIONS=
# BNB_MIN_ADAPTABLE_FEE_PER_GAS=
# BNB_MAX_TOTAL_FEE_PER_GAS=
# BNB_ADAPTABLE_FEE_INCREASE_FACTOR=
# BNB_BLOCKS_UNTIL_RESUBMISSION=
# BNB_DEPOSIT=
# BNB_CHAIN_ACTIVE=
# BNB_CHAIN_REGISTERED=
BNB_CHAIN_WITHDRAWAL_ADDRESS='<fill me>'
# BNB_CHAIN_PRIVATE_KEY=
BNB_CHAIN_PRIVATE_KEY_PASSWORD='<fill me>'
# BNB_CHAIN_PROVIDER=
# BNB_CHAIN_FALLBACK_PROVIDER=
# BNB_CHAIN_AVERAGE_BLOCK_TIME=
# BNB_CHAIN_PROVIDER_TIMEOUT=
# BNB_CHAIN_CHAIN_ID=
# BNB_CHAIN_HUB=
# BNB_CHAIN_FORWARDER=
# BNB_CHAIN_PAN_TOKEN=
# BNB_CHAIN_CONFIRMATIONS=
# BNB_CHAIN_MIN_ADAPTABLE_FEE_PER_GAS=
# BNB_CHAIN_MAX_TOTAL_FEE_PER_GAS=
# BNB_CHAIN_ADAPTABLE_FEE_INCREASE_FACTOR=
# BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION=
# BNB_CHAIN_DEPOSIT=
##### Section: celo #####
# CELO_ACTIVE=
# CELO_REGISTERED=
Expand Down
16 changes: 8 additions & 8 deletions service-node-config.local.env
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ SIGNER_PEM_PASSWORD=1234
AVALANCHE_ACTIVE=false

# BNB
#BNB_WITHDRAWAL_ADDRESS=' '
#BNB_CHAIN_WITHDRAWAL_ADDRESS=' '
# **This path is used in CI**
BNB_PRIVATE_KEY=/etc/pantos/keystore.bnb
BNB_PRIVATE_KEY_PASSWORD=''
BNB_PROVIDER=http://localhost:8511
BNB_CHAIN_ID=31338
BNB_FALLBACK_PROVIDER=' '
BNB_CONFIRMATIONS=2
BNB_BLOCKS_UNTIL_RESUBMISSION=10
BNB_CHAIN_PRIVATE_KEY=/etc/pantos/keystore.bnb
BNB_CHAIN_PRIVATE_KEY_PASSWORD=''
BNB_CHAIN_PROVIDER=http://localhost:8511
BNB_CHAIN_CHAIN_ID=31338
BNB_CHAIN_FALLBACK_PROVIDER=' '
BNB_CHAIN_CONFIRMATIONS=2
BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION=10

# Celo
CELO_ACTIVE=false
Expand Down
38 changes: 19 additions & 19 deletions service-node-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,26 @@ blockchains:
blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${AVALANCHE_BLOCKS_UNTIL_RESUBMISSION:20}
deposit: !ENV tag:yaml.org,2002:int ${AVALANCHE_DEPOSIT:10000000000000}
bnb_chain:
active: !ENV tag:yaml.org,2002:bool ${BNB_ACTIVE:true}
registered: !ENV tag:yaml.org,2002:bool ${BNB_REGISTERED:true}
withdrawal_address: !ENV ${BNB_WITHDRAWAL_ADDRESS:0x726265A9e352F2e9f15F255957840992803cED7d}
private_key: !ENV ${BNB_PRIVATE_KEY:/etc/pantos/service-node.keystore}
private_key_password: !ENV ${BNB_PRIVATE_KEY_PASSWORD:<fill me>}
provider: !ENV ${BNB_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/}
active: !ENV tag:yaml.org,2002:bool ${BNB_CHAIN_ACTIVE:true}
registered: !ENV tag:yaml.org,2002:bool ${BNB_CHAIN_REGISTERED:true}
withdrawal_address: !ENV ${BNB_CHAIN_WITHDRAWAL_ADDRESS:0x726265A9e352F2e9f15F255957840992803cED7d}
private_key: !ENV ${BNB_CHAIN_PRIVATE_KEY:/etc/pantos/service-node.keystore}
private_key_password: !ENV ${BNB_CHAIN_PRIVATE_KEY_PASSWORD:<fill me>}
provider: !ENV ${BNB_CHAIN_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/}
fallback_providers:
- !ENV ${BNB_FALLBACK_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/}
average_block_time: !ENV tag:yaml.org,2002:int ${BNB_AVERAGE_BLOCK_TIME:3}
provider_timeout: !ENV tag:yaml.org,2002:int ${BNB_PROVIDER_TIMEOUT:100}
chain_id: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_ID:97}
hub: !ENV ${BNB_HUB:0xFB37499DC5401Dc39a0734df1fC7924d769721d5}
forwarder: !ENV ${BNB_FORWARDER:0x8d1A4C7bc5f327f30895150c4596E3db6Eb48562}
pan_token: !ENV ${BNB_PAN_TOKEN:0xC892F1D09a7BEF98d65e7f9bD4642d36BC506441}
confirmations: !ENV tag:yaml.org,2002:int ${BNB_CONFIRMATIONS:20}
min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_MIN_ADAPTABLE_FEE_PER_GAS:5000000000}
max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_MAX_TOTAL_FEE_PER_GAS:0}
adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${BNB_ADAPTABLE_FEE_INCREASE_FACTOR:1.101}
blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${BNB_BLOCKS_UNTIL_RESUBMISSION:20}
deposit: !ENV tag:yaml.org,2002:int ${BNB_DEPOSIT:10000000000000}
- !ENV ${BNB_CHAIN_FALLBACK_PROVIDER:https://data-seed-prebsc-1-s1.binance.org:8545/}
average_block_time: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_AVERAGE_BLOCK_TIME:3}
provider_timeout: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_PROVIDER_TIMEOUT:100}
chain_id: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_CHAIN_ID:97}
hub: !ENV ${BNB_CHAIN_HUB:0xFB37499DC5401Dc39a0734df1fC7924d769721d5}
forwarder: !ENV ${BNB_CHAIN_FORWARDER:0x8d1A4C7bc5f327f30895150c4596E3db6Eb48562}
pan_token: !ENV ${BNB_CHAIN_PAN_TOKEN:0xC892F1D09a7BEF98d65e7f9bD4642d36BC506441}
confirmations: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_CONFIRMATIONS:20}
min_adaptable_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_MIN_ADAPTABLE_FEE_PER_GAS:5000000000}
max_total_fee_per_gas: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_MAX_TOTAL_FEE_PER_GAS:0}
adaptable_fee_increase_factor: !ENV tag:yaml.org,2002:float ${BNB_CHAIN_ADAPTABLE_FEE_INCREASE_FACTOR:1.101}
blocks_until_resubmission: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_BLOCKS_UNTIL_RESUBMISSION:20}
deposit: !ENV tag:yaml.org,2002:int ${BNB_CHAIN_DEPOSIT:10000000000000}
celo:
active: !ENV tag:yaml.org,2002:bool ${CELO_ACTIVE:true}
registered: !ENV tag:yaml.org,2002:bool ${CELO_REGISTERED:true}
Expand Down
Loading