Documentation ¶
Index ¶
- Constants
- Variables
- func AppendMsgToErr(msg string, err string) string
- func CodeToDefaultMsg(code CodeType) string
- func CompareStringMaps[T comparable](a, b map[string]T) bool
- func CompareVersionStrings(verStr1, verStr2 string) (int, error)
- func CopyBytes(bz []byte) (ret []byte)
- func DecEq(t *testing.T, exp, got BigDec) (*testing.T, bool, string, string, string)
- func DecsEqual(d1s, d2s []BigDec) bool
- func DefaultPocketConsensusConfig(cconfig *config.ConsensusConfig)
- func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvA kv.Pair, kvB kv.Pair, count int64, equal bool)
- func FormatInvariant(module, name, msg string) string
- func FormatTimeBytes(t time.Time) []byte
- func GetCacheKey(height int, value string) (key string)
- func InclusiveEndBytes(inclusiveBytes []byte) (exclusiveBytes []byte)
- func InitCtxCache(size int)
- func IsBetween(target, minInclusive, maxInclusive int64) bool
- func IsEmpty(o interface{}) bool
- func IsTypedNil(o interface{}) bool
- func MustSortJSON(toSortJSON []byte) []byte
- func NewEvent(ty string, attrs ...Attribute) abci.Event
- func NewKVStoreKeys(names ...string) map[string]*KVStoreKey
- func NewLevelDB(name, dir string, o *opt.Options) (db dbm.DB, err error)
- func NewTransientStoreKeys(names ...string) map[string]*TransientStoreKey
- func ParseTimeBytes(bz []byte) (time.Time, error)
- func PrefixEndBytes(prefix []byte) []byte
- func PrefixIterator(db dbm.DB, prefix []byte, order string) (dbm.Iterator, error)
- func RegisterCodec(cdc *codec.Codec)
- func RegisterDenom(denom string, unit BigDec) error
- func SortJSON(toSortJSON []byte) ([]byte, error)
- func SortableDecBytes(dec BigDec) []byte
- func TimeTrack(start time.Time)
- func TokensToConsensusPower(tokens BigInt) int64
- func Uint64ToBigEndian(i uint64) []byte
- func UintOverflow(i *big.Int) error
- func ValidSortableDec(dec BigDec) bool
- func VerifyAddressFormat(bz []byte) error
- type ABCIMessageLog
- func (*ABCIMessageLog) Descriptor() ([]byte, []int)
- func (m *ABCIMessageLog) GetEvents() StringEvents
- func (m *ABCIMessageLog) GetLog() string
- func (m *ABCIMessageLog) GetMsgIndex() uint32
- func (m *ABCIMessageLog) GetSuccess() bool
- func (m *ABCIMessageLog) Marshal() (dAtA []byte, err error)
- func (m *ABCIMessageLog) MarshalTo(dAtA []byte) (int, error)
- func (m *ABCIMessageLog) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ABCIMessageLog) ProtoMessage()
- func (m *ABCIMessageLog) Reset()
- func (m *ABCIMessageLog) Size() (n int)
- func (this *ABCIMessageLog) String() string
- func (m *ABCIMessageLog) Unmarshal(dAtA []byte) error
- func (m *ABCIMessageLog) XXX_DiscardUnknown()
- func (m *ABCIMessageLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ABCIMessageLog) XXX_Merge(src proto.Message)
- func (m *ABCIMessageLog) XXX_Size() int
- func (m *ABCIMessageLog) XXX_Unmarshal(b []byte) error
- type ABCIMessageLogs
- type Address
- func (a Address) Bytes() []byte
- func (a Address) Empty() bool
- func (a Address) Equals(aa2 Address) bool
- func (a Address) Format(s fmt.State, verb rune)
- func (a Address) Marshal() ([]byte, error)
- func (a Address) MarshalJSON() ([]byte, error)
- func (a Address) MarshalTo(data []byte) (n int, err error)
- func (a Address) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (a Address) MarshalYAML() (interface{}, error)
- func (a Address) ProtoMessage()
- func (a *Address) Reset()
- func (a Address) Size() int
- func (a Address) String() string
- func (a Address) ToProto() ProtoAddress
- func (a *Address) Unmarshal(data []byte) error
- func (a *Address) UnmarshalJSON(data []byte) error
- func (a *Address) UnmarshalYAML(data []byte) error
- type AddressI
- type Addresses
- func (a Addresses) Marshal() ([]byte, error)
- func (a Addresses) MarshalTo(data []byte) (n int, err error)
- func (a Addresses) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (a Addresses) ProtoMessage()
- func (a *Addresses) Reset()
- func (a Addresses) Size() int
- func (a Addresses) String() string
- func (a Addresses) ToProto() ProtoAddresses
- func (a *Addresses) Unmarshal(data []byte) error
- type AnteHandler
- type Attribute
- func (*Attribute) Descriptor() ([]byte, []int)
- func (m *Attribute) GetKey() string
- func (m *Attribute) GetValue() string
- func (m *Attribute) Marshal() (dAtA []byte, err error)
- func (m *Attribute) MarshalTo(dAtA []byte) (int, error)
- func (m *Attribute) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Attribute) ProtoMessage()
- func (m *Attribute) Reset()
- func (m *Attribute) Size() (n int)
- func (a Attribute) String() string
- func (a Attribute) ToKVPair() kv.Pair
- func (m *Attribute) Unmarshal(dAtA []byte) error
- func (m *Attribute) XXX_DiscardUnknown()
- func (m *Attribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Attribute) XXX_Merge(src proto.Message)
- func (m *Attribute) XXX_Size() int
- func (m *Attribute) XXX_Unmarshal(b []byte) error
- type AuthToken
- type BeginBlocker
- type BigDec
- func GetDenomUnit(denom string) (BigDec, bool)
- func MaxDec(d1, d2 BigDec) BigDec
- func MinDec(d1, d2 BigDec) BigDec
- func MustNewDecFromStr(s string) BigDec
- func NewDec(i int64) BigDec
- func NewDecFromBigInt(i *big.Int) BigDec
- func NewDecFromBigIntWithPrec(i *big.Int, prec int64) BigDec
- func NewDecFromInt(i BigInt) BigDec
- func NewDecFromIntWithPrec(i BigInt, prec int64) BigDec
- func NewDecFromStr(str string) (BigDec, error)
- func NewDecWithPrec(i, prec int64) BigDec
- func OneDec() BigDec
- func SmallestDec() BigDec
- func ZeroDec() BigDec
- func (d BigDec) Abs() BigDec
- func (d BigDec) Add(d2 BigDec) BigDec
- func (d BigDec) ApproxRoot(root uint64) (guess BigDec, err error)
- func (d BigDec) ApproxSqrt() (BigDec, error)
- func (d BigDec) BigInt() *big.Int
- func (d BigDec) Ceil() BigDec
- func (d BigDec) Equal(d2 BigDec) bool
- func (d BigDec) Format(s fmt.State, verb rune)
- func (d BigDec) FracPow(power BigDec, denominator int64) BigDec
- func (d BigDec) GT(d2 BigDec) bool
- func (d BigDec) GTE(d2 BigDec) bool
- func (d BigDec) IsInteger() bool
- func (d BigDec) IsNegative() bool
- func (d BigDec) IsNil() bool
- func (d BigDec) IsPositive() bool
- func (d BigDec) IsZero() bool
- func (d BigDec) LT(d2 BigDec) bool
- func (d BigDec) LTE(d2 BigDec) bool
- func (d BigDec) Marshal() ([]byte, error)
- func (d BigDec) MarshalAmino() ([]byte, error)
- func (d BigDec) MarshalJSON() ([]byte, error)
- func (d *BigDec) MarshalTo(data []byte) (n int, err error)
- func (d BigDec) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (d BigDec) MarshalYAML() (interface{}, error)
- func (d BigDec) Mul(d2 BigDec) BigDec
- func (d BigDec) MulInt(i BigInt) BigDec
- func (d BigDec) MulInt64(i int64) BigDec
- func (d BigDec) MulTruncate(d2 BigDec) BigDec
- func (d BigDec) Neg() BigDec
- func (d BigDec) Power(power uint64) BigDec
- func (d BigDec) ProtoMessage()
- func (d BigDec) Quo(d2 BigDec) BigDec
- func (d BigDec) QuoInt(i BigInt) BigDec
- func (d BigDec) QuoInt64(i int64) BigDec
- func (d BigDec) QuoRoundUp(d2 BigDec) BigDec
- func (d BigDec) QuoTruncate(d2 BigDec) BigDec
- func (d *BigDec) Reset()
- func (d BigDec) RoundInt() BigInt
- func (d BigDec) RoundInt64() int64
- func (d BigDec) Sign() int
- func (d *BigDec) Size() int
- func (d BigDec) String() string
- func (d BigDec) Sub(d2 BigDec) BigDec
- func (d BigDec) TruncateDec() BigDec
- func (d BigDec) TruncateInt() BigInt
- func (d BigDec) TruncateInt64() int64
- func (d *BigDec) Unmarshal(data []byte) error
- func (d *BigDec) UnmarshalAmino(bz []byte) error
- func (d *BigDec) UnmarshalJSON(bz []byte) error
- type BigInt
- func MaxInt(i, i2 BigInt) BigInt
- func MinInt(i1, i2 BigInt) BigInt
- func NewInt(n int64) BigInt
- func NewIntFromBigInt(i *big.Int) BigInt
- func NewIntFromString(s string) (res BigInt, ok bool)
- func NewIntFromUint64(n uint64) BigInt
- func NewIntWithDecimal(n int64, dec int) BigInt
- func OneInt() BigInt
- func TokensFromConsensusPower(power int64) BigInt
- func ZeroInt() BigInt
- func (i BigInt) Add(i2 BigInt) (res BigInt)
- func (i BigInt) AddRaw(i2 int64) BigInt
- func (i BigInt) BigInt() *big.Int
- func (i BigInt) Equal(i2 BigInt) bool
- func (i BigInt) GT(i2 BigInt) bool
- func (i BigInt) GTE(i2 BigInt) bool
- func (i BigInt) Int64() int64
- func (i BigInt) IsInt64() bool
- func (i BigInt) IsNegative() bool
- func (i BigInt) IsPositive() bool
- func (i BigInt) IsUint64() bool
- func (i BigInt) IsZero() bool
- func (i BigInt) LT(i2 BigInt) bool
- func (i BigInt) LTE(i2 BigInt) bool
- func (i BigInt) Marshal() ([]byte, error)
- func (i BigInt) MarshalAmino() ([]byte, error)
- func (i BigInt) MarshalJSON() ([]byte, error)
- func (i *BigInt) MarshalTo(data []byte) (n int, err error)
- func (i BigInt) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (i BigInt) MarshalYAML() (interface{}, error)
- func (i BigInt) Mod(i2 BigInt) BigInt
- func (i BigInt) ModRaw(i2 int64) BigInt
- func (i BigInt) Mul(i2 BigInt) (res BigInt)
- func (i BigInt) MulRaw(i2 int64) BigInt
- func (i BigInt) Neg() (res BigInt)
- func (i BigInt) Pow(i2 BigInt) (res BigInt)
- func (i BigInt) ProtoMessage()
- func (i BigInt) Quo(i2 BigInt) (res BigInt)
- func (i BigInt) QuoRaw(i2 int64) BigInt
- func (i *BigInt) Reset()
- func (i BigInt) Sign() int
- func (i *BigInt) Size() int
- func (i BigInt) String() string
- func (i BigInt) Sub(i2 BigInt) (res BigInt)
- func (i BigInt) SubRaw(i2 int64) BigInt
- func (i BigInt) ToDec() BigDec
- func (i BigInt) Uint64() uint64
- func (i *BigInt) Unmarshal(data []byte) error
- func (i *BigInt) UnmarshalAmino(bz []byte) error
- func (i *BigInt) UnmarshalJSON(bz []byte) error
- type Bool
- func (b Bool) Marshal() ([]byte, error)
- func (b Bool) MarshalTo(data []byte) (n int, err error)
- func (b Bool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (b Bool) ProtoMessage()
- func (b *Bool) Reset()
- func (b Bool) Size() int
- func (b Bool) String() string
- func (b Bool) ToProto() ProtoBool
- func (b *Bool) Unmarshal(data []byte) (err error)
- type Cache
- func (c *Cache) Add(key string, value interface{}) (evicted bool)
- func (c *Cache) AddWithCtx(ctx Ctx, key string, value interface{}) (evicted bool)
- func (c *Cache) Cap() int
- func (c *Cache) Contains(key string) bool
- func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool)
- func (c *Cache) Get(key string) (value interface{}, ok bool)
- func (c *Cache) GetOldest() (key string, value interface{}, ok bool)
- func (c *Cache) GetWithCtx(ctx Ctx, key string) (value interface{}, ok bool)
- func (c *Cache) Keys() []interface{}
- func (c *Cache) Len() int
- func (c *Cache) Peek(key string) (value interface{}, ok bool)
- func (c *Cache) PeekOrAdd(key, value interface{}) (previous interface{}, ok, evicted bool)
- func (c *Cache) Purge()
- func (c *Cache) Remove(key string) (present bool)
- func (c *Cache) RemoveOldest() (key string, value interface{}, ok bool)
- func (c *Cache) RemoveWithCtx(ctx Ctx, key string) (present bool)
- func (c *Cache) Resize(size int) (evicted int)
- type CacheKVStore
- type CacheMultiStore
- type CacheWrap
- type CacheWrapper
- type CodeType
- type CodespaceType
- type Coin
- func (coin Coin) Add(coinB Coin) Coin
- func (*Coin) Descriptor() ([]byte, []int)
- func (this *Coin) Equal(that interface{}) bool
- func (m *Coin) GetDenom() string
- func (coin Coin) IsEqual(other Coin) bool
- func (coin Coin) IsGTE(other Coin) bool
- func (coin Coin) IsLT(other Coin) bool
- func (coin Coin) IsNegative() bool
- func (coin Coin) IsPositive() bool
- func (coin Coin) IsValid() bool
- func (coin Coin) IsZero() bool
- func (m *Coin) Marshal() (dAtA []byte, err error)
- func (m *Coin) MarshalTo(dAtA []byte) (int, error)
- func (m *Coin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Coin) ProtoMessage()
- func (m *Coin) Reset()
- func (m *Coin) Size() (n int)
- func (coin Coin) String() string
- func (coin Coin) Sub(coinB Coin) Coin
- func (m *Coin) Unmarshal(dAtA []byte) error
- func (m *Coin) XXX_DiscardUnknown()
- func (m *Coin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Coin) XXX_Merge(src proto.Message)
- func (m *Coin) XXX_Size() int
- func (m *Coin) XXX_Unmarshal(b []byte) error
- type Coins
- func (coins Coins) Add(coinsB Coins) Coins
- func (coins Coins) AmountOf(denom string) BigInt
- func (coins Coins) DenomsSubsetOf(coinsB Coins) bool
- func (coins Coins) Empty() bool
- func (coins Coins) IsAllGT(coinsB Coins) bool
- func (coins Coins) IsAllGTE(coinsB Coins) bool
- func (coins Coins) IsAllLT(coinsB Coins) bool
- func (coins Coins) IsAllLTE(coinsB Coins) bool
- func (coins Coins) IsAllPositive() bool
- func (coins Coins) IsAnyGT(coinsB Coins) bool
- func (coins Coins) IsAnyGTE(coinsB Coins) bool
- func (coins Coins) IsAnyNegative() bool
- func (coins Coins) IsEqual(coinsB Coins) bool
- func (coins Coins) IsValid() bool
- func (coins Coins) IsZero() bool
- func (coins Coins) Len() int
- func (coins Coins) Less(i, j int) bool
- func (coins Coins) MarshalJSON() ([]byte, error)
- func (coins Coins) SafeSub(coinsB Coins) (Coins, bool)
- func (coins Coins) Sort() Coins
- func (coins Coins) String() string
- func (coins Coins) Sub(coinsB Coins) Coins
- func (coins Coins) Swap(i, j int)
- type CommitID
- type CommitKVStore
- type CommitMultiStore
- type CommitStore
- type Committer
- type Config
- type Context
- func (c Context) AppVersion() string
- func (c Context) BlockGasMeter() GasMeter
- func (c Context) BlockHash(cdc *codec.Codec, height int64) ([]byte, error)
- func (c Context) BlockHeader() abci.Header
- func (c Context) BlockHeight() int64
- func (c Context) BlockStore() *store.BlockStore
- func (c Context) BlockTime() time.Time
- func (c Context) CacheContext() (cc Context, writeCache func())
- func (c Context) ChainID() string
- func (c Context) ClearGlobalCache()
- func (c Context) ConsensusParams() *abci.ConsensusParams
- func (c Context) Context() context.Context
- func (c Context) EventManager() *EventManager
- func (c Context) GasMeter() GasMeter
- func (c Context) GetPrevBlockHash(height int64) (hash []byte, err error)
- func (c Context) IsAfterUpgradeHeight() bool
- func (c Context) IsCheckTx() bool
- func (c Context) IsOnUpgradeHeight() bool
- func (c Context) IsPrevCtx() bool
- func (c Context) IsZero() bool
- func (c Context) KVStore(key StoreKey) KVStore
- func (c Context) Logger() log.Logger
- func (c Context) MinGasPrices() DecCoins
- func (c Context) MultiStore() MultiStore
- func (c Context) MustGetPrevCtx(height int64) Context
- func (c Context) PrevCtx(height int64) (Context, error)
- func (c Context) SetPrevCtx(b bool) Context
- func (c Context) TransientStore(key StoreKey) KVStore
- func (c Context) TxBytes() []byte
- func (c Context) Value(key interface{}) interface{}
- func (c Context) VoteInfos() []abci.VoteInfo
- func (c Context) WithAppVersion(version string) Context
- func (c Context) WithBlockGasMeter(meter GasMeter) Context
- func (c Context) WithBlockHeader(header abci.Header) Context
- func (c Context) WithBlockHeight(height int64) Context
- func (c Context) WithBlockStore(bs *store.BlockStore) Context
- func (c Context) WithBlockTime(newTime time.Time) Context
- func (c Context) WithChainID(chainID string) Context
- func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context
- func (c Context) WithContext(ctx context.Context) Context
- func (c Context) WithEventManager(em *EventManager) Context
- func (c Context) WithGasMeter(meter GasMeter) Context
- func (c Context) WithIsCheckTx(isCheckTx bool) Context
- func (c Context) WithLogger(logger log.Logger) Context
- func (c Context) WithMinGasPrices(gasPrices DecCoins) Context
- func (c Context) WithMultiStore(ms MultiStore) Context
- func (c Context) WithProposer(addr Address) Context
- func (c Context) WithTxBytes(txBytes []byte) Context
- func (c Context) WithValue(key, value interface{}) Context
- func (c Context) WithVoteInfos(voteInfo []abci.VoteInfo) Context
- type Ctx
- type CustomProtobufType
- type DecCoin
- func (coin DecCoin) Add(coinB DecCoin) DecCoin
- func (*DecCoin) Descriptor() ([]byte, []int)
- func (this *DecCoin) Equal(that interface{}) bool
- func (m *DecCoin) GetDenom() string
- func (coin DecCoin) IsEqual(other DecCoin) bool
- func (coin DecCoin) IsGTE(other DecCoin) bool
- func (coin DecCoin) IsLT(other DecCoin) bool
- func (coin DecCoin) IsNegative() bool
- func (coin DecCoin) IsPositive() bool
- func (coin DecCoin) IsValid() bool
- func (coin DecCoin) IsZero() bool
- func (m *DecCoin) Marshal() (dAtA []byte, err error)
- func (m *DecCoin) MarshalTo(dAtA []byte) (int, error)
- func (m *DecCoin) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DecCoin) ProtoMessage()
- func (m *DecCoin) Reset()
- func (m *DecCoin) Size() (n int)
- func (coin DecCoin) String() string
- func (coin DecCoin) Sub(coinB DecCoin) DecCoin
- func (coin DecCoin) TruncateDecimal() (Coin, DecCoin)
- func (m *DecCoin) Unmarshal(dAtA []byte) error
- func (m *DecCoin) XXX_DiscardUnknown()
- func (m *DecCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DecCoin) XXX_Merge(src proto.Message)
- func (m *DecCoin) XXX_Size() int
- func (m *DecCoin) XXX_Unmarshal(b []byte) error
- type DecCoins
- func (coins DecCoins) Add(coinsB DecCoins) DecCoins
- func (coins DecCoins) AmountOf(denom string) BigDec
- func (coins DecCoins) Empty() bool
- func (coins DecCoins) Intersect(coinsB DecCoins) DecCoins
- func (coins DecCoins) IsAllPositive() bool
- func (coins DecCoins) IsAnyNegative() bool
- func (coins DecCoins) IsEqual(coinsB DecCoins) bool
- func (coins DecCoins) IsValid() bool
- func (coins DecCoins) IsZero() bool
- func (coins DecCoins) Len() int
- func (coins DecCoins) Less(i, j int) bool
- func (coins DecCoins) MulDec(d BigDec) DecCoins
- func (coins DecCoins) MulDecTruncate(d BigDec) DecCoins
- func (coins DecCoins) QuoDec(d BigDec) DecCoins
- func (coins DecCoins) QuoDecTruncate(d BigDec) DecCoins
- func (coins DecCoins) SafeSub(coinsB DecCoins) (DecCoins, bool)
- func (coins DecCoins) Sort() DecCoins
- func (coins DecCoins) String() string
- func (coins DecCoins) Sub(coinsB DecCoins) DecCoins
- func (coins DecCoins) Swap(i, j int)
- func (coins DecCoins) TruncateDecimal() (truncatedCoins Coins, changeCoins DecCoins)
- type EndBlocker
- type Error
- func ErrBurnStakedTokens(msg string) Error
- func ErrForbidden(msg string) Error
- func ErrForceValidatorUnstake(msg string) Error
- func ErrGasOverflow(msg string) Error
- func ErrInsufficientCoins(msg string) Error
- func ErrInsufficientFee(msg string) Error
- func ErrInsufficientFunds(msg string) Error
- func ErrInternal(msg string) Error
- func ErrInvalidAddress(msg string) Error
- func ErrInvalidCoins(msg string) Error
- func ErrInvalidPubKey(msg string) Error
- func ErrInvalidSequence(msg string) Error
- func ErrInvalidSlash(msg string) Error
- func ErrMemoTooLarge(msg string) Error
- func ErrModuleAccountCreate(msg string) Error
- func ErrNegativeAmount(msg string) Error
- func ErrNoSignatures(msg string) Error
- func ErrOutOfGas(msg string) Error
- func ErrTooManySignatures(msg string) Error
- func ErrTxDecode(msg string) Error
- func ErrUnauthorized(msg string) Error
- func ErrUnknownAddress(msg string) Error
- func ErrUnknownRequest(msg string) Error
- func NewError(codespace CodespaceType, code CodeType, format string, args ...interface{}) Error
- type ErrorGasOverflow
- type ErrorOutOfGas
- type EventManager
- type Events
- type FmtError
- type Gas
- type GasConfig
- type GasInfo
- func (*GasInfo) Descriptor() ([]byte, []int)
- func (m *GasInfo) GetGasUsed() uint64
- func (m *GasInfo) GetGasWanted() uint64
- func (m *GasInfo) Marshal() (dAtA []byte, err error)
- func (m *GasInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *GasInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GasInfo) ProtoMessage()
- func (m *GasInfo) Reset()
- func (m *GasInfo) Size() (n int)
- func (this *GasInfo) String() string
- func (m *GasInfo) Unmarshal(dAtA []byte) error
- func (m *GasInfo) XXX_DiscardUnknown()
- func (m *GasInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GasInfo) XXX_Merge(src proto.Message)
- func (m *GasInfo) XXX_Size() int
- func (m *GasInfo) XXX_Unmarshal(b []byte) error
- type GasMeter
- type Handler
- type InitChainer
- type Int64
- func (i Int64) Marshal() ([]byte, error)
- func (i Int64) MarshalTo(data []byte) (n int, err error)
- func (i Int64) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (i Int64) ProtoMessage()
- func (i *Int64) Reset()
- func (i Int64) Size() int
- func (i Int64) String() string
- func (i Int64) ToProto() ProtoInt64
- func (i *Int64) Unmarshal(data []byte) (err error)
- type Invariant
- type InvariantRegistry
- type Invariants
- type Iterator
- type KVPair
- type KVStore
- type KVStoreKey
- type KeyTable
- type KvPairs
- type Msg
- type MsgData
- func (*MsgData) Descriptor() ([]byte, []int)
- func (m *MsgData) GetData() []byte
- func (m *MsgData) GetMsgType() string
- func (m *MsgData) Marshal() (dAtA []byte, err error)
- func (m *MsgData) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgData) ProtoMessage()
- func (m *MsgData) Reset()
- func (m *MsgData) Size() (n int)
- func (this *MsgData) String() string
- func (m *MsgData) Unmarshal(dAtA []byte) error
- func (m *MsgData) XXX_DiscardUnknown()
- func (m *MsgData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgData) XXX_Merge(src proto.Message)
- func (m *MsgData) XXX_Size() int
- func (m *MsgData) XXX_Unmarshal(b []byte) error
- type MultiStore
- type ParamSet
- type ParamSetPair
- type ParamSetPairs
- type PeerFilter
- type PocketConfig
- type ProtoAddress
- func (*ProtoAddress) Descriptor() ([]byte, []int)
- func (pa ProtoAddress) FromProto() Address
- func (m *ProtoAddress) GetAddress() Address
- func (m *ProtoAddress) Marshal() (dAtA []byte, err error)
- func (m *ProtoAddress) MarshalTo(dAtA []byte) (int, error)
- func (m *ProtoAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProtoAddress) ProtoMessage()
- func (m *ProtoAddress) Reset()
- func (m *ProtoAddress) Size() (n int)
- func (m *ProtoAddress) String() string
- func (m *ProtoAddress) Unmarshal(dAtA []byte) error
- func (m *ProtoAddress) XXX_DiscardUnknown()
- func (m *ProtoAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProtoAddress) XXX_Merge(src proto.Message)
- func (m *ProtoAddress) XXX_Size() int
- func (m *ProtoAddress) XXX_Unmarshal(b []byte) error
- type ProtoAddresses
- func (*ProtoAddresses) Descriptor() ([]byte, []int)
- func (pa ProtoAddresses) FromProto() Addresses
- func (m *ProtoAddresses) GetArr() Addresses
- func (m *ProtoAddresses) Marshal() (dAtA []byte, err error)
- func (m *ProtoAddresses) MarshalTo(dAtA []byte) (int, error)
- func (m *ProtoAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProtoAddresses) ProtoMessage()
- func (m *ProtoAddresses) Reset()
- func (m *ProtoAddresses) Size() (n int)
- func (m *ProtoAddresses) String() string
- func (m *ProtoAddresses) Unmarshal(dAtA []byte) error
- func (m *ProtoAddresses) XXX_DiscardUnknown()
- func (m *ProtoAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProtoAddresses) XXX_Merge(src proto.Message)
- func (m *ProtoAddresses) XXX_Size() int
- func (m *ProtoAddresses) XXX_Unmarshal(b []byte) error
- type ProtoBool
- func (*ProtoBool) Descriptor() ([]byte, []int)
- func (pb ProtoBool) FromProto() Bool
- func (m *ProtoBool) GetB() bool
- func (m *ProtoBool) Marshal() (dAtA []byte, err error)
- func (m *ProtoBool) MarshalTo(dAtA []byte) (int, error)
- func (m *ProtoBool) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProtoBool) ProtoMessage()
- func (m *ProtoBool) Reset()
- func (m *ProtoBool) Size() (n int)
- func (m *ProtoBool) String() string
- func (m *ProtoBool) Unmarshal(dAtA []byte) error
- func (m *ProtoBool) XXX_DiscardUnknown()
- func (m *ProtoBool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProtoBool) XXX_Merge(src proto.Message)
- func (m *ProtoBool) XXX_Size() int
- func (m *ProtoBool) XXX_Unmarshal(b []byte) error
- type ProtoInt64
- func (*ProtoInt64) Descriptor() ([]byte, []int)
- func (pi ProtoInt64) FromProto() Int64
- func (m *ProtoInt64) GetI() int64
- func (m *ProtoInt64) Marshal() (dAtA []byte, err error)
- func (m *ProtoInt64) MarshalTo(dAtA []byte) (int, error)
- func (m *ProtoInt64) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ProtoInt64) ProtoMessage()
- func (m *ProtoInt64) Reset()
- func (m *ProtoInt64) Size() (n int)
- func (m *ProtoInt64) String() string
- func (m *ProtoInt64) Unmarshal(dAtA []byte) error
- func (m *ProtoInt64) XXX_DiscardUnknown()
- func (m *ProtoInt64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ProtoInt64) XXX_Merge(src proto.Message)
- func (m *ProtoInt64) XXX_Size() int
- func (m *ProtoInt64) XXX_Unmarshal(b []byte) error
- type ProtoMsg
- type PruningOptions
- type Querier
- type QueryRouter
- type Queryable
- type Raw
- type ReadOnlySubspace
- func (ros ReadOnlySubspace) Get(ctx Ctx, key []byte, ptr interface{})
- func (ros ReadOnlySubspace) GetRaw(ctx Ctx, key []byte) ([]byte, error)
- func (ros ReadOnlySubspace) Has(ctx Ctx, key []byte) (bool, error)
- func (ros ReadOnlySubspace) Modified(ctx Ctx, key []byte) (bool, error)
- func (ros ReadOnlySubspace) Name() string
- type Request
- type Result
- func (*Result) Descriptor() ([]byte, []int)
- func (res Result) IsOK() bool
- func (m *Result) Marshal() (dAtA []byte, err error)
- func (m *Result) MarshalTo(dAtA []byte) (int, error)
- func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Result) ProtoMessage()
- func (m *Result) Reset()
- func (m *Result) Size() (n int)
- func (this *Result) String() string
- func (m *Result) Unmarshal(dAtA []byte) error
- func (m *Result) XXX_DiscardUnknown()
- func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Result) XXX_Merge(src proto.Message)
- func (m *Result) XXX_Size() int
- func (m *Result) XXX_Unmarshal(b []byte) error
- type Router
- type SDKConfig
- func (config *SDKConfig) GetAddressVerifier() func([]byte) error
- func (config *SDKConfig) GetTxEncoder() TxEncoder
- func (config *SDKConfig) Seal() *SDKConfig
- func (config *SDKConfig) SetAddressVerifier(addressVerifier func([]byte) error)
- func (config *SDKConfig) SetCoinType(coinType uint32)
- func (config *SDKConfig) SetTxEncoder(encoder TxEncoder)
- type SimulationResponse
- func (*SimulationResponse) Descriptor() ([]byte, []int)
- func (m *SimulationResponse) GetResult() *Result
- func (m *SimulationResponse) Marshal() (dAtA []byte, err error)
- func (m *SimulationResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *SimulationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SimulationResponse) ProtoMessage()
- func (m *SimulationResponse) Reset()
- func (m *SimulationResponse) Size() (n int)
- func (this *SimulationResponse) String() string
- func (m *SimulationResponse) Unmarshal(dAtA []byte) error
- func (m *SimulationResponse) XXX_DiscardUnknown()
- func (m *SimulationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SimulationResponse) XXX_Merge(src proto.Message)
- func (m *SimulationResponse) XXX_Size() int
- func (m *SimulationResponse) XXX_Unmarshal(b []byte) error
- type StakeStatus
- type Store
- type StoreKey
- type StoreType
- type StringEvent
- func (*StringEvent) Descriptor() ([]byte, []int)
- func (m *StringEvent) GetAttributes() []Attribute
- func (m *StringEvent) GetType() string
- func (m *StringEvent) Marshal() (dAtA []byte, err error)
- func (m *StringEvent) MarshalTo(dAtA []byte) (int, error)
- func (m *StringEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StringEvent) ProtoMessage()
- func (m *StringEvent) Reset()
- func (m *StringEvent) Size() (n int)
- func (this *StringEvent) String() string
- func (m *StringEvent) Unmarshal(dAtA []byte) error
- func (m *StringEvent) XXX_DiscardUnknown()
- func (m *StringEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StringEvent) XXX_Merge(src proto.Message)
- func (m *StringEvent) XXX_Size() int
- func (m *StringEvent) XXX_Unmarshal(b []byte) error
- type StringEvents
- type Subspace
- func (s Subspace) Get(ctx Ctx, key []byte, ptr interface{})
- func (s Subspace) GetAllParamKeys(ctx Ctx) (keys []string)
- func (s Subspace) GetIfExists(ctx Ctx, key []byte, ptr interface{})
- func (s Subspace) GetIfExistsRaw(ctx Ctx, key []byte) []byte
- func (s Subspace) GetParamSet(ctx Ctx, ps ParamSet)
- func (s Subspace) GetRaw(ctx Ctx, key []byte) ([]byte, error)
- func (s Subspace) GetWithSubkey(ctx Ctx, key, subkey []byte, ptr interface{})
- func (s Subspace) GetWithSubkeyIfExists(ctx Ctx, key, subkey []byte, ptr interface{})
- func (s Subspace) Has(ctx Ctx, key []byte) (bool, error)
- func (s Subspace) Modified(ctx Ctx, key []byte) (bool, error)
- func (s Subspace) Name() string
- func (s Subspace) Set(ctx Ctx, key []byte, param interface{})
- func (s *Subspace) SetCodec(cdc *codec.Codec)
- func (s Subspace) SetParamSet(ctx Ctx, ps ParamSet)
- func (s Subspace) SetWithSubkey(ctx Ctx, key []byte, subkey []byte, param interface{})
- func (s Subspace) Update(ctx Ctx, key []byte, param []byte) error
- func (s Subspace) UpdateWithSubkey(ctx Ctx, key []byte, subkey []byte, param []byte) error
- func (s Subspace) WithKeyTable(table KeyTable) Subspace
- type TraceContext
- type TransactionIndexer
- func (t *TransactionIndexer) AddBatch(b *txindex.Batch) error
- func (t *TransactionIndexer) DeleteFromHeight(ctx context.Context, height int64) error
- func (t *TransactionIndexer) Get(hash []byte) (*types.TxResult, error)
- func (t *TransactionIndexer) Index(result *types.TxResult) error
- func (t *TransactionIndexer) Search(ctx context.Context, q *query.Query) (res []*types.TxResult, total int, err error)
- type TransientStoreKey
- type Tx
- type TxDecoder
- type TxEncoder
- type TxMsgData
- func (*TxMsgData) Descriptor() ([]byte, []int)
- func (m *TxMsgData) GetData() []*MsgData
- func (m *TxMsgData) Marshal() (dAtA []byte, err error)
- func (m *TxMsgData) MarshalTo(dAtA []byte) (int, error)
- func (m *TxMsgData) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxMsgData) ProtoMessage()
- func (m *TxMsgData) Reset()
- func (m *TxMsgData) Size() (n int)
- func (this *TxMsgData) String() string
- func (m *TxMsgData) Unmarshal(dAtA []byte) error
- func (m *TxMsgData) XXX_DiscardUnknown()
- func (m *TxMsgData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxMsgData) XXX_Merge(src proto.Message)
- func (m *TxMsgData) XXX_Size() int
- func (m *TxMsgData) XXX_Unmarshal(b []byte) error
- type TxResponse
- func (*TxResponse) Descriptor() ([]byte, []int)
- func (r TxResponse) Empty() bool
- func (m *TxResponse) Marshal() (dAtA []byte, err error)
- func (m *TxResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TxResponse) ProtoMessage()
- func (m *TxResponse) Reset()
- func (m *TxResponse) Size() (n int)
- func (r TxResponse) String() string
- func (m *TxResponse) Unmarshal(dAtA []byte) error
- func (m *TxResponse) XXX_DiscardUnknown()
- func (m *TxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TxResponse) XXX_Merge(src proto.Message)
- func (m *TxResponse) XXX_Size() int
- func (m *TxResponse) XXX_Unmarshal(b []byte) error
- type Uint
- func (u Uint) Add(u2 Uint) Uint
- func (u Uint) AddUint64(u2 uint64) Uint
- func (u Uint) BigInt() *big.Int
- func (u Uint) Decr() Uint
- func (u Uint) Equal(u2 Uint) bool
- func (u Uint) GT(u2 Uint) bool
- func (u Uint) GTE(u2 Uint) bool
- func (u Uint) Incr() Uint
- func (u Uint) IsZero() bool
- func (u Uint) LT(u2 Uint) bool
- func (u Uint) LTE(u2 Uint) bool
- func (u Uint) Marshal() ([]byte, error)
- func (u Uint) MarshalAmino() ([]byte, error)
- func (u Uint) MarshalJSON() ([]byte, error)
- func (u *Uint) MarshalTo(data []byte) (n int, err error)
- func (u Uint) Mod(u2 Uint) Uint
- func (u Uint) Mul(u2 Uint) (res Uint)
- func (u Uint) MulUint64(u2 uint64) (res Uint)
- func (u Uint) Quo(u2 Uint) (res Uint)
- func (u Uint) QuoUint64(u2 uint64) Uint
- func (u *Uint) Size() int
- func (u Uint) String() string
- func (u Uint) Sub(u2 Uint) Uint
- func (u Uint) SubUint64(u2 uint64) Uint
- func (u Uint) Uint64() uint64
- func (u *Uint) Unmarshal(data []byte) error
- func (u *Uint) UnmarshalAmino(bz []byte) error
- func (u *Uint) UnmarshalJSON(bz []byte) error
Constants ¶
const ( DefaultDDName = ".pocket" DefaultKeybaseName = "pocket-keybase" DefaultPVKName = "priv_val_key.json" DefaultPVSName = "priv_val_state.json" DefaultPVKNameLean = "priv_val_key_lean.json" DefaultPVSNameLean = "priv_val_state_lean.json" DefaultNKNameLean = "node_key_lean.json" DefaultNKName = "node_key.json" DefaultChainsName = "chains.json" DefaultGenesisName = "genesis.json" DefaultRPCPort = "8081" DefaultEvidenceDBName = "pocket_evidence" DefaultTMURI = "tcp://localhost:26657" DefaultMaxSessionCacheEntries = 500 DefaultMaxEvidenceCacheEntries = 500 DefaultListenAddr = "tcp://0.0.0.0:" DefaultClientBlockSyncAllowance = 10 DefaultSessionSyncAllowance = 0 // This config represents a session unit (irrespective of num blocks per session) DefaultJSONSortRelayResponses = true DefaultTxIndexer = "kv" DefaultRPCDisableTransactionEvents = true DefaultTxIndexTags = "tx.hash,tx.height,message.sender,transfer.recipient" ConfigDirName = "config" ConfigFileName = "config.json" ApplicationDBName = "application" TransactionIndexerDBName = "txindexer" PlaceholderHash = "0001" PlaceholderURL = "http://127.0.0.1:8081" PlaceholderServiceURL = PlaceholderURL DefaultRemoteCLIURL = "http://localhost:8081" DefaultUserAgent = "" DefaultValidatorCacheSize = 40000 DefaultApplicationCacheSize = DefaultValidatorCacheSize / 4 DefaultPocketPrometheusListenAddr = "8083" DefaultPrometheusMaxOpenFile = 3 DefaultRPCTimeout = 30000 DefaultMaxClaimProofRetryAge = 32 DefaultProofPrevalidation = false DefaultCtxCacheSize = 20 DefaultABCILogging = false DefaultRelayErrors = true AuthFileName = "auth.json" DefaultIavlCacheSize = 5000000 DefaultChainHotReload = false DefaultGenerateTokenOnStart = true DefaultLeanPocket = false DefaultLeanPocketUserKeyFileName = "lean_nodes_keys.json" )
const ( Precision = 18 // bytes required to represent the above precision // Ceiling[Log2[999 999 999 999 999 999]] DecimalPrecisionBits = 60 )
number of decimal places
const ( // Base error codes CodeOK CodeType = 0 CodeInternal CodeType = 1 CodeTxDecode CodeType = 2 CodeInvalidSequence CodeType = 3 CodeInsufficientFunds CodeType = 5 CodeUnknownRequest CodeType = 6 CodeInvalidAddress CodeType = 7 CodeInvalidPubKey CodeType = 8 CodeUnknownAddress CodeType = 9 CodeInsufficientCoins CodeType = 10 CodeInvalidCoins CodeType = 11 CodeOutOfGas CodeType = 12 CodeMemoTooLarge CodeType = 13 CodeInsufficientFee CodeType = 14 CodeTooManySignatures CodeType = 15 CodeGasOverflow CodeType = 16 CodeNoSignatures CodeType = 17 CodeNegativeAmont CodeType = 18 CodeBurnStakedTokens CodeType = 19 CodeForceValidatorUnstake CodeType = 20 CodeInvalidSlash CodeType = 21 CodeModuleAccountCreate CodeType = 22 CodeForbidden CodeType = 23 // CodespaceRoot is a codespace for error codes in this file only. // Notice that 0 is an "unset" codespace, which can be overridden with // Error.WithDefaultCodespace(). CodespaceUndefined CodespaceType = "" CodespaceRoot CodespaceType = "sdk" )
SDK error codes
const ( // Transaction(tx) Block height index key. // // Note: Block height is cast as int when querying using the tx height index due to the lexicographic encoder library, // this is safe because v0 block height should never exceed 2^63-1 on 64-bit systems or 2^31-1 on 32-bit systems. TxHeightKey = "tx.height" TxSignerKey = "tx.signer" TxRecipientKey = "tx.recipient" TxHashKey = "tx.hash" SortAscending = "asc" SortDescending = "desc" AuthCodespace = "auth" AnteHandlerMaxError = 10 )
const ( // default stake denomination DefaultStakeDenom = "upokt" // Delay, in blocks, between when validator updates are returned to the // consensus-engine and when they are applied. For example, if // ValidatorUpdateDelay is set to X, and if a validator set update is // returned with new validators at the end of block 10, then the new // validators are expected to sign blocks beginning at block 11+X. // // This value is constant as this should not change without a hard fork. // For Tendermint this should be set to 1 block, for more details see: // https://tendermint.com/docs/spec/abci/apps.html#endblock ValidatorUpdateDelay int64 = 1 )
staking constants
const ( Unstaked StakeStatus = 0x00 Unstaking StakeStatus = 0x01 Staked StakeStatus = 0x02 StakeStatusUnstaked = "Unstaked" StakeStatusUnstaking = "Unstaking" StakeStatusStaked = "Staked" )
staking constants
const ( StoreTypeMulti = types.StoreTypeMulti StoreTypeDB = types.StoreTypeDB StoreTypeIAVL = types.StoreTypeIAVL StoreTypeTransient = types.StoreTypeTransient )
nolint - reexport
const (
AddrLen = 20
)
const SortableTimeFormat = "2006-01-02T15:04:05.000000000"
Slight modification of the RFC3339Nano but it right pads all zeros and drops the time zone info
Variables ¶
var ( ErrInvalidLengthAbci = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAbci = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAbci = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthAddress = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAddress = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAddress = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthCoin = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCoin = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupCoin = fmt.Errorf("proto: unexpected end of group") )
var ( ErrEmptyDecimalStr = errors.New("decimal string cannot be empty") ErrInvalidDecimalLength = errors.New("invalid decimal length") ErrInvalidDecimalStr = errors.New("invalid decimal string") )
Decimal errors
var ( EventTypeMessage = "message" AttributeKeyAction = "action" AttributeKeyModule = "module" AttributeKeySender = "sender" AttributeKeyAmount = "amount" )
Common event types and attribute keys
var ( ParamsKey = NewKVStoreKey(paramsKey) ParamsTKey = NewTransientStoreKey(paramsTKey) )
var ( // This is set at compile time. Could be cleveldb, defaults is goleveldb. DBBackend = "" VbCCache *Cache ShowTimeTrackData = false )
var ( ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupWrappers = fmt.Errorf("proto: unexpected end of group") )
var MaxSortableDec = OneDec().Quo(SmallestDec())
MaxSortableDec is the largest BigDec that can be passed into SortableDecBytes() Its negative form is the least BigDec that can be passed in.
var PowerReduction = NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(6), nil))
PowerReduction is the amount of staking tokens required for 1 unit of consensus-engine power
Functions ¶
func AppendMsgToErr ¶
appends a message to the head of the given error
func CodeToDefaultMsg ¶
NOTE: Don't stringer this, we'll put better messages in later.
func CompareStringMaps ¶
func CompareStringMaps[T comparable](a, b map[string]T) bool
True if two maps are equivalent. Nil is considered to be the same as an empty map.
func CompareVersionStrings ¶
Compares two version strings, which are expected to be dot-delimited integers like "1.2.3.4". The result is similar to strcmp in C, negative if the first version string is considered to be earlier, positive if the second version string is considered to be earlier, and zero if both version strings are the same. If any of the given version strings is not dot-delimited, the function returns an error. For more details, see Test_CompareVersionStrings in utils_test.go.
func DefaultPocketConsensusConfig ¶
func DefaultPocketConsensusConfig(cconfig *config.ConsensusConfig)
Default Consensus Configs
func DiffKVStores ¶
func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvA kv.Pair, kvB kv.Pair, count int64, equal bool)
Compare two KVstores, return either the first key/value pair at which they differ and whether or not they are equal, skipping value comparison for a set of provided prefixes
func FormatInvariant ¶
FormatInvariant returns a standardized invariant message.
func FormatTimeBytes ¶
Formats a time.Time into a []byte that can be sorted
func GetCacheKey ¶
func InclusiveEndBytes ¶
InclusiveEndBytes returns the []byte that would end a range query such that the input would be included
func InitCtxCache ¶
func InitCtxCache(size int)
func IsTypedNil ¶
func IsTypedNil(o interface{}) bool
func MustSortJSON ¶
MustSortJSON is like SortJSON but panic if an error occurs, e.g., if the passed JSON isn't valid.
func NewEvent ¶
NewEvent creates a new Event object with a given type and slice of one or more attributes.
func NewKVStoreKeys ¶
func NewKVStoreKeys(names ...string) map[string]*KVStoreKey
NewKVStoreKeys returns a map of new pointers to KVStoreKey's. Uses pointers so keys don't collide.
func NewLevelDB ¶
NewLevelDB instantiate a new LevelDB instance according to DBBackend.
func NewTransientStoreKeys ¶
func NewTransientStoreKeys(names ...string) map[string]*TransientStoreKey
NewTransientStoreKeys constructs a new map of TransientStoreKey's Must return pointers according to the ocap principle
func ParseTimeBytes ¶
Parses a []byte encoded using FormatTimeKey back into a time.Time
func PrefixEndBytes ¶
PrefixEndBytes returns the []byte that would end a range query for all []byte with a certain prefix Deals with last byte of prefix being FF without overflowing
func PrefixIterator ¶
contract: caller must close iterator
func RegisterCodec ¶
// Register the sdk message type
func RegisterCodec(cdc *codec.Codec) { amino.RegisterInterface((*ProtoMsg)(nil), nil) amino.RegisterInterface((*Tx)(nil), nil) proto.Register("types/msg", (*ProtoMsg)(nil)) proto.Register("types/tx", (*Tx)(nil)) }
func RegisterDenom ¶
RegisterDenom registers a denomination with a corresponding unit. If the denomination is already registered, an error will be returned.
func SortJSON ¶
SortedJSON takes any JSON and returns it sorted by keys. Also, all white-spaces are removed. This method can be used to canonicalize JSON to be returned by GetSignBytes, e.g. for the ledger integration. If the passed JSON isn't valid it will return an error.
func SortableDecBytes ¶
SortableDecBytes returns a byte slice representation of a BigDec that can be sorted. Left and right pads with 0s so there are 18 digits to left and right of the decimal point. For this reason, there is a maximum and minimum value for this, enforced by ValidSortableDec.
func TokensToConsensusPower ¶
TokensToConsensusPower - convert input tokens to potential consensus-engine power
func Uint64ToBigEndian ¶
Uint64ToBigEndian - marshals uint64 to a bigendian byte slice so it can be sorted
func UintOverflow ¶
UintOverflow returns true if a given unsigned integer overflows and false otherwise.
func ValidSortableDec ¶
ValidSortableDec ensures that a BigDec is within the sortable bounds, a BigDec can't have a precision of less than 10^-18. Max sortable decimal was set to the reciprocal of SmallestDec.
func VerifyAddressFormat ¶
Types ¶
type ABCIMessageLog ¶
type ABCIMessageLog struct { MsgIndex uint32 `protobuf:"varint,1,opt,name=msg_index,json=msgIndex,proto3" json:"msg_index,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` // Events contains a slice of Event objects that were emitted during some // execution. Events StringEvents `protobuf:"bytes,4,rep,name=events,proto3,castrepeated=StringEvents" json:"events"` }
ABCIMessageLog defines a structure containing an indexed tx ABCI message log.
func NewABCIMessageLog ¶
func NewABCIMessageLog(i uint32, success bool, log string, events Events) ABCIMessageLog
func (*ABCIMessageLog) Descriptor ¶
func (*ABCIMessageLog) Descriptor() ([]byte, []int)
func (*ABCIMessageLog) GetEvents ¶
func (m *ABCIMessageLog) GetEvents() StringEvents
func (*ABCIMessageLog) GetLog ¶
func (m *ABCIMessageLog) GetLog() string
func (*ABCIMessageLog) GetMsgIndex ¶
func (m *ABCIMessageLog) GetMsgIndex() uint32
func (*ABCIMessageLog) GetSuccess ¶
func (m *ABCIMessageLog) GetSuccess() bool
func (*ABCIMessageLog) Marshal ¶
func (m *ABCIMessageLog) Marshal() (dAtA []byte, err error)
func (*ABCIMessageLog) MarshalToSizedBuffer ¶
func (m *ABCIMessageLog) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ABCIMessageLog) ProtoMessage ¶
func (*ABCIMessageLog) ProtoMessage()
func (*ABCIMessageLog) Reset ¶
func (m *ABCIMessageLog) Reset()
func (*ABCIMessageLog) Size ¶
func (m *ABCIMessageLog) Size() (n int)
func (*ABCIMessageLog) String ¶
func (this *ABCIMessageLog) String() string
func (*ABCIMessageLog) Unmarshal ¶
func (m *ABCIMessageLog) Unmarshal(dAtA []byte) error
func (*ABCIMessageLog) XXX_DiscardUnknown ¶
func (m *ABCIMessageLog) XXX_DiscardUnknown()
func (*ABCIMessageLog) XXX_Marshal ¶
func (m *ABCIMessageLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ABCIMessageLog) XXX_Merge ¶
func (m *ABCIMessageLog) XXX_Merge(src proto.Message)
func (*ABCIMessageLog) XXX_Size ¶
func (m *ABCIMessageLog) XXX_Size() int
func (*ABCIMessageLog) XXX_Unmarshal ¶
func (m *ABCIMessageLog) XXX_Unmarshal(b []byte) error
type ABCIMessageLogs ¶
type ABCIMessageLogs []ABCIMessageLog
ABCIMessageLogs represents a slice of ABCIMessageLog.
func ParseABCILogs ¶
func ParseABCILogs(logs string) (res ABCIMessageLogs, err error)
ParseABCILogs attempts to parse a stringified ABCI tx log into a slice of ABCIMessageLog types. It returns an error upon JSON decoding failure.
func (ABCIMessageLogs) String ¶
func (logs ABCIMessageLogs) String() (str string)
String implements the fmt.Stringer interface for the ABCIMessageLogs type.
type Address ¶
Address a wrapper around bytes meant to represent an address. When marshaled to a string or JSON.
func AddressFromHex ¶
AddressFromHex creates an Address from a hex string.
func (Address) MarshalJSON ¶
MarshalJSON marshals to JSON.
func (Address) MarshalToSizedBuffer ¶
func (Address) MarshalYAML ¶
MarshalYAML marshals to YAML.
func (Address) ProtoMessage ¶
func (a Address) ProtoMessage()
func (Address) ToProto ¶
func (a Address) ToProto() ProtoAddress
func (*Address) UnmarshalJSON ¶
UnmarshalJSON unmarshals from JSON.
func (*Address) UnmarshalYAML ¶
UnmarshalYAML unmarshals from JSON
type AddressI ¶
type AddressI interface { Equals(Address) bool Empty() bool Marshal() ([]byte, error) MarshalJSON() ([]byte, error) Bytes() []byte String() string Format(s fmt.State, verb rune) }
Address is a common interface for different types of Addresses used by the SDK
type Addresses ¶
type Addresses []Address
Address a wrapper around bytes meant to represent an address. When marshaled to a string or JSON.
func (Addresses) MarshalToSizedBuffer ¶
func (Addresses) ProtoMessage ¶
func (a Addresses) ProtoMessage()
func (Addresses) ToProto ¶
func (a Addresses) ToProto() ProtoAddresses
type AnteHandler ¶
type AnteHandler func(ctx Ctx, tx Tx, txBz []byte, txIndexer txindex.TxIndexer, simulate bool) (newCtx Ctx, result Result, signer crypto.PublicKey, abort bool)
AnteHandler authenticates transactions, before their internal messages are handled. If newCtx.IsZero(), ctx is used instead.
type Attribute ¶
type Attribute struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes.
func NewAttribute ¶
NewAttribute returns a new key/value Attribute object.
func (*Attribute) Descriptor ¶
func (*Attribute) MarshalToSizedBuffer ¶
func (*Attribute) ProtoMessage ¶
func (*Attribute) ProtoMessage()
func (*Attribute) XXX_DiscardUnknown ¶
func (m *Attribute) XXX_DiscardUnknown()
func (*Attribute) XXX_Marshal ¶
func (*Attribute) XXX_Unmarshal ¶
type BeginBlocker ¶
type BeginBlocker func(ctx Ctx, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker runs code before the transactions in a block
Note: applications which set create_empty_blocks=false will not have regular block timing and should use e.g. BFT timestamps rather than block height for any periodic BeginBlock logic
type BigDec ¶
type BigDec struct {
// contains filtered or unexported fields
}
NOTE: never use new(BigDec) or else we will panic unmarshalling into the nil embedded big.BigInt
func GetDenomUnit ¶
GetDenomUnit returns a unit for a given denomination if it exists. A boolean is returned if the denomination is registered.
func MustNewDecFromStr ¶
Decimal from string, panic on error
func NewDecFromBigInt ¶
create a new BigDec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromBigIntWithPrec ¶
create a new BigDec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromInt ¶
create a new BigDec from big integer assuming whole numbers CONTRACT: prec <= Precision
func NewDecFromIntWithPrec ¶
create a new BigDec from big integer with decimal place at prec CONTRACT: prec <= Precision
func NewDecFromStr ¶
create a decimal from an input decimal string. valid must come in the form:
(-) whole integers (.) decimal integers
examples of acceptable input include:
-123.456 456.7890 345 -456789
NOTE - An error will return if more decimal places are provided in the string than the constant Precision.
CONTRACT - This function does not mutate the input str.
func NewDecWithPrec ¶
create a new BigDec from integer with decimal place at prec CONTRACT: prec <= Precision
func SmallestDec ¶
func SmallestDec() BigDec
func (BigDec) ApproxRoot ¶
ApproxRoot returns an approximate estimation of a BigDec's positive real nth root using Newton's method (where n is positive). The algorithm starts with some guess and computes the sequence of improved guesses until an answer converges to an approximate answer. It returns `|d|.ApproxRoot() * -1` if input is negative.
func (BigDec) ApproxSqrt ¶
ApproxSqrt is a wrapper around ApproxRoot for the common special case of finding the square root of a number. It returns -(sqrt(abs(d)) if input is negative.
func (BigDec) Ceil ¶
Ceil returns the smallest interger value (as a decimal) that is greater than or equal to the given decimal.
func (BigDec) IsNegative ¶
func (BigDec) IsNil ¶
______________________________________________________________________________________________ nolint
func (BigDec) IsPositive ¶
func (BigDec) MarshalAmino ¶
Override Amino binary serialization by proxying to protobuf.
func (BigDec) MarshalJSON ¶
MarshalJSON marshals the decimal
func (BigDec) MarshalYAML ¶
MarshalYAML returns the YAML representation.
func (BigDec) ProtoMessage ¶
func (d BigDec) ProtoMessage()
func (BigDec) RoundInt64 ¶
RoundInt64 rounds the decimal using bankers rounding
func (BigDec) TruncateDec ¶
TruncateDec truncates the decimals from the number and returns a BigDec
func (BigDec) TruncateInt ¶
TruncateInt truncates the decimals from the number and returns an BigInt
func (BigDec) TruncateInt64 ¶
TruncateInt64 truncates the decimals from the number and returns an int64
func (*BigDec) UnmarshalAmino ¶
func (*BigDec) UnmarshalJSON ¶
UnmarshalJSON defines custom decoding scheme
type BigInt ¶
type BigInt struct {
// contains filtered or unexported fields
}
BigInt wraps integer with 256 bit range bound Checks overflow, underflow and division by zero Exists in range from -(2^maxBitLen-1) to 2^maxBitLen-1
func NewIntFromBigInt ¶
NewIntFromBigInt constructs BigInt from big.BigInt
func NewIntFromString ¶
NewIntFromString constructs BigInt from string
func NewIntFromUint64 ¶
NewIntFromUint64 constructs an BigInt from a uint64.
func NewIntWithDecimal ¶
NewIntWithDecimal constructs BigInt with decimal Result value is n*10^dec
func TokensFromConsensusPower ¶
TokensFromConsensusPower - convert input power to tokens
func (BigInt) GTE ¶
GTE returns true if receiver BigInt is greater than or equal to the parameter BigInt.
func (BigInt) IsNegative ¶
IsNegative returns true if BigInt is negative
func (BigInt) IsPositive ¶
IsPositive returns true if BigInt is positive
func (BigInt) MarshalAmino ¶
Override Amino binary serialization by proxying to protobuf.
func (BigInt) MarshalJSON ¶
MarshalJSON defines custom encoding scheme
func (BigInt) MarshalToSizedBuffer ¶
autogenerated
func (BigInt) MarshalYAML ¶
MarshalYAML returns the YAML representation.
func (BigInt) ProtoMessage ¶
func (i BigInt) ProtoMessage()
func (*BigInt) UnmarshalAmino ¶
func (*BigInt) UnmarshalJSON ¶
UnmarshalJSON defines custom decoding scheme
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a thread-safe fixed cap LRU cache.
var GlobalCtxCache *Cache
var _ Ctx = Context
func (*Cache) AddWithCtx ¶
Add adds a value to the cache. Returns true if an eviction occurred.
func (*Cache) Contains ¶
Contains checks if a key is in the cache, without updating the recent-ness or deleting it for being stale.
func (*Cache) ContainsOrAdd ¶
ContainsOrAdd checks if a key is in the cache without updating the recent-ness or deleting it for being stale, and if not, adds the value. Returns whether found and whether an eviction occurred.
func (*Cache) GetWithCtx ¶
Add adds a value to the cache. Returns true if an eviction occurred.
func (*Cache) Keys ¶
func (c *Cache) Keys() []interface{}
Keys returns a slice of the keys in the cache, from oldest to newest.
func (*Cache) Peek ¶
Peek returns the key value (or undefined if not found) without updating the "recently used"-ness of the key.
func (*Cache) PeekOrAdd ¶
PeekOrAdd checks if a key is in the cache without updating the recent-ness or deleting it for being stale, and if not, adds the value. Returns whether found and whether an eviction occurred.
func (*Cache) RemoveOldest ¶
RemoveOldest removes the oldest item from the cache.
func (*Cache) RemoveWithCtx ¶
Remove removes the provided key from the cache.
type Coin ¶
type Coin struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Amount BigInt `protobuf:"bytes,2,opt,name=amount,proto3,customtype=BigInt" json:"amount"` }
Coin defines a token with a denomination and an amount.
NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto.
func ConvertCoin ¶
ConvertCoin attempts to convert a coin to a given denomination. If the given denomination is invalid or if neither denomination is registered, an error is returned.
func NewCoin ¶
NewCoin returns a new coin with a denomination and amount. It will panic if the amount is negative.
func NewInt64Coin ¶
NewInt64Coin returns a new coin with a denomination and amount. It will panic if the amount is negative.
func ParseCoin ¶
ParseCoin parses a cli input for one coin type, returning errors if invalid. This returns an error on an empty string as well.
func (Coin) Add ¶
Adds amounts of two coins with same denom. If the coins differ in denom then it panics.
func (*Coin) Descriptor ¶
func (Coin) IsGTE ¶
IsGTE returns true if they are the same type and the receiver is an equal or greater value
func (Coin) IsNegative ¶
IsNegative returns true if the coin amount is negative and false otherwise.
TODO: Remove once unsigned integers are used.
func (Coin) IsPositive ¶
IsPositive returns true if coin amount is positive.
TODO: Remove once unsigned integers are used.
func (Coin) IsValid ¶
IsValid returns true if the Coin has a non-negative amount and the denom is vaild.
func (*Coin) ProtoMessage ¶
func (*Coin) ProtoMessage()
func (Coin) Sub ¶
Subtracts amounts of two coins with same denom. If the coins differ in denom then it panics.
func (*Coin) XXX_DiscardUnknown ¶
func (m *Coin) XXX_DiscardUnknown()
func (*Coin) XXX_Unmarshal ¶
type Coins ¶
type Coins []Coin
Coins is a set of Coin, one per currency
func ParseCoins ¶
ParseCoins will parse out a list of coins separated by commas. If nothing is provided, it returns nil Coins. Returned coins are sorted.
func (Coins) Add ¶
Add adds two sets of coins.
e.g. {2A} + {A, 2B} = {3A, 2B} {2A} + {0B} = {2A}
NOTE: Add operates under the invariant that coins are sorted by denominations.
CONTRACT: Add will never return Coins where one Coin has a non-positive amount. In otherwords, IsValid will always return true.
func (Coins) DenomsSubsetOf ¶
DenomsSubsetOf returns true if receiver's denom set is subset of coinsB's denoms.
func (Coins) IsAllGT ¶
IsAllGT returns true if for every denom in coinsB, the denom is present at a greater amount in coins.
func (Coins) IsAllGTE ¶
IsAllGTE returns false if for any denom in coinsB, the denom is present at a smaller amount in coins; else returns true.
func (Coins) IsAllLT ¶
IsAllLT returns True iff for every denom in coins, the denom is present at a smaller amount in coinsB.
func (Coins) IsAllLTE ¶
IsAllLTE returns true iff for every denom in coins, the denom is present at a smaller or equal amount in coinsB.
func (Coins) IsAllPositive ¶
IsAllPositive returns true if there is at least one coin and all currencies have a positive value.
func (Coins) IsAnyGT ¶
IsAnyGT returns true iff for any denom in coins, the denom is present at a greater amount in coinsB.
e.g. {2A, 3B}.IsAnyGT{A} = true {2A, 3B}.IsAnyGT{5C} = false {}.IsAnyGT{5C} = false {2A, 3B}.IsAnyGT{} = false
func (Coins) IsAnyGTE ¶
IsAnyGTE returns true iff coins contains at least one denom that is present at a greater or equal amount in coinsB; it returns false otherwise.
NOTE: IsAnyGTE operates under the invariant that both coin sets are sorted by denominations and there exists no zero coins.
func (Coins) IsAnyNegative ¶
IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the coin set is empty too.
TODO: Remove once unsigned integers are used.
func (Coins) IsValid ¶
IsValid asserts the Coins are sorted, have positive amount, and Denom does not contain upper case characters.
func (Coins) MarshalJSON ¶
MarshalJSON implements a custom JSON marshaller for the Coins type to allow nil Coins to be encoded as an empty array.
func (Coins) SafeSub ¶
SafeSub performs the same arithmetic as Sub but returns a boolean if any negative coin amount was returned.
type Config ¶
type Config struct { TendermintConfig config.Config `json:"tendermint_config"` PocketConfig PocketConfig `json:"pocket_config"` }
func DefaultConfig ¶
func DefaultTestingPocketConfig ¶
func DefaultTestingPocketConfig() Config
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
create a new context
func (Context) AppVersion ¶
func (Context) BlockGasMeter ¶
func (Context) BlockHeader ¶
clone the header before returning
func (Context) BlockHeight ¶
func (Context) BlockStore ¶
func (c Context) BlockStore() *store.BlockStore
func (Context) CacheContext ¶
CacheContext returns a new Context with the multi-store cached and a new EventManager. The cached context is written to the context when writeCache is called.
func (Context) ClearGlobalCache ¶
func (c Context) ClearGlobalCache()
func (Context) ConsensusParams ¶
func (c Context) ConsensusParams() *abci.ConsensusParams
func (Context) EventManager ¶
func (c Context) EventManager() *EventManager
func (Context) GetPrevBlockHash ¶
func (Context) IsAfterUpgradeHeight ¶
func (Context) IsOnUpgradeHeight ¶
func (Context) MinGasPrices ¶
func (Context) MultiStore ¶
func (c Context) MultiStore() MultiStore
func (Context) MustGetPrevCtx ¶
func (Context) SetPrevCtx ¶
func (Context) TransientStore ¶
TransientStore fetches a TransientStore from the MultiStore.
func (Context) Value ¶
func (c Context) Value(key interface{}) interface{}
Value is deprecated, provided for backwards compatibility Please use
ctx.Context().Value(key)
instead of
ctx.Value(key)
func (Context) WithAppVersion ¶
func (Context) WithBlockGasMeter ¶
func (Context) WithBlockHeight ¶
func (Context) WithBlockStore ¶
func (c Context) WithBlockStore(bs *store.BlockStore) Context
func (Context) WithChainID ¶
func (Context) WithConsensusParams ¶
func (c Context) WithConsensusParams(params *abci.ConsensusParams) Context
func (Context) WithEventManager ¶
func (c Context) WithEventManager(em *EventManager) Context
func (Context) WithGasMeter ¶
func (Context) WithIsCheckTx ¶
func (Context) WithMinGasPrices ¶
func (Context) WithMultiStore ¶
func (c Context) WithMultiStore(ms MultiStore) Context
func (Context) WithProposer ¶
func (Context) WithTxBytes ¶
type Ctx ¶
type Ctx interface { Context() context.Context MultiStore() MultiStore BlockHeight() int64 BlockTime() time.Time ChainID() string TxBytes() []byte Logger() log.Logger VoteInfos() []abci.VoteInfo GasMeter() GasMeter BlockGasMeter() GasMeter IsCheckTx() bool MinGasPrices() DecCoins EventManager() *EventManager BlockHeader() abci.Header ConsensusParams() *abci.ConsensusParams MustGetPrevCtx(height int64) Context PrevCtx(height int64) (Context, error) WithBlockStore(bs *store.BlockStore) Context BlockStore() *store.BlockStore GetPrevBlockHash(height int64) (hash []byte, err error) WithContext(ctx context.Context) Context WithMultiStore(ms MultiStore) Context WithBlockHeader(header abci.Header) Context WithBlockTime(newTime time.Time) Context WithProposer(addr Address) Context WithBlockHeight(height int64) Context WithChainID(chainID string) Context WithTxBytes(txBytes []byte) Context WithLogger(logger log.Logger) Context WithVoteInfos(voteInfo []abci.VoteInfo) Context WithGasMeter(meter GasMeter) Context WithBlockGasMeter(meter GasMeter) Context WithIsCheckTx(isCheckTx bool) Context WithMinGasPrices(gasPrices DecCoins) Context WithConsensusParams(params *abci.ConsensusParams) Context WithEventManager(em *EventManager) Context WithValue(key, value interface{}) Context Value(key interface{}) interface{} KVStore(key StoreKey) KVStore TransientStore(key StoreKey) KVStore CacheContext() (cc Context, writeCache func()) IsZero() bool AppVersion() string ClearGlobalCache() IsPrevCtx() bool IsAfterUpgradeHeight() bool IsOnUpgradeHeight() bool BlockHash(cdc *codec.Codec, height int64) ([]byte, error) }
type CustomProtobufType ¶
type CustomProtobufType interface { Marshal() ([]byte, error) MarshalTo(data []byte) (n int, err error) Unmarshal(data []byte) error Size() int MarshalJSON() ([]byte, error) UnmarshalJSON(data []byte) error }
CustomProtobufType defines the interface custom gogo proto types must implement in order to be used as a "customtype" extension.
ref: https://github.com/gogo/protobuf/blob/master/custom_types.md
type DecCoin ¶
type DecCoin struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Amount BigDec `protobuf:"bytes,2,opt,name=amount,proto3,customtype=BigDec" json:"amount"` }
DecCoin defines a token with a denomination and a decimal amount.
NOTE: The amount field is an Dec which implements the custom method signatures required by gogoproto.
func NewDecCoin ¶
NewDecCoin creates a new DecCoin instance from an BigInt.
func NewDecCoinFromCoin ¶
NewDecCoinFromCoin creates a new DecCoin from a Coin.
func NewDecCoinFromDec ¶
NewDecCoinFromDec creates a new DecCoin instance from a BigDec.
func NewInt64DecCoin ¶
NewInt64DecCoin returns a new DecCoin with a denomination and amount. It will panic if the amount is negative or denom is invalid.
func ParseDecCoin ¶
ParseDecCoin parses a decimal coin from a string, returning an error if invalid. An empty string is considered invalid.
func (*DecCoin) Descriptor ¶
func (DecCoin) IsGTE ¶
IsGTE returns true if they are the same type and the receiver is an equal or greater value.
func (DecCoin) IsLT ¶
IsLT returns true if they are the same type and the receiver is a smaller value.
func (DecCoin) IsNegative ¶
IsNegative returns true if the coin amount is negative and false otherwise.
TODO: Remove once unsigned integers are used.
func (DecCoin) IsPositive ¶
IsPositive returns true if coin amount is positive.
TODO: Remove once unsigned integers are used.
func (DecCoin) IsValid ¶
IsValid returns true if the DecCoin has a non-negative amount and the denom is valid.
func (*DecCoin) MarshalToSizedBuffer ¶
func (*DecCoin) ProtoMessage ¶
func (*DecCoin) ProtoMessage()
func (DecCoin) String ¶
String implements the Stringer interface for DecCoin. It returns a human-readable representation of a decimal coin.
func (DecCoin) TruncateDecimal ¶
TruncateDecimal returns a Coin with a truncated decimal and a DecCoin for the change. Note, the change may be zero.
func (*DecCoin) XXX_DiscardUnknown ¶
func (m *DecCoin) XXX_DiscardUnknown()
func (*DecCoin) XXX_Marshal ¶
func (*DecCoin) XXX_Unmarshal ¶
type DecCoins ¶
type DecCoins []DecCoin
DecCoins defines a slice of coins with decimal values
func NewDecCoins ¶
NewDecCoins constructs a new coin set with decimal values from regular Coins.
func ParseDecCoins ¶
ParseDecCoins will parse out a list of decimal coins separated by commas. If nothing is provided, it returns nil DecCoins. Returned decimal coins are sorted.
func (DecCoins) Add ¶
Add adds two sets of DecCoins.
NOTE: Add operates under the invariant that coins are sorted by denominations.
CONTRACT: Add will never return Coins where one Coin has a non-positive amount. In otherwords, IsValid will always return true.
func (DecCoins) Intersect ¶
Intersect will return a new set of coins which contains the minimum DecCoin for common denoms found in both `coins` and `coinsB`. For denoms not common to both `coins` and `coinsB` the minimum is considered to be 0, thus they are not added to the final set.In other words, trim any denom amount from coin which exceeds that of coinB, such that (coin.Intersect(coinB)).IsLTE(coinB).
func (DecCoins) IsAllPositive ¶
IsAllPositive returns true if there is at least one coin and all currencies have a positive value.
TODO: Remove once unsigned integers are used.
func (DecCoins) IsAnyNegative ¶
IsAnyNegative returns true if there is at least one coin whose amount is negative; returns false otherwise. It returns false if the DecCoins set is empty too.
TODO: Remove once unsigned integers are used.
func (DecCoins) IsValid ¶
IsValid asserts the DecCoins are sorted, have positive amount, and Denom does not contain upper case characters.
func (DecCoins) MulDec ¶
MulDec multiplies all the coins by a decimal.
CONTRACT: No zero coins will be returned.
func (DecCoins) MulDecTruncate ¶
MulDecTruncate multiplies all the decimal coins by a decimal, truncating. It panics if d is zero.
CONTRACT: No zero coins will be returned.
func (DecCoins) QuoDec ¶
QuoDec divides all the decimal coins by a decimal. It panics if d is zero.
CONTRACT: No zero coins will be returned.
func (DecCoins) QuoDecTruncate ¶
QuoDecTruncate divides all the decimal coins by a decimal, truncating. It panics if d is zero.
CONTRACT: No zero coins will be returned.
func (DecCoins) SafeSub ¶
SafeSub performs the same arithmetic as Sub but returns a boolean if any negative coin amount was returned.
func (DecCoins) String ¶
String implements the Stringer interface for DecCoins. It returns a human-readable representation of decimal coins.
func (DecCoins) TruncateDecimal ¶
TruncateDecimal returns the coins with truncated decimals and returns the change. Note, it will not return any zero-amount coins in either the truncated or change coins.
type EndBlocker ¶
type EndBlocker func(ctx Ctx, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker runs code after the transactions in a block and return updates to the validator set
Note: applications which set create_empty_blocks=false will not have regular block timing and should use e.g. BFT timestamps rather than block height for any periodic EndBlock logic
type Error ¶
type Error interface { Error() string Stacktrace() error Trace(offset int, format string, args ...interface{}) error Data() interface{} // convenience TraceSDK(format string, args ...interface{}) Error // set codespace WithDefaultCodespace(CodespaceType) Error Code() CodeType Codespace() CodespaceType ABCILog() string Result() Result QueryResult() abci.ResponseQuery }
---------------------------------------- sdk Error type
func ErrBurnStakedTokens ¶
func ErrForbidden ¶
func ErrGasOverflow ¶
func ErrInsufficientCoins ¶
func ErrInsufficientFee ¶
func ErrInsufficientFunds ¶
func ErrInvalidAddress ¶
func ErrInvalidCoins ¶
func ErrInvalidPubKey ¶
func ErrInvalidSequence ¶
func ErrInvalidSlash ¶
func ErrMemoTooLarge ¶
func ErrModuleAccountCreate ¶
func ErrNegativeAmount ¶
func ErrNoSignatures ¶
func ErrOutOfGas ¶
func ErrTooManySignatures ¶
func ErrTxDecode ¶
func ErrUnauthorized ¶
func ErrUnknownAddress ¶
func ErrUnknownRequest ¶
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
EventManager implements a simple wrapper around a slice of Event objects that can be emitted from.
func NewEventManager ¶
func NewEventManager() *EventManager
func (EventManager) ABCIEvents ¶
func (em EventManager) ABCIEvents() []abci.Event
ABCIEvents returns all stored Event objects as abci.Event objects.
func (*EventManager) EmitEvent ¶
func (em *EventManager) EmitEvent(event abci.Event)
EmitEvent stores a single Event object.
func (*EventManager) EmitEvents ¶
func (em *EventManager) EmitEvents(events Events)
EmitEvents stores a series of Event objects.
func (*EventManager) Events ¶
func (em *EventManager) Events() Events
type Events ¶
Events defines a slice of Event objects
func (Events) AppendEvent ¶
AppendEvent adds an Event to a slice of events.
func (Events) AppendEvents ¶
AppendEvents adds a slice of Event objects to an exist slice of Event objects.
func (Events) ToABCIEvents ¶
ToABCIEvents converts a slice of Event objects to a slice of abci.Event objects.
type GasInfo ¶
type GasInfo struct { // GasWanted is the maximum units of work we allow this tx to perform. GasWanted uint64 `protobuf:"varint,1,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty" yaml:"gas_wanted"` // GasUsed is the amount of gas actually consumed. GasUsed uint64 `protobuf:"varint,2,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty" yaml:"gas_used"` }
GasInfo defines tx execution gas context.
func (*GasInfo) Descriptor ¶
func (*GasInfo) GetGasUsed ¶
func (*GasInfo) GetGasWanted ¶
func (*GasInfo) MarshalToSizedBuffer ¶
func (*GasInfo) ProtoMessage ¶
func (*GasInfo) ProtoMessage()
func (*GasInfo) XXX_DiscardUnknown ¶
func (m *GasInfo) XXX_DiscardUnknown()
func (*GasInfo) XXX_Marshal ¶
func (*GasInfo) XXX_Unmarshal ¶
type InitChainer ¶
type InitChainer func(ctx Ctx, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer initializes application state at genesis
type Int64 ¶
type Int64 int64
func (Int64) ProtoMessage ¶
func (i Int64) ProtoMessage()
func (Int64) ToProto ¶
func (i Int64) ToProto() ProtoInt64
type Invariant ¶
An Invariant is a function which tests a particular invariant. The invariant returns a descriptive message about what happened and a boolean indicating whether the invariant has been broken. The simulator will then halt and print the logs.
type InvariantRegistry ¶
expected interface for registering invariants
type Iterator ¶
nolint - reexport
func KVStorePrefixIterator ¶
Iterator over all the keys with a certain prefix in ascending order
type KVStoreKey ¶
type KVStoreKey = types.KVStoreKey
nolint - reexport
func NewKVStoreKey ¶
func NewKVStoreKey(name string) *KVStoreKey
NewKVStoreKey returns a new pointer to a KVStoreKey. Use a pointer so keys don't collide.
type KeyTable ¶
type KeyTable struct {
// contains filtered or unexported fields
}
KeyTable subspaces appropriate type for each parameter key
func (KeyTable) RegisterParamSet ¶
Register multiple pairs from ParamSet
func (KeyTable) RegisterType ¶
Register single key-type pair
type Msg ¶
type Msg interface { // Return the message type. // Must be alphanumeric or empty. Route() string // Returns a human-readable string for the message, intended for utilization // within tags Type() string // ValidateBasic does a simple validation check that // doesn't require access to any other information. ValidateBasic() Error // Get the canonical byte representation of the ProtoMsg. GetSignBytes() []byte // Signers returns the addrs of signers that must sign. // CONTRACT: All signatures must be present to be valid. // CONTRACT: Returns addrs in some deterministic order. GetSigners() []Address // Returns the recipient of the tx, if no recipient returns nil GetRecipient() Address // Returns an BigInt for the ProtoMsg GetFee() BigInt }
type MsgData ¶
type MsgData struct { MsgType string `protobuf:"bytes,1,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
MsgData defines the data returned in a Result object during message execution.
func (*MsgData) Descriptor ¶
func (*MsgData) GetMsgType ¶
func (*MsgData) MarshalToSizedBuffer ¶
func (*MsgData) ProtoMessage ¶
func (*MsgData) ProtoMessage()
func (*MsgData) XXX_DiscardUnknown ¶
func (m *MsgData) XXX_DiscardUnknown()
func (*MsgData) XXX_Marshal ¶
func (*MsgData) XXX_Unmarshal ¶
type ParamSet ¶
type ParamSet interface {
ParamSetPairs() ParamSetPairs
}
Interface for structs containing parameters for a module
type ParamSetPair ¶
type ParamSetPair struct { Key []byte `json:"key"` Value interface{} `json:"value"` }
Used for associating paramsubspace key and field of param structs
type PeerFilter ¶
type PeerFilter func(info string) abci.ResponseQuery
PeerFilter responds to p2p filtering queries from Tendermint
type PocketConfig ¶
type PocketConfig struct { DataDir string `json:"data_dir"` GenesisName string `json:"genesis_file"` ChainsName string `json:"chains_name"` EvidenceDBName string `json:"evidence_db_name"` TendermintURI string `json:"tendermint_uri"` KeybaseName string `json:"keybase_name"` RPCPort string `json:"rpc_port"` ClientBlockSyncAllowance int `json:"client_block_sync_allowance"` ClientSessionSyncAllowance int64 `json:"client_session_sync_allowance"` MaxEvidenceCacheEntires int `json:"max_evidence_cache_entries"` MaxSessionCacheEntries int `json:"max_session_cache_entries"` JSONSortRelayResponses bool `json:"json_sort_relay_responses"` RemoteCLIURL string `json:"remote_cli_url"` UserAgent string `json:"user_agent"` ValidatorCacheSize int64 `json:"validator_cache_size"` ApplicationCacheSize int64 `json:"application_cache_size"` RPCTimeout int64 `json:"rpc_timeout"` PrometheusAddr string `json:"pocket_prometheus_port"` PrometheusMaxOpenfiles int `json:"prometheus_max_open_files"` MaxClaimAgeForProofRetry int `json:"max_claim_age_for_proof_retry"` ProofPrevalidation bool `json:"proof_prevalidation"` CtxCacheSize int `json:"ctx_cache_size"` ABCILogging bool `json:"abci_logging"` RelayErrors bool `json:"show_relay_errors"` DisableTxEvents bool `json:"disable_tx_events"` Cache bool `json:"-"` IavlCacheSize int64 `json:"iavl_cache_size"` ChainsHotReload bool `json:"chains_hot_reload"` GenerateTokenOnStart bool `json:"generate_token_on_start"` LeanPocket bool `json:"lean_pocket"` LeanPocketUserKeyFileName string `json:"lean_pocket_user_key_file"` PreventNegativeRewardClaim bool `json:"prevent_negative_reward_claim"` }
func (PocketConfig) GetLeanPocketUserKeyFilePath ¶
func (c PocketConfig) GetLeanPocketUserKeyFilePath() string
type ProtoAddress ¶
type ProtoAddress struct {
Address Address `protobuf:"bytes,1,opt,name=address,proto3,casttype=Address" json:"address,omitempty"`
}
func (*ProtoAddress) Descriptor ¶
func (*ProtoAddress) Descriptor() ([]byte, []int)
func (ProtoAddress) FromProto ¶
func (pa ProtoAddress) FromProto() Address
func (*ProtoAddress) GetAddress ¶
func (m *ProtoAddress) GetAddress() Address
func (*ProtoAddress) Marshal ¶
func (m *ProtoAddress) Marshal() (dAtA []byte, err error)
func (*ProtoAddress) MarshalToSizedBuffer ¶
func (m *ProtoAddress) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProtoAddress) ProtoMessage ¶
func (*ProtoAddress) ProtoMessage()
func (*ProtoAddress) Reset ¶
func (m *ProtoAddress) Reset()
func (*ProtoAddress) Size ¶
func (m *ProtoAddress) Size() (n int)
func (*ProtoAddress) String ¶
func (m *ProtoAddress) String() string
func (*ProtoAddress) Unmarshal ¶
func (m *ProtoAddress) Unmarshal(dAtA []byte) error
func (*ProtoAddress) XXX_DiscardUnknown ¶
func (m *ProtoAddress) XXX_DiscardUnknown()
func (*ProtoAddress) XXX_Marshal ¶
func (m *ProtoAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProtoAddress) XXX_Merge ¶
func (m *ProtoAddress) XXX_Merge(src proto.Message)
func (*ProtoAddress) XXX_Size ¶
func (m *ProtoAddress) XXX_Size() int
func (*ProtoAddress) XXX_Unmarshal ¶
func (m *ProtoAddress) XXX_Unmarshal(b []byte) error
type ProtoAddresses ¶
type ProtoAddresses struct {
Arr Addresses `protobuf:"bytes,1,rep,name=arr,proto3,castrepeated=Addresses" json:"arr,omitempty"`
}
func (*ProtoAddresses) Descriptor ¶
func (*ProtoAddresses) Descriptor() ([]byte, []int)
func (ProtoAddresses) FromProto ¶
func (pa ProtoAddresses) FromProto() Addresses
func (*ProtoAddresses) GetArr ¶
func (m *ProtoAddresses) GetArr() Addresses
func (*ProtoAddresses) Marshal ¶
func (m *ProtoAddresses) Marshal() (dAtA []byte, err error)
func (*ProtoAddresses) MarshalToSizedBuffer ¶
func (m *ProtoAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProtoAddresses) ProtoMessage ¶
func (*ProtoAddresses) ProtoMessage()
func (*ProtoAddresses) Reset ¶
func (m *ProtoAddresses) Reset()
func (*ProtoAddresses) Size ¶
func (m *ProtoAddresses) Size() (n int)
func (*ProtoAddresses) String ¶
func (m *ProtoAddresses) String() string
func (*ProtoAddresses) Unmarshal ¶
func (m *ProtoAddresses) Unmarshal(dAtA []byte) error
func (*ProtoAddresses) XXX_DiscardUnknown ¶
func (m *ProtoAddresses) XXX_DiscardUnknown()
func (*ProtoAddresses) XXX_Marshal ¶
func (m *ProtoAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProtoAddresses) XXX_Merge ¶
func (m *ProtoAddresses) XXX_Merge(src proto.Message)
func (*ProtoAddresses) XXX_Size ¶
func (m *ProtoAddresses) XXX_Size() int
func (*ProtoAddresses) XXX_Unmarshal ¶
func (m *ProtoAddresses) XXX_Unmarshal(b []byte) error
type ProtoBool ¶
type ProtoBool struct {
B bool `protobuf:"varint,1,opt,name=b,proto3" json:"b,omitempty"`
}
func (*ProtoBool) Descriptor ¶
func (*ProtoBool) MarshalToSizedBuffer ¶
func (*ProtoBool) ProtoMessage ¶
func (*ProtoBool) ProtoMessage()
func (*ProtoBool) XXX_DiscardUnknown ¶
func (m *ProtoBool) XXX_DiscardUnknown()
func (*ProtoBool) XXX_Marshal ¶
func (*ProtoBool) XXX_Unmarshal ¶
type ProtoInt64 ¶
type ProtoInt64 struct {
I int64 `protobuf:"varint,1,opt,name=i,proto3" json:"i,omitempty"`
}
func (*ProtoInt64) Descriptor ¶
func (*ProtoInt64) Descriptor() ([]byte, []int)
func (ProtoInt64) FromProto ¶
func (pi ProtoInt64) FromProto() Int64
func (*ProtoInt64) GetI ¶
func (m *ProtoInt64) GetI() int64
func (*ProtoInt64) Marshal ¶
func (m *ProtoInt64) Marshal() (dAtA []byte, err error)
func (*ProtoInt64) MarshalToSizedBuffer ¶
func (m *ProtoInt64) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ProtoInt64) ProtoMessage ¶
func (*ProtoInt64) ProtoMessage()
func (*ProtoInt64) Reset ¶
func (m *ProtoInt64) Reset()
func (*ProtoInt64) Size ¶
func (m *ProtoInt64) Size() (n int)
func (*ProtoInt64) String ¶
func (m *ProtoInt64) String() string
func (*ProtoInt64) Unmarshal ¶
func (m *ProtoInt64) Unmarshal(dAtA []byte) error
func (*ProtoInt64) XXX_DiscardUnknown ¶
func (m *ProtoInt64) XXX_DiscardUnknown()
func (*ProtoInt64) XXX_Marshal ¶
func (m *ProtoInt64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProtoInt64) XXX_Merge ¶
func (m *ProtoInt64) XXX_Merge(src proto.Message)
func (*ProtoInt64) XXX_Size ¶
func (m *ProtoInt64) XXX_Size() int
func (*ProtoInt64) XXX_Unmarshal ¶
func (m *ProtoInt64) XXX_Unmarshal(b []byte) error
type ProtoMsg ¶
type ProtoMsg interface { proto.Message // Return the message type. // Must be alphanumeric or empty. Route() string // Returns a human-readable string for the message, intended for utilization // within tags Type() string // ValidateBasic does a simple validation check that // doesn't require access to any other information. ValidateBasic() Error // Get the canonical byte representation of the ProtoMsg. GetSignBytes() []byte // Signers returns the addrs of signers that must sign. // CONTRACT: All signatures must be present to be valid. // CONTRACT: Returns addrs in some deterministic order. GetSigners() []Address // Returns the recipient of the tx, if no recipient returns nil GetRecipient() Address // Returns an BigInt for the ProtoMsg GetFee() BigInt }
Transactions messages must fulfill the ProtoMsg
type QueryRouter ¶
type QueryRouter interface { AddRoute(r string, h Querier) QueryRouter Route(path string) Querier }
QueryRouter provides queryables for each query path.
type Raw ¶
type Raw []byte
Raw is a raw encoded JSON value. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
func (Raw) MarshalJSON ¶
MarshalJSON returns m as the JSON encoding of m.
func (*Raw) UnmarshalJSON ¶
UnmarshalJSON sets *m to a copy of data.
type ReadOnlySubspace ¶
type ReadOnlySubspace struct {
// contains filtered or unexported fields
}
Wrapper of Subspace, provides immutable functions only
func (ReadOnlySubspace) Get ¶
func (ros ReadOnlySubspace) Get(ctx Ctx, key []byte, ptr interface{})
Exposes Get
func (ReadOnlySubspace) GetRaw ¶
func (ros ReadOnlySubspace) GetRaw(ctx Ctx, key []byte) ([]byte, error)
Exposes GetRaw
func (ReadOnlySubspace) Has ¶
func (ros ReadOnlySubspace) Has(ctx Ctx, key []byte) (bool, error)
Exposes Has
type Result ¶
type Result struct { Code CodeType `protobuf:"varint,1,opt,name=code,proto3,casttype=CodeType" json:"code,omitempty"` Codespace CodespaceType `protobuf:"bytes,2,opt,name=codespace,proto3,casttype=CodespaceType" json:"codespace,omitempty"` // Data is any data returned from message or handler execution. It MUST be length // prefixed in order to separate data from multiple message executions. Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // Log contains the log information from message or handler execution. Log string `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty"` GasWanted uint64 `protobuf:"varint,5,opt,name=gasWanted,proto3" json:"gasWanted,omitempty"` GasUsed uint64 `protobuf:"varint,6,opt,name=gasUsed,proto3" json:"gasUsed,omitempty"` // Events contains a slice of Event objects that were emitted during message or // handler execution. Events Events `protobuf:"bytes,7,rep,name=events,proto3,castrepeated=Events" json:"events"` }
Result is the union of ResponseFormat and ResponseCheckTx.
func (*Result) Descriptor ¶
func (*Result) MarshalToSizedBuffer ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) XXX_DiscardUnknown ¶
func (m *Result) XXX_DiscardUnknown()
func (*Result) XXX_Marshal ¶
func (*Result) XXX_Unmarshal ¶
type SDKConfig ¶
type SDKConfig struct {
// contains filtered or unexported fields
}
TmConfig is the structure that holds the SDK configuration parameters. This could be used to initialize certain configuration parameters for the SDK.
func (*SDKConfig) GetAddressVerifier ¶
GetAddressVerifier returns the function to verify that Addresses have the correct format
func (*SDKConfig) GetTxEncoder ¶
GetTxEncoder return function to encode transactions
func (*SDKConfig) Seal ¶
Seal seals the config such that the config state could not be modified further
func (*SDKConfig) SetAddressVerifier ¶
SetAddressVerifier builds the TmConfig with the provided function for verifying that Addresses have the correct format
func (*SDKConfig) SetCoinType ¶
Set the BIP-0044 CoinType code on the config
func (*SDKConfig) SetTxEncoder ¶
SetTxEncoder builds the TmConfig with TxEncoder used to marshal StdTx to bytes
type SimulationResponse ¶
type SimulationResponse struct { GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3,embedded=gas_info" json:"gas_info"` Result *Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` }
SimulationResponse defines the response generated when a transaction is successfully simulated.
func (*SimulationResponse) Descriptor ¶
func (*SimulationResponse) Descriptor() ([]byte, []int)
func (*SimulationResponse) GetResult ¶
func (m *SimulationResponse) GetResult() *Result
func (*SimulationResponse) Marshal ¶
func (m *SimulationResponse) Marshal() (dAtA []byte, err error)
func (*SimulationResponse) MarshalTo ¶
func (m *SimulationResponse) MarshalTo(dAtA []byte) (int, error)
func (*SimulationResponse) MarshalToSizedBuffer ¶
func (m *SimulationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SimulationResponse) ProtoMessage ¶
func (*SimulationResponse) ProtoMessage()
func (*SimulationResponse) Reset ¶
func (m *SimulationResponse) Reset()
func (*SimulationResponse) Size ¶
func (m *SimulationResponse) Size() (n int)
func (*SimulationResponse) String ¶
func (this *SimulationResponse) String() string
func (*SimulationResponse) Unmarshal ¶
func (m *SimulationResponse) Unmarshal(dAtA []byte) error
func (*SimulationResponse) XXX_DiscardUnknown ¶
func (m *SimulationResponse) XXX_DiscardUnknown()
func (*SimulationResponse) XXX_Marshal ¶
func (m *SimulationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SimulationResponse) XXX_Merge ¶
func (m *SimulationResponse) XXX_Merge(src proto.Message)
func (*SimulationResponse) XXX_Size ¶
func (m *SimulationResponse) XXX_Size() int
func (*SimulationResponse) XXX_Unmarshal ¶
func (m *SimulationResponse) XXX_Unmarshal(b []byte) error
type StakeStatus ¶
type StakeStatus byte
StakeStatus is the status of a validator
func (StakeStatus) Equal ¶
func (b StakeStatus) Equal(b2 StakeStatus) bool
Equal compares two StakeStatus instances
func (StakeStatus) String ¶
func (b StakeStatus) String() string
String implements the Stringer interface for StakeStatus.
type StringEvent ¶
type StringEvent struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes"` }
StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes.
func StringifyEvent ¶
func StringifyEvent(e abci.Event) StringEvent
StringifyEvent converts an Event object to a StringEvent object.
func (*StringEvent) Descriptor ¶
func (*StringEvent) Descriptor() ([]byte, []int)
func (*StringEvent) GetAttributes ¶
func (m *StringEvent) GetAttributes() []Attribute
func (*StringEvent) GetType ¶
func (m *StringEvent) GetType() string
func (*StringEvent) Marshal ¶
func (m *StringEvent) Marshal() (dAtA []byte, err error)
func (*StringEvent) MarshalToSizedBuffer ¶
func (m *StringEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StringEvent) ProtoMessage ¶
func (*StringEvent) ProtoMessage()
func (*StringEvent) Reset ¶
func (m *StringEvent) Reset()
func (*StringEvent) Size ¶
func (m *StringEvent) Size() (n int)
func (*StringEvent) String ¶
func (this *StringEvent) String() string
func (*StringEvent) Unmarshal ¶
func (m *StringEvent) Unmarshal(dAtA []byte) error
func (*StringEvent) XXX_DiscardUnknown ¶
func (m *StringEvent) XXX_DiscardUnknown()
func (*StringEvent) XXX_Marshal ¶
func (m *StringEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StringEvent) XXX_Merge ¶
func (m *StringEvent) XXX_Merge(src proto.Message)
func (*StringEvent) XXX_Size ¶
func (m *StringEvent) XXX_Size() int
func (*StringEvent) XXX_Unmarshal ¶
func (m *StringEvent) XXX_Unmarshal(b []byte) error
type StringEvents ¶
type StringEvents []StringEvent
StringAttributes defines a slice of StringEvents objects.
func StringifyEvents ¶
func StringifyEvents(events []abci.Event) StringEvents
StringifyEvents converts a slice of Event objects into a slice of StringEvent objects.
func (StringEvents) Flatten ¶
func (se StringEvents) Flatten() StringEvents
Flatten returns a flattened version of StringEvents by grouping all attributes per unique event type.
func (StringEvents) String ¶
func (se StringEvents) String() string
type Subspace ¶
type Subspace struct {
// contains filtered or unexported fields
}
Individual parameter store for each keeper Transient store persists for a block, so we use it for recording whether the parameter has been changed or not
func NewSubspace ¶
NewSubspace constructs a store with namestore
func (Subspace) GetAllParamKeys ¶
func (Subspace) GetIfExists ¶
GetIfExists do not modify ptr if the stored parameter is nil
func (Subspace) GetWithSubkey ¶
GetWithSubkey returns a parameter with a given key and a subkey.
func (Subspace) GetWithSubkeyIfExists ¶
GetWithSubkeyIfExists returns a parameter with a given key and a subkey but does not modify ptr if the stored parameter is nil.
func (Subspace) Set ¶
Set stores the parameter. It returns error if stored parameter has different type from input. It also set to the transient store to record change.
func (Subspace) SetWithSubkey ¶
SetWithSubkey set a parameter with a key and subkey Checks parameter type only over the key
func (Subspace) Update ¶
Update stores raw parameter bytes. It returns error if the stored parameter has a different type from the input. It also sets to the transient store to record change.
func (Subspace) UpdateWithSubkey ¶
UpdateWithSubkey stores raw parameter bytes with a key and subkey. It checks the parameter type only over the key.
func (Subspace) WithKeyTable ¶
WithKeyTable initializes KeyTable and returns modified Subspace
type TraceContext ¶
type TraceContext = types.TraceContext
TraceContext contains TraceKVStore context data. It will be written with every trace operation.
type TransactionIndexer ¶
type TransactionIndexer struct {
// contains filtered or unexported fields
}
func NewTransactionIndexer ¶
func NewTransactionIndexer(store dbm.DB) *TransactionIndexer
func (*TransactionIndexer) DeleteFromHeight ¶
func (t *TransactionIndexer) DeleteFromHeight(ctx context.Context, height int64) error
type TransientStoreKey ¶
type TransientStoreKey = types.TransientStoreKey
nolint - reexport
func NewTransientStoreKey ¶
func NewTransientStoreKey(name string) *TransientStoreKey
Constructs new TransientStoreKey Must return a pointer according to the ocap principle
type Tx ¶
type Tx interface { // Gets the all the transaction's messages. GetMsg() Msg // ValidateBasic does a simple and lightweight validation check that doesn't // require access to any other information. ValidateBasic() Error }
Transactions objects must fulfill the Tx
type TxMsgData ¶
type TxMsgData struct {
Data []*MsgData `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
}
TxMsgData defines a list of MsgData. A transaction will have a MsgData object for each message.
func (*TxMsgData) Descriptor ¶
func (*TxMsgData) MarshalToSizedBuffer ¶
func (*TxMsgData) ProtoMessage ¶
func (*TxMsgData) ProtoMessage()
func (*TxMsgData) XXX_DiscardUnknown ¶
func (m *TxMsgData) XXX_DiscardUnknown()
func (*TxMsgData) XXX_Marshal ¶
func (*TxMsgData) XXX_Unmarshal ¶
type TxResponse ¶
type TxResponse struct { // The block height Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` // The transaction hash. TxHash string `protobuf:"bytes,2,opt,name=txhash,proto3" json:"txhash,omitempty"` // Namespace for the Code Codespace string `protobuf:"bytes,3,opt,name=codespace,proto3" json:"codespace,omitempty"` // Response code. Code uint32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"` // Result bytes, if any. Data string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // The output of the application's logger (raw string). May be non-deterministic. RawLog string `protobuf:"bytes,6,opt,name=raw_log,json=rawLog,proto3" json:"raw_log,omitempty"` // The output of the application's logger (typed). May be non-deterministic. Logs ABCIMessageLogs `protobuf:"bytes,7,rep,name=logs,proto3,castrepeated=ABCIMessageLogs" json:"logs"` // Additional information. May be non-deterministic. Info string `protobuf:"bytes,8,opt,name=info,proto3" json:"info,omitempty"` // Amount of gas requested for transaction. GasWanted int64 `protobuf:"varint,9,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` // Amount of gas consumed by transaction. GasUsed int64 `protobuf:"varint,10,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` // The request transaction bytes. Tx *types.Any `protobuf:"bytes,11,opt,name=tx,proto3" json:"tx,omitempty"` // Time of the previous block. For heights > 1, it's the weighted median of the // timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. Timestamp string `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp,omitempty"` }
TxResponse defines a structure containing relevant tx data and metadata. The tags are stringified and the log is JSON decoded.
func NewResponseFormatBroadcastTx ¶
func NewResponseFormatBroadcastTx(res *ctypes.ResultBroadcastTx) TxResponse
NewResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from tendermint
func NewResponseFormatBroadcastTxCommit ¶
func NewResponseFormatBroadcastTxCommit(res *ctypes.ResultBroadcastTxCommit) TxResponse
NewResponseFormatBroadcastTxCommit returns a TxResponse given a ResultBroadcastTxCommit from tendermint.
func NewResponseResultTx ¶
func NewResponseResultTx(res *ctypes.ResultTx, tx Tx, timestamp string) TxResponse
NewResponseResultTx returns a TxResponse given a ResultTx from tendermint
func (*TxResponse) Descriptor ¶
func (*TxResponse) Descriptor() ([]byte, []int)
func (TxResponse) Empty ¶
func (r TxResponse) Empty() bool
Empty returns true if the response is empty
func (*TxResponse) Marshal ¶
func (m *TxResponse) Marshal() (dAtA []byte, err error)
func (*TxResponse) MarshalToSizedBuffer ¶
func (m *TxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TxResponse) ProtoMessage ¶
func (*TxResponse) ProtoMessage()
func (*TxResponse) Reset ¶
func (m *TxResponse) Reset()
func (*TxResponse) Size ¶
func (m *TxResponse) Size() (n int)
func (TxResponse) String ¶
func (r TxResponse) String() string
func (*TxResponse) Unmarshal ¶
func (m *TxResponse) Unmarshal(dAtA []byte) error
func (*TxResponse) XXX_DiscardUnknown ¶
func (m *TxResponse) XXX_DiscardUnknown()
func (*TxResponse) XXX_Marshal ¶
func (m *TxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TxResponse) XXX_Merge ¶
func (m *TxResponse) XXX_Merge(src proto.Message)
func (*TxResponse) XXX_Size ¶
func (m *TxResponse) XXX_Size() int
func (*TxResponse) XXX_Unmarshal ¶
func (m *TxResponse) XXX_Unmarshal(b []byte) error
type Uint ¶
type Uint struct {
// contains filtered or unexported fields
}
Uint wraps integer with 256 bit range bound Checks overflow, underflow and division by zero Exists in range from 0 to 2^256-1
func NewUintFromBigInt ¶
NewUintFromBigUint constructs Uint from big.Uint
func NewUintFromString ¶
NewUintFromString constructs Uint from string
func RelativePow ¶
RelativePow raises x to the power of n, where x (and the result, z) are scaled by factor b for example, RelativePow(210, 2, 100) = 441 (2.1^2 = 4.41)
func (Uint) MarshalAmino ¶
Override Amino binary serialization by proxying to protobuf.
func (Uint) MarshalJSON ¶
MarshalJSON defines custom encoding scheme
func (*Uint) UnmarshalAmino ¶
func (*Uint) UnmarshalJSON ¶
UnmarshalJSON defines custom decoding scheme
Source Files ¶
- abci.go
- abci.pb.go
- address.go
- address.pb.go
- bytes.go
- codec.go
- coin.go
- coin.pb.go
- config.go
- context.go
- dec_coin.go
- decimal.go
- denom.go
- errors.go
- events.go
- handler.go
- indexer.go
- int.go
- invariant.go
- lru.go
- param.go
- proto.go
- queryable.go
- result.go
- router.go
- staking.go
- store.go
- tx_msg.go
- uint.go
- utils.go
- wrappers.pb.go