💎⛏ Earn your share of 500,000 SCRT by mining the Secret Ethereum Bridge! CLICK HERE to learn more. 💎⛏

×
heroherohero
secret apps

Announcing 'Holodeck' the Official Secret Network Testnet

In this exciting announcement we cover Holodeck, its components and how developers can get started deploying secret contracts to the testnet. Like the Star Trek-inspired name the Holodeck testnet invites developers to dream, imagine and build the next generation of smart contracts, aka Secret Contracts, and Secret Apps on the Secret Network. The Holodeck testnet consists of these pieces: * A fully-functioning Secret Network [https://github.com/chainofsecrets/SecretNetwork/releases/tag/v1.

Laura Weindorf
24 Nov 2020 • min read

In this exciting announcement we cover Holodeck, its components and how developers can get started deploying secret contracts to the testnet.

Like the Star Trek-inspired name the Holodeck testnet invites developers to dream, imagine and build the next generation of smart contracts, aka Secret Contracts, and Secret Apps on the Secret Network.

The Holodeck testnet consists of these pieces:

  • A fully-functioning Secret Network based on the v1.0.0 mainnet release with a chain-id of  holodeck-2
  • A blockchain explorer where you can view transactions including Secret Contracts interactions
  • A secret faucet to get some SCRT tokens for your Secret Apps
  • Secret API for programmatic access to the network

Puzzle will be adding the holodeck-2 chain in the coming days. Puzzle brings some really awesome visibility to things like transactions, secret contracts, a chain digest and much more. Stay tuned!

Deploy a Secret Contract

So you've created a Secret Contract using your local developer testnet, ran your unit and integration tests and now you're ready to deploy it to Holodeck!

  1. Configure the Secret Network Light Client
  2. Get some SCRT from the faucet
  3. Store the Secret Contract on Holodeck
  4. Instantiate your Secret Contract

Configure Secret Network Light Client

Before deploying your contract make sure it's configured to point to an existing RPC node. You can also use the testnet bootstrap node.

secretcli config node http://bootstrap.secrettestnet.io:26657

secretcli config chain-id holodeck-2

secretcli config trust-node true

Get some SCRT from the faucet

Go to the faucet and enter a secret1... address to get 100 SCRT.

Store the Secret Contract on Holodeck

Next upload the compiled, optimized contract to the testnet.

 secretcli tx compute store contract.wasm.gz --from <your account alias> -y --gas 1000000 --gas-prices=1.0uscrt

The result is a txhash. Query it to see the code_id in the logs, which you'll use to create an instance of the contract.

secretcli q tx <tx_hash>

Instantiate Your Secret Contract

Now that the contract has been stored on the testnet you need to create an "instance". The INIT message is set to a JSON representation of your secret contract's constructor parameters.

INIT="{\"count\": 100000000}"
CODE_ID=8
secretcli tx compute instantiate $CODE_ID "$INIT" --from <your account alias> --label "my counter" -y
Creating an instance of the "counter" sample contract

You can use the testnet explorer Transactions tab to view the contract instantiation: http://explorer.secrettestnet.io/transactions

Now that your secret contract has been deployed to Holodeck you can perform queries and execute state changes using secretcli.

To learn more about building Secret Apps check out this guide:

How To Build Secret Apps: An Evolving Development Guide
This walkthrough includes a tutorial for deploying and instantiating your first Secret Contract, along with a demo application, Secret Voting!

Validators and Full-Node Runners

We also invite validators and full-node runners to join Holodeck! It's a great way to get familiar with running a node and/or becoming a validator. Validators can test changes to their infrastructure or configurations before applying the same to their mainnet node(s).

Testnet Support

Chain of Secrets operates the Holodeck testnet infrastructure for the Secret Network. If you have any questions or need help, come join our Telegram. We also actively monitor the #secret-testnet Discord channel of the Secret Network.

Telegram: https://t.me/chainofsecrets

Discord: https://discord.gg/h7dDxq2

If you’d like to support our mission of driving adoption of Secret Network and bringing more Secret Apps to the world, consider delegating to us!

Chain of Secrets is a Secret Network validator node and a key contributor to the Secret Network ecosystem.

Twitter: https://twitter.com/cosorg

Web: https://chainofsecrets.org

To Infinities and Beyond 🛸🛸🛸

To discuss Secret Network and Secret Apps, visit our community channels:
Website | Forum | Twitter | Discord | Telegram