Documentation ¶
Index ¶
- func Alert(msg string)
- func DecodeNullString(str sql.NullString) ([]byte, error)
- func EncodeToNullString(bytes []byte) sql.NullString
- func LogErr(err error)
- func ParseEthAddress(addr string) (common.Address, error)
- func SendLarkAlert(msg string)
- func SendSlackAlert(msg string)
- func SetLarkURL(url string)
- func SetPrefix(s string)
- func SetSlackURL(url string)
- func UnpackLog(a abi.ABI, out interface{}, event string, log types.Log) error
- type Address
- type AddressDecoder
- type ETHAddressDecoder
- type Payload
- type SOLAddressDecoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeNullString ¶
func DecodeNullString(str sql.NullString) ([]byte, error)
DecodeNullString decodes a sql.NullString to bytes
func EncodeToNullString ¶
func EncodeToNullString(bytes []byte) sql.NullString
EncodeToNullString encodes a byte array into a sql.NullString
func SendLarkAlert ¶
func SendLarkAlert(msg string)
func SendSlackAlert ¶
func SendSlackAlert(msg string)
Types ¶
type AddressDecoder ¶
type AddressDecoder interface { DecodeBytes([]byte) (Address, error) DecodeString(string) (Address, error) }
TODO: remove error return, panic inside if failed
func NewAddressDecoder ¶
func NewAddressDecoder(chain string) AddressDecoder
func NewETHAddressDecoder ¶
func NewETHAddressDecoder() AddressDecoder
func NewSOLAddressDecoder ¶
func NewSOLAddressDecoder() AddressDecoder
type ETHAddressDecoder ¶
type ETHAddressDecoder struct{}
func (*ETHAddressDecoder) DecodeBytes ¶
func (d *ETHAddressDecoder) DecodeBytes(b []byte) (Address, error)
func (*ETHAddressDecoder) DecodeString ¶
func (d *ETHAddressDecoder) DecodeString(addr string) (Address, error)
type Payload ¶
type Payload struct {
Text string `json:"text,omitempty"`
}
Payload is the message struct for slack
type SOLAddressDecoder ¶
type SOLAddressDecoder struct{}
func (*SOLAddressDecoder) DecodeBytes ¶
func (s *SOLAddressDecoder) DecodeBytes(b []byte) (Address, error)
func (*SOLAddressDecoder) DecodeString ¶
func (s *SOLAddressDecoder) DecodeString(str string) (Address, error)
Click to show internal directories.
Click to hide internal directories.