handlers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryView = "view"
)

Endpoints supported by the Querier.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

NewHandler returns a handler for "multisig" type messages.

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Contract

type Contract struct {
	ID           string
	State        State
	AliceAmount  sdk.Coin
	AliceAddress sdk.AccAddress
	BobAmount    sdk.Coin
	BobAddress   sdk.AccAddress
	Balance      sdk.Coin
}

Contract represents the state of the contract.

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine.

func NewKeeper

func NewKeeper(coinKeeper bank.Keeper, multisigStoreKey sdk.StoreKey, cdc *codec.Codec) Keeper

NewKeeper creates new instances of the multisig Keeper.

func (Keeper) DeleteContract

func (k Keeper) DeleteContract(ctx sdk.Context, id string)

DeleteContract - deletes a contract from the store.

func (Keeper) GetContract

func (k Keeper) GetContract(ctx sdk.Context, id string) Contract

GetContract - gets a contract from the store.

func (Keeper) HasContract

func (k Keeper) HasContract(ctx sdk.Context, id string) bool

HasContract - returns whether or not a contract by that ID exists.

func (Keeper) UpsertContract

func (k Keeper) UpsertContract(ctx sdk.Context, obj Contract)

UpsertContract - inserts/updates contract.

type State

type State int8

State of the contract.

const (
	StateCreated State = 1
	StateLocked  State = 2
)

Contract state enum.

Jump to

Keyboard shortcuts

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