Documentation ¶
Index ¶
- Constants
- Variables
- type CheckResult
- type DeliverResult
- type Int
- func (i Int) Abs() Int
- func (i Int) Add(i2 Int) Int
- func (i Int) Div(i2 Int) Int
- func (i Int) Equal(i2 Int) bool
- func (i Int) GT(i2 Int) bool
- func (i Int) GTE(i2 Int) bool
- func (i Int) LT(i2 Int) bool
- func (i Int) LTE(i2 Int) bool
- func (i Int) Mul(i2 Int) Int
- func (i Int) MulRat(r Rat) Int
- func (i Int) Neg() Int
- func (i Int) Sub(i2 Int) Int
- type Rat
- func (r Rat) Add(r2 Rat) Rat
- func (r Rat) Cmp(r2 Rat) int
- func (r Rat) Equal(r2 Rat) bool
- func (r Rat) GT(r2 Rat) bool
- func (r Rat) GTE(r2 Rat) bool
- func (r Rat) IsNil() bool
- func (r Rat) LT(r2 Rat) bool
- func (r Rat) LTE(r2 Rat) bool
- func (r Rat) MarshalJSON() ([]byte, error)
- func (r Rat) Mul(r2 Rat) Rat
- func (r Rat) Quo(r2 Rat) Rat
- func (r Rat) Sub(r2 Rat) Rat
- func (r *Rat) UnmarshalJSON(b []byte) (err error)
- type Result
- type Tx
- type TxInner
- type TxLayer
Constants ¶
View Source
const ( // ModuleNameBase is the module name for internal functionality ModuleNameBase = "base" // ChainKey is the option key for setting the chain id ChainKey = "chain_id" )
Variables ¶
View Source
var ( ZeroInt = NewInt(0) OnInt = NewInt(1) E18Int = NewInt(1e18) )
View Source
var ( ZeroRat = NewRat(0, 1) OneRat = NewRat(1, 1) )
View Source
var TxMapper = data.NewMapper(Tx{})
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type CheckResult struct { Data []byte Log string // GasAllocated is the maximum units of work we allow this tx to perform GasAllocated int64 // GasPayment is the total fees for this tx (or other source of payment) GasPayment int64 }
CheckResult captures any non-error abci result to make sure people use error for error cases
func NewCheck ¶
func NewCheck(gasAllocated int64, log string) CheckResult
NewCheck sets the gas used and the response data but no more info these are the most common info needed to be set by the Handler
func (CheckResult) GetData ¶
func (c CheckResult) GetData() []byte
func (CheckResult) ToABCI ¶
func (c CheckResult) ToABCI() abci.ResponseCheckTx
type DeliverResult ¶
type DeliverResult struct { Data []byte Log string Diff []*abci.Validator GasUsed int64 // unused GasFee *big.Int }
DeliverResult captures any non-error abci result to make sure people use error for error cases
func (DeliverResult) GetData ¶
func (d DeliverResult) GetData() []byte
func (DeliverResult) ToABCI ¶
func (d DeliverResult) ToABCI() abci.ResponseDeliverTx
type Rat ¶
func NewRatFromString ¶
func (*Rat) UnmarshalJSON ¶
Requires a valid JSON string - strings quotes and calls UnmarshalText
type Tx ¶
type Tx struct {
TxInner "json:\"unwrap\""
}
func (Tx) MarshalJSON ¶
func (*Tx) UnmarshalJSON ¶
type TxInner ¶
type TxInner interface { Wrap() Tx // ValidateBasic should be a stateless check and just verify that the // tx is properly formated (required strings not blank, signatures exist, etc.) // this can also be run on the client-side for better debugging before posting a tx ValidateBasic() error }
TxInner is the interface all concrete transactions should implement.
It adds bindings for clean un/marhsaling of the various implementations both as json and binary, as well as some common functionality to move them.
+gen wrapper:"Tx"
Directories ¶
Path | Synopsis |
---|---|
commands
Package commands contains any general setup/helpers valid for all subcommands
|
Package commands contains any general setup/helpers valid for all subcommands |
nolint
|
nolint |
go-wire is our custom codec package for serializing and deserializing data and structures as binary and JSON blobs.
|
go-wire is our custom codec package for serializing and deserializing data and structures as binary and JSON blobs. |
data
Data is designed to provide a standard interface and helper functions to easily allow serialization and deserialization of your data structures in both binary and json representations.
|
Data is designed to provide a standard interface and helper functions to easily allow serialization and deserialization of your data structures in both binary and json representations. |
data/base58
Package base58 provides base58-check encoding.
|
Package base58 provides base58-check encoding. |
nolint
|
nolint |
Click to show internal directories.
Click to hide internal directories.