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

chore: create an array for deployment command #765

Merged
merged 1 commit into from
Dec 22, 2023
Merged
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
34 changes: 17 additions & 17 deletions shell/deploy-multi-chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,30 +172,30 @@ for chain in "${provided_chains[@]}"; do
if [[ $DETERMINISTIC_DEPLOYMENT == true ]]; then
echo -e "\n${IC}Deploying deterministic contracts to $chain...${NC}"
# Construct the command
deployment_command=(forge script script/DeployDeterministicCore3.s.sol)
deployment_command+=(--rpc-url "${rpc_url}")
deployment_command+=(--sig 'run(string,address,address,uint256)')
deployment_command+=("ChainID ${chain_id}, Version 1.1.1")
deployment_command+=(${admin})
deployment_command+=(${comptroller})
deployment_command+=(${MAX_SEGMENT_COUNT})
deployment_command+=(-vvv)
deployment_command=("forge" "script" "script/DeployDeterministicCore3.s.sol")
deployment_command+=("--rpc-url" "$rpc_url")
deployment_command+=("--sig" "run(string,address,address,uint256)")
deployment_command+=("ChainID $chain_id, Version 1.1.1")
deployment_command+=("$admin")
deployment_command+=("$comptroller")
deployment_command+=("$MAX_SEGMENT_COUNT")
deployment_command+=("-vvv")
else
echo -e "\n${IC}Deploying contracts to $chain...${NC}"
# Construct the command
deployment_command=(forge script script/DeployCore3.s.sol)
deployment_command+=(--rpc-url "${rpc_url}")
deployment_command+=(--sig 'run(address,address,uint256)')
deployment_command+=(${admin})
deployment_command+=(${comptroller})
deployment_command+=(${MAX_SEGMENT_COUNT})
deployment_command+=(-vvv)
deployment_command=("forge" "script" "script/DeployCore3.s.sol")
deployment_command+=("--rpc-url" "$rpc_url")
deployment_command+=("--sig" "run(address,address,uint256)")
deployment_command+=("$admin")
deployment_command+=("$comptroller")
deployment_command+=("$MAX_SEGMENT_COUNT")
deployment_command+=("-vvv")
fi

# Append additional options if broadcast is enabled
if [[ $BROADCAST_DEPLOYMENT == true ]]; then
echo -e "${SC}+${NC} Broadcasting on $chain"
deployment_command+=(--broadcast --verify --etherscan-api-key ${api_key})
deployment_command+=("--broadcast" "--verify" "--etherscan-api-key" "$api_key")
else
echo -e "${SC}+${NC} Simulating on $chain"
fi
Expand All @@ -204,7 +204,7 @@ for chain in "${provided_chains[@]}"; do
if [[ $WITH_GAS_PRICE == true ]]; then
gas_price_in_gwei=$(echo "scale=2; $GAS_PRICE / 1000000000" | bc)
echo -e "${SC}+${NC} Using gas price of $gas_price_in_gwei gwei"
deployment_command+=(--with-gas-price ${GAS_PRICE})
deployment_command+=("--with-gas-price" "$GAS_PRICE")
fi

# Run the deployment command
Expand Down