types

package
v0.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// AddrLen defines a valid address length
	AddrLen = 20

	// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address
	Bech32PrefixAccAddr = "tcp"
	// Bech32PrefixAccPub defines the Bech32 prefix of an account's public key
	Bech32PrefixAccPub = "tcppub"
	// Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address
	Bech32PrefixValAddr = "tcpvaloper"
	// Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key
	Bech32PrefixValPub = "tcpsvaloperpub"
	// Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address
	Bech32PrefixConsAddr = "tcpvalcons"
	// Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key
	Bech32PrefixConsPub = "tcpvalconspub"
)
View Source
const (
	AppCoin = "nametoken"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Amount

type Amount struct {
	Address []sdk.AccAddress `json:"address"`
	Value   []sdk.Coin       `json:"value"`
}

type Balance

type Balance struct {
	Address []sdk.AccAddress `json:"address"`
	Value   []sdk.Coins      `json:"value"`
}

type ConAccount

type ConAccount struct {
	Account     auth.BaseAccount `json:"account"`
	Code        []byte           `json:"code"`
	CodeHash    []byte           `json:"code_hash"`
	Targets     []sdk.AccAddress `json:"targets"` // only Targets can call contract
	DataSources []sdk.AccAddress `json:"data_sources"`
	Result      []byte           `json:"result"`
}

func NewTCPWithDeploy

func NewTCPWithDeploy(CID sdk.AccAddress, code []byte, codeHash []byte, targets []sdk.AccAddress, dataSources []sdk.AccAddress) ConAccount

func (*ConAccount) Add

func (ca *ConAccount) Add(account sdk.AccAddress, result []byte) bool

func (ConAccount) Contains

func (ca ConAccount) Contains(account string) bool

func (ConAccount) ExecResult

func (ca ConAccount) ExecResult(caller sdk.AccAddress) string

func (*ConAccount) Remove

func (ca *ConAccount) Remove(result []byte)

func (ConAccount) String

func (ca ConAccount) String(result []byte) string

type RequestParam

type RequestParam struct {
	From        sdk.AccAddress `json:"from"`
	CID         sdk.AccAddress `json:"cid"`
	Proxy       sdk.AccAddress `json:"proxy"`
	DataSources []Amount       `json:"dataSource"`
	Fee         sdk.Coins      `json:"fee"`
	Sig         []byte         `json:"signature"`
}

user request for ContractExec

type State

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳