Documentation
¶
Overview ¶
We will refactor it later! But we support now sdk.Int as u128 for Libra u128. It's allows us to use balances from cosmos!
Index ¶
Constants ¶
View Source
const (
EthAddressLength = 20
)
Variables ¶
This section is empty.
Functions ¶
func BigToBytes ¶
Convert sdk.Int to bytes with little endian (required by Libra).
func IsEthereumAddress ¶
Check if it's ethereum address.
Types ¶
type EnumTypeUser ¶
type EnumTypeUser interface {
// EnumTypes return the ingredients used for all enum types in the struct.
EnumTypes() []EnumVariant
}
EnumTypeUser is an interface of struct with enum type definition. Struct with enum type should implement this interface.
type EnumVariant ¶
type EnumVariant struct {
// Name of the enum type. Different variants of a same enum type should have same name.
// This name should match the name defined in the struct field tag.
Name string
// Value is the numeric value of the enum variant. Should be unique within the same enum type.
Value int32
// Template object for the enum variant. Should be the zero value of the variant type.
//
// Example values: (*SomeStruct)(nil), MyUint32(0).
Template interface{}
}
EnumVariant is a definition of a variant of enum type.
Click to show internal directories.
Click to hide internal directories.