forked from centrifuge/liquidity-pools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·31 lines (26 loc) · 930 Bytes
/
deploy.sh
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
#!/bin/bash
source .env
if [[ -z "$RPC_URL" ]]; then
error_exit "RPC_URL is not defined"
fi
echo "RPC endpoint = $RPC_URL"
if [[ -z "$ADAPTER" ]]; then
error_exit "ADAPTER is not defined"
fi
echo "Adapter = $ADAPTER"
if [[ -z "$ADMIN" ]]; then
error_exit "ADMIN is not defined"
fi
echo "Admin = $ADMIN"
case "$ADAPTER" in
Permissionless|Axelar|Forwarder)
forge script script/${ADAPTER}.s.sol:${ADAPTER}Script --optimize --rpc-url $RPC_URL --private-key $PRIVATE_KEY --verify --broadcast --chain-id $CHAIN_ID --etherscan-api-key $ETHERSCAN_KEY $1
;;
Passthrough)
forge script test/integration/PassthroughAdapter.s.sol:PassthroughAdapterScript --optimize --rpc-url $RPC_URL --private-key $PRIVATE_KEY --verify --broadcast --chain-id $CHAIN_ID --etherscan-api-key $ETHERSCAN_KEY $1
;;
*)
echo "Adapter should be one of Passthrough, Permissionless, Axelar, Forwarder"
exit 1
;;
esac