ethshell

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLogContract added in v0.5.0

type EventLogContract interface {
	GetTopics(opts *bind.CallOpts, address common.Address) ([]string, error)
	GetEvents(opts *bind.CallOpts, topic string, fromBlock *big.Int) ([]contract.EventLogEvent, error)
	PublishEvent(opts *bind.TransactOpts, topic string, id []byte, cid string, newAccounts []common.Address) (*types.Transaction, error)
}

type EventLogEvent

type EventLogEvent struct {
	TopicId     string
	Cid         string
	NewAccounts []string
	Emitter     string
	Timestamp   uint64
	BlockNumber uint64
	Id          uuid.UUID
}

type Shell

type Shell struct {
	// contains filtered or unexported fields
}

func NewShell

func NewShell(shellConfiguration ShellConfiguration) (*Shell, error)

func (*Shell) GetEvents

func (s *Shell) GetEvents(topic string, fromBlock uint64) ([]EventLogEvent, error)

func (*Shell) GetTopics

func (s *Shell) GetTopics(ctx context.Context) ([]string, error)

func (*Shell) GetTxSender

func (s *Shell) GetTxSender(ctx context.Context, txHash common.Hash) (common.Address, error)

func (*Shell) HeaderByNumber

func (s *Shell) HeaderByNumber(ctx context.Context, blockNumber uint64) (*types.Header, error)

func (*Shell) PublishEvent

func (s *Shell) PublishEvent(
	ctx context.Context,
	topic string,
	id uuid.UUID,
	cid string,
	newAccounts []string,
) (*types.Transaction, common.Address, error)

func (*Shell) SubscribeToEvents

func (s *Shell) SubscribeToEvents(ctx context.Context) (ethereum.Subscription, chan types.Log, error)

func (*Shell) UnpackLog added in v0.5.0

func (s *Shell) UnpackLog(ctx context.Context, log types.Log) (EventLogEvent, error)

type ShellConfiguration

type ShellConfiguration struct {
	EthNodeUrl      string
	ContractAddress string
	PrivateKey      string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL