Skip to content

Commit

Permalink
rotate in prog
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharyakir committed Mar 12, 2024
1 parent 9983cfe commit c2fdd18
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
12 changes: 3 additions & 9 deletions script/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
#!/bin/bash
set -e

if [ ! -f ".secret" ]; then
echo >&2 "Error: .secret does not exist."
exit 1
fi
source .secret

if [[ $1 == "testnet" ]]; then
values=("prod-testnet-1")
echo "Deploying to tesnet only!"
values=("prod-testnet-1")
echo "Deploying to tesnet only!"
else
values=("prod-testnet-1" "prod-1" "prod-2" "prod-3")
values=("prod-testnet-1" "prod-1" "prod-2" "prod-3")
fi

for heroku_app in "${values[@]}"; do
Expand Down
5 changes: 5 additions & 0 deletions src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export class Controller {
this.keypair = tweetnacl.sign.keyPair.fromSecretKey(
Buffer.from(this.config.privateKey, "base64"),
);

if (process.env.IS_LOCAL === "1") {
console.log("public key", Buffer.from(this.keypair.publicKey).toString("base64"));
}

this.tonReaderClient = tonReaderClient;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ton-reader-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export class TonReaderClientImpl implements TonReaderClient {
);

const verifierRegistryAddress = await sourcesRegistryContract.getVerifierRegistryAddress();
const verifierRegstryContract = tc.open(
const verifierRegistryContract = tc.open(
VerifierRegistry.createFromAddress(verifierRegistryAddress),
);

const res = await verifierRegstryContract.getVerifier(toBigIntBE(sha256(verifierId)));
const res = await verifierRegistryContract.getVerifier(toBigIntBE(sha256(verifierId)));
const verifierConfig = res.settings!.beginParse();

const quorum = verifierConfig.loadUint(8);
Expand Down

0 comments on commit c2fdd18

Please sign in to comment.