Skip to content

Commit

Permalink
chore: update env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocao committed Jul 26, 2024
1 parent f00d1cc commit 4315fe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions script/1-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ else
fi;

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

# Extract the deployed address
EVM_ORACLE_CONTRACT=$(echo "$output" | sed -n 's/Deployed to: \(.*\)/\1/p')
EVM_PROVER_CONTRACT=$(echo "$output" | sed -n 's/Deployed to: \(.*\)/\1/p')

echo "Deployed to $EVM_ORACLE_CONTRACT (EVM_ORACLE_CONTRACT)"
echo "Deployed to $EVM_PROVER_CONTRACT (EVM_PROVER_CONTRACT)"

# Update .env file with the deployed address
update_env_file "EVM_ORACLE_CONTRACT" "$EVM_ORACLE_CONTRACT"
update_env_file "EVM_PROVER_CONTRACT" "$EVM_PROVER_CONTRACT"

exit 0
2 changes: 1 addition & 1 deletion script/2-create-dr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ source "${parent_path}/common.sh"
check_commands forge

# Required variables
check_env_vars EVM_RPC EVM_PRIVATE_KEY EVM_ORACLE_CONTRACT
check_env_vars EVM_RPC EVM_PRIVATE_KEY EVM_PROVER_CONTRACT

forge script script/SedaProver.s.sol:CreateDr --rpc-url $EVM_RPC --broadcast --verify -vvvv --ffi

0 comments on commit 4315fe1

Please sign in to comment.