Skip to content

Commit 0c91347

Browse files
committed
chore: Add mock values for public key of Secret Gateway deployed on Localhost
1 parent d70505f commit 0c91347

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

_SETUP.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ git submodule update --init --recursive
351351
* View on Secret Localhost block explorer
352352
* Reference https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy
353353
354+
* Note: In order to populate the `secret.localhost.secretGateway.gatewayContractPublicKey` and `secret.localhost.secretGateway.gatewayContractEncryptionKeyForChaChaPoly1305`, according to Alex at Secret Network, you can't get a public key for it because it relies on the on-chain randomness (Secret VRF) to get a private key first. As such, you have to make some mock code to make it usable on a local testnet (where secretVRF from env.block.random is not available).
355+
356+
* Next, deploy the Nunya Secret contract...
357+
354358
* IGNORE - Terminal Tab 2: Option B (SecretCLI) Compile, Upload, Instantiate:
355359
* [Compile](https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy#compile-the-code). Note: Outputs contract.wasm or contract.wasm.gz file in the root directory being the ./SecretPath/TNLS-Gateways/secret/ folder. Using `make build-mainnet-reproducible` will remove contract.wasm so only the optimised contract.wasm.gz remains. Warning: If you only run `make build-mainnet` then you will get this error https://github.com/svub/nunya/issues/8 when deploying.
356360

packages/secret-contracts-scripts/src/config/deploy.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ const config = {
8383
gatewayContractCodeId: "1", // only know after upload
8484
gatewayContractAddress: "secret1mfk7n6mc2cg6lznujmeckdh4x0a5ezf6hx6y8q", // only know after instantiate
8585
gatewayContractCodeHash: "97653655266e70774ab8f0bf2ee2c17ff4a7f47d2e2fd477c69b52476841277b", // only know after upload
86-
gatewayContractPublicKey: "",
87-
gatewayContractEncryptionKeyForChaChaPoly1305: "",
86+
// note: mock value hard-coded
87+
gatewayContractPublicKey: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
88+
// note: mock value hard-coded
89+
gatewayContractEncryptionKeyForChaChaPoly1305: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
8890
gatewayContractWasmPath: "secret-gateway-contract.wasm.gz",
8991
}
9092
}

0 commit comments

Comments
 (0)