abiparser

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegacyAbi

type LegacyAbi struct {
}

LegacyAbi parsing events from legacy abi contract

func (*LegacyAbi) ParseOperatorAddedEvent

func (l *LegacyAbi) ParseOperatorAddedEvent(logger *zap.Logger, operatorPrivateKey *rsa.PrivateKey, data []byte, contractAbi abi.ABI) (*LegacyOperatorAddedEvent, bool, error)

ParseOperatorAddedEvent parses an OperatorAddedEvent

func (*LegacyAbi) ParseValidatorAddedEvent

func (l *LegacyAbi) ParseValidatorAddedEvent(logger *zap.Logger, operatorPrivateKey *rsa.PrivateKey, data []byte, contractAbi abi.ABI) (*LegacyValidatorAddedEvent, bool, error)

ParseValidatorAddedEvent parses ValidatorAddedEvent

type LegacyAdapter

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

LegacyAdapter between legacy to v2 format

func (LegacyAdapter) ParseOperatorAddedEvent

func (adapter LegacyAdapter) ParseOperatorAddedEvent(logger *zap.Logger, operatorPrivateKey *rsa.PrivateKey, data []byte, topics []common.Hash, contractAbi abi.ABI) (*OperatorAddedEvent, bool, error)

ParseOperatorAddedEvent parses LegacyOperatorAddedEvent to OperatorAddedEvent

func (LegacyAdapter) ParseValidatorAddedEvent

func (adapter LegacyAdapter) ParseValidatorAddedEvent(logger *zap.Logger, operatorPrivateKey *rsa.PrivateKey, data []byte, contractAbi abi.ABI) (*ValidatorAddedEvent, bool, error)

ParseValidatorAddedEvent parses LegacyValidatorAddedEvent to ValidatorAddedEvent

type LegacyOperatorAddedEvent

type LegacyOperatorAddedEvent struct {
	Name           string
	PublicKey      []byte
	PaymentAddress common.Address
	OwnerAddress   common.Address
}

LegacyOperatorAddedEvent struct represents event received by the smart contract

type LegacyValidatorAddedEvent

type LegacyValidatorAddedEvent struct {
	PublicKey    []byte
	OwnerAddress common.Address
	OessList     []Oess
}

LegacyValidatorAddedEvent struct represents event received by the smart contract

type Oess

type Oess struct {
	Index             *big.Int
	OperatorPublicKey []byte
	SharedPublicKey   []byte
	EncryptedKey      []byte
}

Oess struct stands for operator encrypted secret share

type OperatorAddedEvent

type OperatorAddedEvent struct {
	Name         string
	OwnerAddress common.Address
	PublicKey    []byte
}

OperatorAddedEvent struct represents event received by the smart contract

type V2Abi

type V2Abi struct {
}

V2Abi parsing events from v2 abi contract

func (*V2Abi) ParseOperatorAddedEvent

func (v2 *V2Abi) ParseOperatorAddedEvent(logger *zap.Logger, operatorPrivateKey *rsa.PrivateKey, data []byte, topics []common.Hash, contractAbi abi.ABI) (*OperatorAddedEvent, bool, error)

ParseOperatorAddedEvent parses an OperatorAddedEvent

func (*V2Abi) ParseValidatorAddedEvent

func (v2 *V2Abi) ParseValidatorAddedEvent(logger *zap.Logger, operatorPrivateKey *rsa.PrivateKey, data []byte, contractAbi abi.ABI) (*ValidatorAddedEvent, bool, error)

ParseValidatorAddedEvent parses ValidatorAddedEvent

type ValidatorAddedEvent

type ValidatorAddedEvent struct {
	PublicKey          []byte
	OwnerAddress       common.Address
	OperatorPublicKeys [][]byte
	SharesPublicKeys   [][]byte
	EncryptedKeys      [][]byte
}

ValidatorAddedEvent struct represents event received by the smart contract

Jump to

Keyboard shortcuts

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