Documentation ¶
Index ¶
- Variables
- func AddHex(s string) string
- func BoolFromInterface(i interface{}) bool
- func BytesToHex(b []byte) string
- func CallerName() string
- func CamelString(s string) string
- func ContinuousNums(start, count int, order string) (r []int)
- func DecimalFromInterface(i interface{}) decimal.Decimal
- func GetEnv(key, defaultValue string) string
- func GetFuncName() string
- func HexToBytes(s string) []byte
- func HexToNumStr(v string) string
- func InsertInts(o []int, index int, new int) []int
- func Int64FromInterface(i interface{}) int64
- func IntFromInterface(i interface{}) int
- func IntInSlice(a int, list []int) bool
- func IntToHex(i interface{}) string
- func IntToString(i int) string
- func MapStringToSlice(m map[string]bool) []string
- func StringInSlice(a string, list []string) bool
- func StringToInt(s string) int
- func StringsExclude(a []string, b []string) []string
- func StringsIntersection(a []string, b []string) []string
- func ToString(i interface{}) string
- func TrimHex(s string) string
- func U256(v string) *big.Int
- func UnmarshalAny(r interface{}, raw interface{})
- func UpperCamel(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ParamsError = ecode.New(10001) InvalidAccountAddress = ecode.New(10002) RecordNotFound = ecode.New(10004) )
View Source
var ( CurrentRuntimeSpecVersion int EventStorageKey = GetEnv("SUBSTRATE_EVENT_KEY", "0x26aa394eea5630e07c48ae0c9558cef780d41e5e16056765bc8461851072c9d7") AddressType = GetEnv("SUBSTRATE_ADDRESS_TYPE", "1") BalanceAccuracy = GetEnv("SUBSTRATE_ACCURACY", "9") CommissionAccuracy = GetEnv("COMMISSION_ACCURACY", "9") WSEndPoint = GetEnv("CHAIN_WS_ENDPOINT", "wss://polkadot.elara.patract.io") NetworkNode = GetEnv("NETWORK_NODE", "polkadot") IsProduction = os.Getenv("DEPLOY_ENV") == "prod" )
Functions ¶
func BytesToHex ¶
func ContinuousNums ¶ added in v0.1.0
func DecimalFromInterface ¶
func GetFuncName ¶
func GetFuncName() string
func HexToBytes ¶
func HexToNumStr ¶
func Int64FromInterface ¶
func Int64FromInterface(i interface{}) int64
func IntFromInterface ¶
func IntFromInterface(i interface{}) int
Convert int64, uint64, float64, string to int, return 0 if other types
func IntInSlice ¶
func MapStringToSlice ¶
func StringInSlice ¶
func StringsIntersection ¶
func UnmarshalAny ¶ added in v0.1.0
func UnmarshalAny(r interface{}, raw interface{})
func UpperCamel ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.