Reference Contracts

This page is dedicated to community tutorials and code repositories that provide helpful references for writing Secret Network contracts as well as building full-stack Secret Networks dApps.

Secret University

Learn to build on Secret Network with Secret University and dive deep into the code with Secret University Boxes, which are pre-built, preconfigured dApp templates built on Secret Network. Each Secret Box runs in its own sandbox developer environment and comes preconfigured with a simple UI kit.

Simple Secret Voting App

Use this link to see a sample voting contract and a line-by-line description of everything you need to know.

Secret Sealed Bid Auction

Use this link for a sealed-bid (secret) auction contract that makes use of SNIP-20 and a walkthrough of the contract.
For an even more advanced version of this stunning Secret Sealed Bid Auction app, you can refer to its enhanced Secret Auction Factory put in production.
The VueJS UI code is available here.

SecretJS Templates

Refer to the reference SecretJS Templates provided by SCRT Labs to learn about:
  • Connecting to Secret Network
  • Creating account using SecretJS
  • Query Secret Network
  • Submitting transactions
  • Using contracts
  • Wallets
  • SNIP-20 tokens
  • Consuming websocket contract events

Secret Ethereum Bridge

The source code of the Harmony-based Ethereum bridge frontend is available here.
If you are interested to know how to programmatically use the bridge, you can look at the manual swap section of the Ethereum Bridge doc.

SNIP-20 Contracts

To master the SNIP-20 contract specifications, you can refer to these two key parts:


To master the SNIP-721 contract specifications for Non-Fungible Tokens (NFT), you can refer to these two key parts:

Additional Reference Contracts

Here are some examples of additional Secret Contracts for reference:

Cosmwasm v1.0

Cosmwasm v0.10

Open-Source Projects

Cosmwasm v0.10