app

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp1

func NewApp1(logger log.Logger, db dbm.DB) *bapp.BaseApp

func NewApp2

func NewApp2(logger log.Logger, db dbm.DB) *bapp.BaseApp

func NewApp3

func NewApp3(logger log.Logger, db dbm.DB) *bapp.BaseApp

func NewApp4

func NewApp4(logger log.Logger, db dbm.DB) *bapp.BaseApp

func NewCodec

func NewCodec() *wire.Codec

func NewInitChainer

func NewInitChainer(cdc *wire.Codec, accountMapper auth.AccountMapper) sdk.InitChainer

InitChainer will set initial balances for accounts as well as initial coin metadata MsgIssue can no longer be used to create new coin

Types

type GenesisAccount

type GenesisAccount struct {
	Address sdk.AccAddress `json:"address"`
	Coins   sdk.Coins      `json:"coins"`
}

GenesisAccount doesn't need pubkey or sequence

func (*GenesisAccount) ToAccount

func (ga *GenesisAccount) ToAccount() (acc *auth.BaseAccount, err error)

Converts GenesisAccount to auth.BaseAccount for storage in account store

type GenesisState

type GenesisState struct {
	Accounts []*GenesisAccount `json:"accounts"`
}

Application state at Genesis has accounts with starting balances

type MsgIssue

type MsgIssue struct {
	Issuer   sdk.AccAddress
	Receiver sdk.AccAddress
	Coin     sdk.Coin
}

MsgIssue to allow a registered issuer to issue new coins.

func (MsgIssue) GetSignBytes

func (msg MsgIssue) GetSignBytes() []byte

Implements Msg. Get canonical sign bytes for MsgIssue

func (MsgIssue) GetSigners

func (msg MsgIssue) GetSigners() []sdk.AccAddress

Implements Msg. Return the signer.

func (MsgIssue) Tags

func (msg MsgIssue) Tags() sdk.Tags

Returns the sdk.Tags for the message

func (MsgIssue) Type

func (msg MsgIssue) Type() string

Implements Msg.

func (MsgIssue) ValidateBasic

func (msg MsgIssue) ValidateBasic() sdk.Error

Implements Msg. Ensures addresses are valid and Coin is positive

type MsgSend

type MsgSend struct {
	From   sdk.AccAddress `json:"from"`
	To     sdk.AccAddress `json:"to"`
	Amount sdk.Coins      `json:"amount"`
}

MsgSend to send coins from Input to Output

func NewMsgSend

func NewMsgSend(from, to sdk.AccAddress, amt sdk.Coins) MsgSend

NewMsgSend

func (MsgSend) GetSignBytes

func (msg MsgSend) GetSignBytes() []byte

Implements Msg. JSON encode the message.

func (MsgSend) GetSigners

func (msg MsgSend) GetSigners() []sdk.AccAddress

Implements Msg. Return the signer.

func (MsgSend) Tags

func (msg MsgSend) Tags() sdk.Tags

Returns the sdk.Tags for the message

func (MsgSend) Type

func (msg MsgSend) Type() string

Implements Msg.

func (MsgSend) ValidateBasic

func (msg MsgSend) ValidateBasic() sdk.Error

Implements Msg. Ensure the addresses are good and the amount is positive.

Jump to

Keyboard shortcuts

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