Skip to content

Commit

Permalink
chore: Add mock values for public key of Secret Gateway deployed on L…
Browse files Browse the repository at this point in the history
…ocalhost
  • Loading branch information
ltfschoen committed Dec 17, 2024
1 parent d70505f commit 0c91347
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions _SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ git submodule update --init --recursive
* View on Secret Localhost block explorer
* Reference https://docs.scrt.network/secret-network-documentation/development/readme-1/compile-and-deploy
* 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).
* Next, deploy the Nunya Secret contract...
* IGNORE - Terminal Tab 2: Option B (SecretCLI) Compile, Upload, Instantiate:
* [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.
Expand Down
6 changes: 4 additions & 2 deletions packages/secret-contracts-scripts/src/config/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ const config = {
gatewayContractCodeId: "1", // only know after upload
gatewayContractAddress: "secret1mfk7n6mc2cg6lznujmeckdh4x0a5ezf6hx6y8q", // only know after instantiate
gatewayContractCodeHash: "97653655266e70774ab8f0bf2ee2c17ff4a7f47d2e2fd477c69b52476841277b", // only know after upload
gatewayContractPublicKey: "",
gatewayContractEncryptionKeyForChaChaPoly1305: "",
// note: mock value hard-coded
gatewayContractPublicKey: "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
// note: mock value hard-coded
gatewayContractEncryptionKeyForChaChaPoly1305: "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
gatewayContractWasmPath: "secret-gateway-contract.wasm.gz",
}
}
Expand Down

0 comments on commit 0c91347

Please sign in to comment.