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 (opens in a new tab)
func ComputeEventFingerprint(eventName string) string
ComputeEventFingerprint returns the EventID as computed by ComputeEventID but as a hex string.
func ComputeEventID (opens in a new tab)
func ComputeEventID(eventName string) common.Hash
ComputeEventID returns a hash of a given event using the World ECS ABI.
func FilterLogs (opens in a new tab)
func FilterLogs(logs []types.Log) []types.Log
FilterLogs applies ordering and filters to a list of logs.
func GetAllEventsInBlock (opens in a new tab)
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 (opens in a new tab)
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 (opens in a new tab)
func GetCurrentBalance(client *ethclient.Client, address string) (uint64, error)
GetCurrentBalance returns the current balance of account with given address.
func GetCurrentBlockNumber (opens in a new tab)
func GetCurrentBlockNumber(client *ethclient.Client) *big.Int
GetCurrentBlockNumber returns the block number of the block at the tip of the chain.
func GetCurrentNonce (opens in a new tab)
func GetCurrentNonce(client *ethclient.Client, address common.Address) (uint64, error)
func GetEthereumClient (opens in a new tab)
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 (opens in a new tab)
func GetEthereumSubscription(client *ethclient.Client, headers chan *types.Header) (ethereum.Subscription, error)
GetEthereumSubscription returns a subscription to new blocks.
func ParseEventComponentRegistered (opens in a new tab)
func ParseEventComponentRegistered(log types.Log) (*world.WorldComponentRegistered, error)
ParseEventComponentRegistered extracts a structured ComponentRegistered event from a log.
func ParseEventComponentValueRemoved (opens in a new tab)
func ParseEventComponentValueRemoved(log types.Log) (*world.WorldComponentValueRemoved, error)
ParseEventComponentValueRemoved extracts a structured ComponentValueRemoved event from a log.
func ParseEventComponentValueSet (opens in a new tab)
func ParseEventComponentValueSet(log types.Log) (*world.WorldComponentValueSet, error)
ParseEventComponentValueSet extracts a structured ComponentValueSet event from a log.
func UnpackLog (opens in a new tab)
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 (opens in a new tab)