Documentation ¶
Index ¶
- Constants
- func IsPeriodLastBlock(ctx sdk.Context, blocksPerPeriod int64) bool
- func IsSoftforkHeight(ctx sdk.Context, _version uint8) bool
- func IsWaitingForSoftfork(ctx sdk.Context, _version uint8) bool
- type Base64Bytes
- func (h Base64Bytes) Bytes() []byte
- func (h Base64Bytes) Empty() bool
- func (h Base64Bytes) Equal(h2 Base64Bytes) bool
- func (h Base64Bytes) Format(s fmt.State, verb rune)
- func (h Base64Bytes) Marshal() ([]byte, error)
- func (h Base64Bytes) MarshalJSON() ([]byte, error)
- func (h Base64Bytes) MarshalYAML() (interface{}, error)
- func (h Base64Bytes) String() string
- func (h *Base64Bytes) Unmarshal(data []byte) error
- func (h *Base64Bytes) UnmarshalJSON(data []byte) error
Constants ¶
const ( BlocksPerMinute = int64(10) BlocksPerHour = BlocksPerMinute * 60 BlocksPerDay = BlocksPerHour * 24 BlocksPerWeek = BlocksPerDay * 7 BlocksPerMonth = BlocksPerDay * 30 BlocksPerYear = BlocksPerDay * 365 )
nolint
const ( // CoinType defines LUNA bip44 coin type CoinType = uint32(330) // FullFundraiserPath defines full fundraiser path for LUNA coin type FullFundraiserPath = "44'/330'/0'/0/0" )
const ( // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address Bech32PrefixAccAddr = "terra" // Bech32PrefixAccPub defines the Bech32 prefix of an account's public key Bech32PrefixAccPub = "terrapub" // Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address Bech32PrefixValAddr = "terravaloper" // Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key Bech32PrefixValPub = "terravaloperpub" // Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address Bech32PrefixConsAddr = "terravalcons" // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key Bech32PrefixConsPub = "terravalconspub" )
Variables ¶
This section is empty.
Functions ¶
func IsPeriodLastBlock ¶ added in v0.0.7
IsPeriodLastBlock returns true if we are at the last block of the period
func IsSoftforkHeight ¶ added in v0.4.1
IsSoftforkHeight return whether current block height is the targeted softfork height
Types ¶
type Base64Bytes ¶ added in v0.4.0
type Base64Bytes []byte
Base64Bytes is hash value of wasm bytes code
func Base64FromHexString ¶ added in v0.4.0
func Base64FromHexString(s string) (Base64Bytes, error)
Base64FromHexString convert base64 string to Base64
func (Base64Bytes) Bytes ¶ added in v0.4.0
func (h Base64Bytes) Bytes() []byte
Bytes returns the raw address bytes.
func (Base64Bytes) Empty ¶ added in v0.4.0
func (h Base64Bytes) Empty() bool
Empty check the name hash has zero length
func (Base64Bytes) Equal ¶ added in v0.4.0
func (h Base64Bytes) Equal(h2 Base64Bytes) bool
Equal does bytes equal check
func (Base64Bytes) Format ¶ added in v0.4.0
func (h Base64Bytes) Format(s fmt.State, verb rune)
Format implements the fmt.Formatter interface.
func (Base64Bytes) Marshal ¶ added in v0.4.0
func (h Base64Bytes) Marshal() ([]byte, error)
Marshal returns the raw address bytes. It is needed for protobuf compatibility.
func (Base64Bytes) MarshalJSON ¶ added in v0.4.0
func (h Base64Bytes) MarshalJSON() ([]byte, error)
MarshalJSON marshals to JSON using base64.
func (Base64Bytes) MarshalYAML ¶ added in v0.4.0
func (h Base64Bytes) MarshalYAML() (interface{}, error)
MarshalYAML marshals to YAML using base64.
func (Base64Bytes) String ¶ added in v0.4.0
func (h Base64Bytes) String() string
String implements fmt.Stringer interface
func (*Base64Bytes) Unmarshal ¶ added in v0.4.0
func (h *Base64Bytes) Unmarshal(data []byte) error
Unmarshal sets the address to the given data. It is needed for protobuf compatibility.
func (*Base64Bytes) UnmarshalJSON ¶ added in v0.4.0
func (h *Base64Bytes) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals from JSON assuming base64 encoding.