Skip to content

Commit c11a8c0

Browse files
committed
chore(target_chains/ethereum): update deploy.sh
1 parent 8ac4b7f commit c11a8c0

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

target_chains/ethereum/contracts/deploy.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
#!/bin/bash
22
#
33
# This script deploys changes to given networks. Usage:
4-
# $ ./deploy.sh <network_a> <network_a> <...>
5-
# Network names are defined in `truffle-config.js`.
4+
# $ ./deploy.sh <version:vX.Y.Z|latest> <network_a> <network_a> <...>
5+
#
6+
# You need to set the PK environment variable to your private key.
67
#
78
# Example: Deploying to some testnet networks
8-
# $ ./deploy.sh bnb_testnet fantom_testnet mumbai
9+
# $ ./deploy.sh latest bnb_testnet fantom_testnet mumbai
910
#
1011
# Example: Deploying to some mainnet networks
11-
# $ ./deploy.sh ethereum bnb avalanche
12+
# $ ./deploy.sh v1.4.5 ethereum bnb avalanche
1213
set -euo pipefail
1314

14-
echo "=========== Building dependencies ==========="
15+
echo "=========== Preparing contracts ==========="
1516

16-
# This command also compiles the contracts if latest version is used
17-
pnpm turbo build --filter @pythnetwork/pyth-evm-contract
18-
19-
echo "=========== Deploying the contracts ==========="
17+
PK=$PK
2018

2119
version="$1"
2220
shift
@@ -39,6 +37,13 @@ else
3937
stdoutputdir="$tmpdir"
4038
fi
4139

40+
echo "=========== Building dependencies ==========="
41+
42+
# This command also compiles the contracts if latest version is used
43+
pnpm turbo build --filter @pythnetwork/pyth-evm-contract
44+
45+
echo "=========== Deploying the contracts ==========="
46+
4247
pnpm --filter=@pythnetwork/contract-manager exec ts-node scripts/deploy_evm_pricefeed_contracts.ts --std-output-dir $stdoutputdir --private-key $PK --chain "$@"
4348

4449
echo "=========== Cleaning up ==========="

0 commit comments

Comments
 (0)