Conversation
There was a problem hiding this comment.
Pull Request Overview
Updates deployment scripts to make parameters required and improves configuration handling by removing hardcoded values and adding proper parameter validation.
- Made script parameters required instead of using default values
- Added relayer address as a required parameter to relevant scripts
- Replaced hardcoded admin address with dynamic retrieval from stellar profile
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/setup_contracts.sh | Added relayer address parameter requirement and validation |
| scripts/generate_contract_libraries.sh | Removed default values for environment and network parameters |
| scripts/deploy_contracts.sh | Replaced hardcoded admin address with dynamic retrieval from stellar profile |
| scripts/bootstrap.sh | Added relayer address parameter and updated script calls accordingly |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| #!/bin/bash | ||
|
|
||
| #### Usage: ./scripts/generate_contract_libraries.sh dev testnet | ||
|
|
There was a problem hiding this comment.
Parameters are now required but there's no validation to check if they are provided. This could lead to scripts running with empty values, causing unexpected behavior. Consider adding validation checks similar to the other scripts.
| # Check for required parameters | |
| if [ -z "$1" ] || [ -z "$2" ]; then | |
| echo "Usage: $0 <environment> <network>" | |
| echo "Example: $0 dev testnet" | |
| exit 1 | |
| fi |
| ./scripts/deploy_contracts.sh $ENVIRONMENT $STELLAR_PROFILE $NETWORK | ||
| ./scripts/setup_contracts.sh $ENVIRONMENT $STELLAR_PROFILE $NETWORK | ||
| ./scripts/setup_contracts.sh $ENVIRONMENT $STELLAR_PROFILE $NETWORK $RELAYER_ADDRESS | ||
| ./scripts/generate_contract_libraries.sh |
There was a problem hiding this comment.
The generate_contract_libraries.sh script call is missing the required ENVIRONMENT and NETWORK parameters that were made mandatory in the script changes.
| ./scripts/generate_contract_libraries.sh | |
| ./scripts/generate_contract_libraries.sh $ENVIRONMENT $NETWORK |
No description provided.