events

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: LGPL-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 AcrossDeposit

type AcrossDeposit struct {
	InputToken          [32]byte
	OutputToken         [32]byte
	InputAmount         *big.Int
	OutputAmount        *big.Int
	DestinationChainId  *big.Int
	DepositId           *big.Int
	QuoteTimestamp      uint32
	ExclusivityDeadline uint32
	FillDeadline        uint32
	Depositor           [32]byte
	Recipient           [32]byte
	ExclusiveRelayer    [32]byte
	Message             []byte
}

func (*AcrossDeposit) ToV3RelayData

func (a *AcrossDeposit) ToV3RelayData(originChainID *big.Int) *AcrossV3RelayData

type AcrossV3RelayData

type AcrossV3RelayData struct {
	Depositor           [32]byte
	Recipient           [32]byte
	ExclusiveRelayer    [32]byte
	InputToken          [32]byte
	OutputToken         [32]byte
	InputAmount         *big.Int
	OutputAmount        *big.Int
	OriginChainId       *big.Int
	DepositId           *big.Int
	FillDeadline        uint32
	ExclusivityDeadline uint32
	Message             []byte
}

func (*AcrossV3RelayData) Calldata

func (a *AcrossV3RelayData) Calldata(repaymentChainID *big.Int, repaymentAddress common.Address) ([]byte, error)

type ChainClient

type ChainClient interface {
	FetchEventLogs(ctx context.Context, contractAddress common.Address, event string, startBlock *big.Int, endBlock *big.Int) ([]ethTypes.Log, error)
	WaitAndReturnTxReceipt(h common.Hash) (*ethTypes.Receipt, error)
	LatestBlock() (*big.Int, error)
	BlockByNumber(ctx context.Context, number *big.Int) (*ethTypes.Block, error)
}

type EventSig

type EventSig string
const (
	StartKeygenSig EventSig = "StartKeygen()"
	KeyRefreshSig  EventSig = "KeyRefresh(string)"

	AcrossDepositSig EventSig = "FundsDeposited(bytes32,bytes32,uint256,uint256,uint256,uint256,uint32,uint32,uint32,bytes32,bytes32,bytes32,bytes)"
	MayanDepositSig  EventSig = "OrderCreated(bytes32)"
)

func (EventSig) GetTopic

func (es EventSig) GetTopic() common.Hash

type Listener

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

func NewListener

func NewListener(client ChainClient) *Listener

func (*Listener) FetchKeygenEvents

func (l *Listener) FetchKeygenEvents(ctx context.Context, contractAddress common.Address, startBlock *big.Int, endBlock *big.Int) ([]ethTypes.Log, error)

func (*Listener) FetchRefreshEvents

func (l *Listener) FetchRefreshEvents(ctx context.Context, contractAddress common.Address, startBlock *big.Int, endBlock *big.Int) (*Refresh, ethTypes.Log, error)

func (*Listener) UnpackRefresh

func (l *Listener) UnpackRefresh(abi abi.ABI, data []byte) (*Refresh, error)

type Refresh

type Refresh struct {
	// SHA1 hash of topology file
	Hash string
}

Refresh struct holds key refresh event data

Directories

Path Synopsis
Package mock_events is a generated GoMock package.
Package mock_events is a generated GoMock package.

Jump to

Keyboard shortcuts

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