fixes for tilt ci

This commit is contained in:
justinschuldt 2022-04-01 12:42:29 -05:00 committed by Justin Schuldt
parent 33298ca722
commit 648a5faa54
4 changed files with 11 additions and 8 deletions

View File

@ -222,7 +222,7 @@ if num_guardians >= 2:
name = "guardian-set-update",
resource_deps = guardian_resource_deps + ["guardian"],
deps = ["scripts/send-vaa.sh", "clients/eth"],
cmd = './scripts/update-guardian-set.sh %s %s' % (num_guardians, webHost),
cmd = './scripts/update-guardian-set.sh %s %s %s' % (num_guardians, webHost, namespace),
labels = ["guardian"],
trigger_mode = trigger_mode,
)

View File

@ -106,7 +106,7 @@ echo "REGISTER_BSC_TOKEN_BRIDGE_VAA=$bscTokenBridgeVAA" >> ./scripts/.env
# copy the local .env file to the solana & terra dirs
cp ./scripts/.env ./solana
cp ./scripts/.env ./terra
cp ./scripts/.env ./terra/tools
echo "guardian set init complete!"

View File

@ -4,7 +4,7 @@
set -e
# wait for the guardians to establish networking
sleep 3
sleep 20
newNumGuardians=$1
echo "new number of guardians: ${newNumGuardians}"
@ -12,6 +12,9 @@ echo "new number of guardians: ${newNumGuardians}"
webHost=$2
echo "webHost ${webHost}"
namespace=$3
echo "namespace ${namespace}"
# file & path to save governance VAA
fileName=new-guardianset.prototxt
localPath=./scripts/$fileName
@ -40,7 +43,7 @@ if [ ${currentNumGuardians} == ${newNumGuardians} ]; then
fi
echo "creating guardian set update governance message template prototext"
minikube kubectl -- exec -n wormhole guardian-0 -c guardiand -- /guardiand template guardian-set-update --num=${newNumGuardians} --idx=${currentIndex} > ${localPath}
minikube kubectl -- exec -n ${namespace} guardian-0 -c guardiand -- /guardiand template guardian-set-update --num=${newNumGuardians} --idx=${currentIndex} > ${localPath}
# for i in $(seq ${newNumGuardians})
for i in $(seq ${currentNumGuardians})
@ -50,10 +53,10 @@ do
# create the governance guardian set update prototxt file in the container
echo "created governance file for guardian-${guardianIndex}"
minikube kubectl -- cp ${localPath} wormhole/guardian-${guardianIndex}:${containerPath} -c guardiand
minikube kubectl -- cp ${localPath} ${namespace}/guardian-${guardianIndex}:${containerPath} -c guardiand
# inject the guardian set update
minikube kubectl -- exec -n wormhole guardian-${guardianIndex} -c guardiand -- /guardiand admin governance-vaa-inject --socket $sock $containerPath
minikube kubectl -- exec -n ${namespace} guardian-${guardianIndex} -c guardiand -- /guardiand admin governance-vaa-inject --socket $sock $containerPath
echo "injected governance VAA for guardian-${guardianIndex}"
done

View File

@ -1,4 +1,4 @@
require('dotenv').config({ path: "../.env" });
import 'dotenv/config'
import { LCDClient, MnemonicKey } from "@terra-money/terra.js";
import {
StdFee,
@ -148,7 +148,7 @@ async function instantiate(contract, inst_msg) {
const addresses = {};
const init_guardians = JSON.parse(process.env.INIT_SIGNERS)
if (!!init_guardians || init_guardians.length() == 0) {
if (!init_guardians || init_guardians.length === 0) {
throw "failed to get initial guardians from .env file."
}