contract

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package contract provides a sample smart contract. it uses util package to interact with the state database it also uses mock package to quickly test the solution by connecting to a remote couchDB instance.

Index

Constants

View Source
const DocPrefix = "SAMPLE"

Prefix for key in stateDB

Variables

This section is empty.

Functions

This section is empty.

Types

type SampleContract

type SampleContract struct {
	contractapi.Contract
}

func (*SampleContract) CreateSampleObject

func (s *SampleContract) CreateSampleObject(ctx contractapi.TransactionContextInterface, key string, val string) error

Create something

type SampleData

type SampleData struct {
	Key1       string `json:"Key1"`
	Attribute1 string `json:"Attribute1"`
}

Data - struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL