#
eth
import "command-line-arguments"
#
Index
func ComputeEventFingerprint(eventName string) string func ComputeEventID(eventName string) common.Hash func FilterLogs(logs []types.Log) []types.Log func GetAllEventsInBlock(client *ethclient.Client, blockNumber *big.Int, worldAddresses []common.Address) (logs []types.Log) func GetAllEventsInRange(client *ethclient.Client, start *big.Int, end *big.Int, worldAddresses []common.Address) ([]types.Log, error) func GetCurrentBalance(client *ethclient.Client, address string) (uint64, error) func GetCurrentBlockNumber(client *ethclient.Client) *big.Int func GetCurrentNonce(client *ethclient.Client, address common.Address) (uint64, error) func GetEthereumClient(wsUrl string, logger *zap.Logger) *ethclient.Client func GetEthereumSubscription(client *ethclient.Client, headers chan *types.Header) (ethereum.Subscription, error) func ParseEventComponentRegistered(log types.Log) (*world.WorldComponentRegistered, error) func ParseEventComponentValueRemoved(log types.Log) (*world.WorldComponentValueRemoved, error) func ParseEventComponentValueSet(log types.Log) (*world.WorldComponentValueSet, error) func UnpackLog(out interface, eventName string, log types.Log) error
#
func ComputeEventFingerprint
func ComputeEventFingerprint(eventName string) string
ComputeEventFingerprint returns the EventID as computed by ComputeEventID but as a hex string.
#
func ComputeEventID
func ComputeEventID(eventName string) common.Hash
ComputeEventID returns a hash of a given event using the World ECS ABI.
#
func FilterLogs
func FilterLogs(logs []types.Log) []types.Log
FilterLogs applies ordering and filters to a list of logs.
#
func GetAllEventsInBlock
func GetAllEventsInBlock(client *ethclient.Client, blockNumber *big.Int, worldAddresses []common.Address) (logs []types.Log)
GetAllEventsInBlock uses GetAllEventsInRange to return all ECS events in a given blockNumber.
#
func GetAllEventsInRange
func GetAllEventsInRange(client *ethclient.Client, start *big.Int, end *big.Int, worldAddresses []common.Address) ([]types.Log, error)
GetAllEventsInRange returns a list of ECS event logs given a start block and an end block (both big integers) and a worldAddresses filter. The worldAddresses may be an empty array in which case no filtering based on the contract address is applied to the logs.
#
func GetCurrentBalance
func GetCurrentBalance(client *ethclient.Client, address string) (uint64, error)
GetCurrentBalance returns the current balance of account with given address.
#
func GetCurrentBlockNumber
func GetCurrentBlockNumber(client *ethclient.Client) *big.Int
GetCurrentBlockNumber returns the block number of the block at the tip of the chain.
#
func GetCurrentNonce
func GetCurrentNonce(client *ethclient.Client, address common.Address) (uint64, error)
#
func GetEthereumClient
func GetEthereumClient(wsUrl string, logger *zap.Logger) *ethclient.Client
GetEthereumClient returns a connection to an Ethereum client via a websocket URL specified by wsUrl. In the case that a connection cannot be established, will retry for a fixed duration.
#
func GetEthereumSubscription
func GetEthereumSubscription(client *ethclient.Client, headers chan *types.Header) (ethereum.Subscription, error)
GetEthereumSubscription returns a subscription to new blocks.
#
func ParseEventComponentRegistered
func ParseEventComponentRegistered(log types.Log) (*world.WorldComponentRegistered, error)
ParseEventComponentRegistered extracts a structured ComponentRegistered event from a log.
#
func ParseEventComponentValueRemoved
func ParseEventComponentValueRemoved(log types.Log) (*world.WorldComponentValueRemoved, error)
ParseEventComponentValueRemoved extracts a structured ComponentValueRemoved event from a log.
#
func ParseEventComponentValueSet
func ParseEventComponentValueSet(log types.Log) (*world.WorldComponentValueSet, error)
ParseEventComponentValueSet extracts a structured ComponentValueSet event from a log.
#
func UnpackLog
func UnpackLog(out interface{}, eventName string, log types.Log) error
UnpackLog extracts an event from a log given an eventName and places it into out.
Generated by gomarkdoc