-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed deploy claim issuer. Script not working propertly yet
- Loading branch information
49513 - Diogo Rodrigues
committed
Jul 16, 2024
1 parent
ef02b1f
commit baeed71
Showing
8 changed files
with
116 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# Set the path to the directory where the deploy claim issuer script is located | ||
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
# Set the path to the config file | ||
DEPLOY_CLAIM_ISSUER="$CURRENT_DIR/services/ethereum/scripts/claimIssuer/deploy-claim-issuer.js" | ||
|
||
# Function to check if input is empty | ||
is_empty() { | ||
if [[ -z "$1" ]]; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
# Ask the user for trusted issuer registry address | ||
while true; do | ||
read -p "[W] Enter the address of the trusted issuer registry: " TRUSTED_ISSUER_REGISTRY | ||
if is_empty "$TRUSTED_ISSUER_REGISTRY"; then | ||
echo "Trusted issuer registry cannot be empty. Please try again." | ||
else | ||
break | ||
fi | ||
done | ||
|
||
# Ask for institution wallet private key | ||
while true; do | ||
read -s -p "[$] Institution Wallet Private Key: " INSTITUTION_WALLET_PRIVATE_KEY | ||
echo | ||
if is_empty "$INSTITUTION_WALLET_PRIVATE_KEY"; then | ||
echo "Institution wallet private key cannot be empty. Please try again." | ||
else | ||
break | ||
fi | ||
done | ||
|
||
# Ask for the institution code | ||
while true; do | ||
read -p "[#] Institution Code: " INSTITUTION_CODE | ||
echo | ||
if is_empty "$INSTITUTION_CODE"; then | ||
echo "Code cannot be empty. Please try again." | ||
else | ||
break | ||
fi | ||
done | ||
|
||
# Call the deploy claim issuer script | ||
node -e " | ||
const deployClaimIssuer = require('$DEPLOY_CLAIM_ISSUER').deployClaimIssuer; | ||
deployClaimIssuer('$TRUSTED_ISSUER_REGISTRY', undefined, undefined, '$INSTITUTION_WALLET_PRIVATE_KEY', '$INSTITUTION_CODE'); | ||
" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters