Skip to content

Commit

Permalink
chore: update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocao committed Jun 20, 2024
1 parent 3da8737 commit 5082567
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
EVM_RPC=
EVM_PRIVATE_KEY=
EVM_ADMIN_ADDRESS=

# Optional
ETHERSCAN_API_KEY=
EVM_VERIFIER_URL=
ETHERSCAN_API_KEY=
6 changes: 3 additions & 3 deletions script/1-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ check_env_vars EVM_RPC EVM_PRIVATE_KEY
if [ -z "$ETHERSCAN_API_KEY" ]; then
VERIFY_FLAGS=""
else
VERIFY_FLAGS="--verify --etherscan-api-key $ETHERSCAN_API_KEY"
VERIFY_FLAGS="--verify --verifier-url $EVM_VERIFIER_URL --etherscan-api-key $ETHERSCAN_API_KEY"
fi;

command="forge create $VERIFY_FLAGS --rpc-url $EVM_RPC --private-key $EVM_PRIVATE_KEY src/SedaOracle.sol:SedaOracle"
command="forge create $VERIFY_FLAGS --rpc-url $EVM_RPC --private-key $EVM_PRIVATE_KEY src/SedaOracle.sol:SedaOracle --constructor-args $EVM_ADMIN_ADDRESS \[$EVM_ADMIN_ADDRESS\]"
echo $command
output=$($command)

Expand All @@ -32,4 +32,4 @@ echo "Deployed to $EVM_ORACLE_CONTRACT (EVM_ORACLE_CONTRACT)"
# Update .env file with the deployed address
update_env_file "EVM_ORACLE_CONTRACT" "$EVM_ORACLE_CONTRACT"

exit 0
exit 0

0 comments on commit 5082567

Please sign in to comment.