Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EthClient ¶
type EthClient interface {
CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
BalanceAt(ctx context.Context, account common.Address, number *big.Int) (*big.Int, error)
FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery,
ch chan<- types.Log) (ethereum.Subscription, error)
}
EthClient ... Provides interface wrapper for ethClient functions Useful for mocking go-ethereum json rpc client logic
func FromContext ¶
FromContext ... Retrieves EthClient from context
type GethClient ¶
type GethClient interface {
GetProof(ctx context.Context, account common.Address, keys []string,
blockNumber *big.Int) (*gethclient.AccountResult, error)
}
GethClient ... Provides interface wrapper for gethClient functions
func L2GethFromContext ¶
func L2GethFromContext(ctx context.Context) (GethClient, error)
func NewGethClient ¶
func NewGethClient(rawURL string) (GethClient, error)
NewGethClient ... Initializer
type SlackAPIResponse ¶
SlackAPIResponse ... represents the structure of a slack API response
type SlackClient ¶
type SlackClient interface {
PostData(context.Context, string) (*SlackAPIResponse, error)
}
SlackClient ... Interface for slack client
type SlackPayload ¶
type SlackPayload struct {
Text interface{} `json:"text"`
}
slackPayload represents the structure of a slack alert
Click to show internal directories.
Click to hide internal directories.