Documentation ¶
Index ¶
- Variables
- func ContainsString(s []string, e string) bool
- func ConvertAddressToStrideAddress(address string) string
- func FilterDepositRecords(arr []recordstypes.DepositRecord, ...) (ret []recordstypes.DepositRecord)
- func GetFromBech32(bech32str, prefix string) ([]byte, error)
- func GetVestedCoinsAt(vAt int64, vStart int64, vLength int64, vCoins sdk.Coins) sdk.Coins
- func HostZoneUnbondingKeys(m map[string]*recordstypes.HostZoneUnbonding) []string
- func Int64ToCoinString(amount int64, denom string) string
- func LogHeader(s string, a ...any) string
- func LogWithHostZone(chainId string, s string, a ...any) string
- func Max64(i, j int64) int64
- func Min(a int, b int) int
- func Min64(i, j int64) int64
- func StringToIntMapKeys(m map[string]int64) []string
- func StringToStringMapKeys(m map[string]string) []string
- func StringToStringSliceMapKeys(m map[string][]string) []string
- func ValidateAdminAddress(address string) error
- func VerifyAddressFormat(bz []byte) error
- type AccAddress
Constants ¶
This section is empty.
Variables ¶
var Admins = map[string]bool{ "stride1k8c2m5cn322akk5wy8lpt87dd2f4yh9azg7jlh": true, "stride10d07y265gmmuvt4z0w9aw880jnsr700jefnezl": true, }
Functions ¶
func ConvertAddressToStrideAddress ¶
Convert any bech32 to stride address
func FilterDepositRecords ¶
func FilterDepositRecords(arr []recordstypes.DepositRecord, condition func(recordstypes.DepositRecord) bool) (ret []recordstypes.DepositRecord)
func GetFromBech32 ¶
GetFromBech32 decodes a bytestring from a Bech32 encoded string.
func GetVestedCoinsAt ¶
Compute coin amount for specific period using linear vesting calculation algorithm.
func HostZoneUnbondingKeys ¶
func HostZoneUnbondingKeys(m map[string]*recordstypes.HostZoneUnbonding) []string
func Int64ToCoinString ¶
func LogHeader ¶
Returns a log header string with a dash padding on either side Ex:
------------------------------ string ------------------------------
func LogWithHostZone ¶
Returns a log string with a tab and chainId as the prefix Ex:
| COSMOSHUB-4 | string
func Max64 ¶
============================== AIRDROP UTILS ================================ max64 returns the maximum of its inputs.
func StringToIntMapKeys ¶
func StringToStringMapKeys ¶
func ValidateAdminAddress ¶
func VerifyAddressFormat ¶
VerifyAddressFormat verifies that the provided bytes form a valid address according to the default address rules or a custom address verifier set by GetConfig().SetAddressVerifier(). TODO make an issue to get rid of global Config ref: https://github.com/cosmos/cosmos-sdk/issues/9690
Types ¶
type AccAddress ¶
type AccAddress []byte
AccAddress a wrapper around bytes meant to represent an account address. When marshaled to a string or JSON, it uses Bech32.
func AccAddressFromBech32 ¶
func AccAddressFromBech32(address string, bech32prefix string) (addr AccAddress, err error)
AccAddressFromBech32 creates an AccAddress from a Bech32 string.