abiparser

package
v0.2.1-rc.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorAdded     = "OperatorAdded"
	OperatorRemoved   = "OperatorRemoved"
	ValidatorAdded    = "ValidatorAdded"
	ValidatorRemoved  = "ValidatorRemoved"
	AccountLiquidated = "AccountLiquidated"
	AccountEnabled    = "AccountEnabled"
)

Event names

Variables

This section is empty.

Functions

This section is empty.

Types

type AbiLegacy added in v0.2.0

type AbiLegacy struct {
}

AbiLegacy parsing events from legacy abi contract

func (*AbiLegacy) ParseOperatorAddedEvent added in v0.2.0

func (a *AbiLegacy) ParseOperatorAddedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (*OperatorAddedEventLegacy, error)

ParseOperatorAddedEvent parses an OperatorAddedEvent

func (*AbiLegacy) ParseValidatorAddedEvent added in v0.2.0

func (a *AbiLegacy) ParseValidatorAddedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (*ValidatorAddedEventLegacy, error)

ParseValidatorAddedEvent parses ValidatorAddedEvent

type AbiV2 added in v0.2.0

type AbiV2 struct {
}

AbiV2 parsing events from v2 abi contract

func (*AbiV2) ParseAccountEnabledEvent added in v0.2.0

func (v2 *AbiV2) ParseAccountEnabledEvent(log types.Log) (*AccountEnabledEvent, error)

ParseAccountEnabledEvent parses AccountEnabledEvent

func (*AbiV2) ParseAccountLiquidatedEvent added in v0.2.0

func (v2 *AbiV2) ParseAccountLiquidatedEvent(log types.Log) (*AccountLiquidatedEvent, error)

ParseAccountLiquidatedEvent parses AccountLiquidatedEvent

func (*AbiV2) ParseOperatorAddedEvent added in v0.2.0

func (v2 *AbiV2) ParseOperatorAddedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (*OperatorAddedEvent, error)

ParseOperatorAddedEvent parses an OperatorAddedEvent

func (*AbiV2) ParseOperatorRemovedEvent

func (v2 *AbiV2) ParseOperatorRemovedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (*OperatorRemovedEvent, error)

ParseOperatorRemovedEvent parses OperatorRemovedEvent

func (*AbiV2) ParseValidatorAddedEvent added in v0.2.0

func (v2 *AbiV2) ParseValidatorAddedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (event *ValidatorAddedEvent, error error)

ParseValidatorAddedEvent parses ValidatorAddedEvent

func (*AbiV2) ParseValidatorRemovedEvent added in v0.2.0

func (v2 *AbiV2) ParseValidatorRemovedEvent(logger *zap.Logger, log types.Log, contractAbi abi.ABI) (*ValidatorRemovedEvent, error)

ParseValidatorRemovedEvent parses ValidatorRemovedEvent

type AccountEnabledEvent added in v0.2.0

type AccountEnabledEvent struct {
	OwnerAddress common.Address
}

AccountEnabledEvent struct represents event received by the smart contract

type AccountLiquidatedEvent added in v0.2.0

type AccountLiquidatedEvent struct {
	OwnerAddress common.Address
}

AccountLiquidatedEvent struct represents event received by the smart contract

type AdapterLegacy added in v0.2.0

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

AdapterLegacy between legacy to v1 format

func (AdapterLegacy) ParseAccountEnabledEvent added in v0.2.0

func (a AdapterLegacy) ParseAccountEnabledEvent(log types.Log) (*AccountEnabledEvent, error)

ParseAccountEnabledEvent event is not supported in legacy format

func (AdapterLegacy) ParseAccountLiquidatedEvent added in v0.2.0

func (a AdapterLegacy) ParseAccountLiquidatedEvent(log types.Log) (*AccountLiquidatedEvent, error)

ParseAccountLiquidatedEvent event is not supported in legacy format

func (AdapterLegacy) ParseOperatorAddedEvent added in v0.2.0

func (a AdapterLegacy) ParseOperatorAddedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (*OperatorAddedEvent, error)

ParseOperatorAddedEvent parses OperatorAddedEventLegacy to OperatorAddedEvent

func (AdapterLegacy) ParseOperatorRemovedEvent

func (a AdapterLegacy) ParseOperatorRemovedEvent(logger *zap.Logger, log types.Log, contractAbi abi.ABI) (*OperatorRemovedEvent, error)

ParseOperatorRemovedEvent event is not supported in legacy format

func (AdapterLegacy) ParseValidatorAddedEvent added in v0.2.0

func (a AdapterLegacy) ParseValidatorAddedEvent(
	logger *zap.Logger,
	log types.Log,
	contractAbi abi.ABI,
) (*ValidatorAddedEvent, error)

ParseValidatorAddedEvent parses ValidatorAddedEventLegacy to ValidatorAddedEvent

func (AdapterLegacy) ParseValidatorRemovedEvent added in v0.2.0

func (a AdapterLegacy) ParseValidatorRemovedEvent(logger *zap.Logger, log types.Log, contractAbi abi.ABI) (*ValidatorRemovedEvent, error)

ParseValidatorRemovedEvent event is not supported in legacy format

type MalformedEventError added in v0.3.0

type MalformedEventError struct {
	Err error
}

MalformedEventError is returned when event is malformed

func (*MalformedEventError) Error added in v0.3.0

func (e *MalformedEventError) Error() string

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 {
	Id           *big.Int //nolint
	Name         string
	OwnerAddress common.Address
	PublicKey    []byte
	Fee          *big.Int
}

OperatorAddedEvent struct represents event received by the smart contract

type OperatorAddedEventLegacy added in v0.2.0

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

OperatorAddedEventLegacy struct represents event received by the smart contract

type OperatorRemovedEvent added in v0.4.7

type OperatorRemovedEvent struct {
	OperatorId   *big.Int //nolint
	OwnerAddress common.Address
}

OperatorRemovedEvent struct represents event received by the smart contract

type ValidatorAddedEvent

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

ValidatorAddedEvent struct represents event received by the smart contract

type ValidatorAddedEventLegacy added in v0.2.0

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

ValidatorAddedEventLegacy struct represents event received by the smart contract

type ValidatorRemovedEvent added in v0.2.0

type ValidatorRemovedEvent struct {
	OwnerAddress common.Address
	PublicKey    []byte
}

ValidatorRemovedEvent 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