app

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: Apache-2.0 Imports: 15 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() *codec.Codec

func NewInitChainer

func NewInitChainer(cdc *codec.Codec, accountKeeper auth.AccountKeeper) 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

func UpdatedCodec

func UpdatedCodec() *codec.Codec

Update codec from app2 to register imported modules

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) Route

func (msg MsgIssue) Route() string

Implements Msg. nolint

func (MsgIssue) Tags

func (msg MsgIssue) Tags() sdk.Tags

Returns the sdk.Tags for the message

func (MsgIssue) Type

func (msg MsgIssue) Type() string

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) Route

func (msg MsgSend) Route() string

Implements Msg. nolint

func (MsgSend) Tags

func (msg MsgSend) Tags() sdk.Tags

Returns the sdk.Tags for the message

func (MsgSend) Type

func (msg MsgSend) Type() string

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