Documentation ¶
Index ¶
- Variables
- func CalcGasCost(gasLimit uint64, gasPrice *big.Int) *big.Int
- func ConvertNftResult(gameNftAddress string, res []response.NftResult) []response.NftResult
- func CreateDir(dirs ...string) (err error)
- func EventSignHash(eventTopic string) string
- func GetABI(abiJSON string) abi.ABI
- func GetIntFromRedis(key string, client *redis.Client) (int64, bool, error)
- func GetStringFromRedis(key string, client *redis.Client) (string, bool, error)
- func GetTxMethodName(method string) []byte
- func IncrFromRedis(key string, client *redis.Client) error
- func IsValidAddress(iaddress interface{}) bool
- func IsZeroAddress(iaddress interface{}) bool
- func Lock(key string, value interface{}, duration time.Duration, client *redis.Client) (bool, error)
- func ParseBalance(balance *big.Int) string
- func ParseCacheData(cds []model.CacheData) map[string][]model.CacheData
- func ParseMetadata(nr []response.NftResult) []model.CacheData
- func PathExists(path string) (bool, error)
- func QueryBlockHeight() (uint64, error)
- func RmKeyByPrefix(prefix string, client *redis.Client)
- func SetFromRedis(key string, value interface{}, duration time.Duration, client *redis.Client) error
- func SigRSV(isig interface{}) ([32]byte, [32]byte, uint8)
- func ToDecimal(ivalue interface{}, decimals int) decimal.Decimal
- func ToWei(iamount interface{}, decimals int) *big.Int
- func UnLock(key string, client *redis.Client) error
- type Counter
- type DataChannel
- type DataChannelSlice
- type DataEvent
- type EventBus
- type SpikeTx
Constants ¶
This section is empty.
Variables ¶
View Source
var Eb = &EventBus{ Subscribers: map[string]DataChannelSlice{}, }
Functions ¶
func CalcGasCost ¶
CalcGasCost calculate gas cost given gas limit (units) and gas price (wei)
func ConvertNftResult ¶
func EventSignHash ¶
func GetStringFromRedis ¶
func GetTxMethodName ¶
func IncrFromRedis ¶
func IsValidAddress ¶
func IsValidAddress(iaddress interface{}) bool
IsValidAddress validate hex address
func IsZeroAddress ¶
func IsZeroAddress(iaddress interface{}) bool
IsZeroAddress validate if it's a 0 address
func ParseBalance ¶
func PathExists ¶
func QueryBlockHeight ¶
func RmKeyByPrefix ¶
func RmKeyByPrefix(prefix string, client *redis.Client)
func SetFromRedis ¶
Types ¶
type DataChannel ¶
type DataChannel chan DataEvent
type DataChannelSlice ¶
type DataChannelSlice []DataChannel
type EventBus ¶
type EventBus struct { Subscribers map[string]DataChannelSlice // contains filtered or unexported fields }
func (*EventBus) Subscribe ¶
func (eb *EventBus) Subscribe(topic string, ch DataChannel)
Click to show internal directories.
Click to hide internal directories.