Skip to main content

Contract API

Developer

In this section we will cover how to interact with the contract and design decisions that were made. A full integration guide is work in progress.

Smart Contracts

There are 5 smart contracts involved in The Headstash framework. 2 out of the 5 are designed specifically for Secret Networks custom privacy oriented CosmWasm VM, and the other 3 are designed to allow a protocol to completely take ownership in the deployment and configuration of the headstash contract.

Public Contracts

Cw-ICA-Controller

The Cw-ICA-Controller contract is the CosmWasm implementation of the ICA controller module. There is no modifications to the original implementation.

Cw-ICA-Headstash-Owner

The Cw-ICA-Headstash-Owner is a contract that is able to broadcast msgs for the ICA to broadcast. This has been modified to automate the deployment and setup needed for the headstash contract.

Cw-Blob

The Cw-blob allows the storage and retrieval of the headstash and snip120u wasm binary, in order to upload these contracts to Secret Network via all onchain methods.

Private Contracts

Cw-Headstash

Cw-headstash is the primary contract that is responsible for

  • keeping record of eligible recipients
  • verification of offline signatures when claiming a headstash
  • handling the Bloom workflow

Snip120u

This fork of snip20 adds support for setting allowances on behalf of the owner the tokens are being minted to. This is used by the headstash contract when user claim tokens for enabling the Bloom workflow.