logic

package
v0.0.0-...-27df293 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETHLocked

type ETHLocked struct {
	ParentSender   common.Address
	ChildRecipient common.Address
	Amount         *big.Int
}
type CrossMessage struct {
	Sender         string
	Receiver       string
	TokenType      int
	L1TokenAddress string
	MessageValue   int
	TokenAmounts   string
}

type HistoryLogic

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

HistoryLogic services.

func NewHistoryLogic

func NewHistoryLogic(db *gorm.DB) *HistoryLogic

NewHistoryLogic returns bridge history services.

func (*HistoryLogic) GetL2UnclaimedWithdrawalsByAddress

func (h *HistoryLogic) GetL2UnclaimedWithdrawalsByAddress(ctx context.Context, address string, page, pageSize uint64) ([]*types.TxHistoryInfo, uint64, error)

GetL2UnclaimedWithdrawalsByAddress gets all unclaimed withdrawal txs under given address.

func (*HistoryLogic) GetTxsByAddress

func (h *HistoryLogic) GetTxsByAddress(ctx context.Context, address string, page, pageSize uint64) ([]*types.TxHistoryInfo, uint64, error)

GetL2UnclaimedWithdrawalsByAddress gets all unclaimed withdrawal txs under given address.

type L1EventParser

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

L1EventParser the l1 event parser

func NewL1EventParser

func NewL1EventParser(cfg *evm.GethConfig, client *ethclient.Client) *L1EventParser

NewL1EventParser creates l1 event parser

func (*L1EventParser) ParseL1CrossChainPayload

ParseL1CrossChainEventLogs parse l1 cross chain event logs

func (*L1EventParser) ParseL1CrossChainPayloadToRefundMsg

func (e *L1EventParser) ParseL1CrossChainPayloadToRefundMsg(ctx context.Context, msg *orm.CrossMessage, receipt *types.Receipt) ([]*orm.CrossMessage, error)

func (*L1EventParser) ParseL1RelayMessagePayload

func (*L1EventParser) ParseL1SingleCrossChainPayload

func (e *L1EventParser) ParseL1SingleCrossChainPayload(ctx context.Context, msg *contract.ParentBridgeCoreFacetQueueTransaction, tx *types.Transaction) ([]*orm.CrossMessage, error)

ParseL1SingleCrossChainEventLogs parses L1 watched single cross chain events.

type L1WatcherLogic

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

func NewL1WatcherLogic

func NewL1WatcherLogic(cfg *evm.GethConfig, client *ethclient.Client) *L1WatcherLogic

type L2ERC20TokenBurnt

type L2ERC20TokenBurnt struct {
	TokenAddress    common.Address // address
	ChildSender     common.Address // address
	ParentRecipient common.Address // address
	Amount          *big.Int       // uint256
}

represent the structure of the event logs ParentERC20TokenBurnt from ChildTokenMessageTransmitterFacet.sol

type L2ETHBurnt

type L2ETHBurnt struct {
	ChildSender     common.Address // address
	ParentRecipient common.Address // address
	Amount          *big.Int       // uint256
}

represent the structure of the event logs ParentEthBurnt from ChildTokenMessageTransmitterFacet.sol

type L2Erc1155BatchTokenBurnt

type L2Erc1155BatchTokenBurnt struct {
	TokenAddress    common.Address // address
	ChildSender     common.Address // address
	ParentRecipient common.Address // address
	TokenIDs        []*big.Int     // uint256[]
	Amounts         []*big.Int     // uint256[]
}

represent the structure of the event logs ParentERC1155TokenBurnt from ChildTokenMessageTransmitterFacet.sol

type L2Erc721TokenBurnt

type L2Erc721TokenBurnt struct {
	TokenAddress    common.Address // address
	ChildSender     common.Address // address
	ParentRecipient common.Address // address
	TokenID         *big.Int       // uint256
}

represent the structure of the event logs ParentERC721TokenBurnt from ChildTokenMessageTransmitterFacet.sol

type L2EventParser

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

L2EventParser the l1 event parser

func NewL2EventParser

func NewL2EventParser(cfg *evm.GethConfig) *L2EventParser

NewL2EventParser creates l1 event parser

func (*L2EventParser) ParseL2EventLogs

func (e *L2EventParser) ParseL2EventLogs(ctx context.Context, logs []types.Log) ([]*orm.CrossMessage, error)

ParseL2EventLogs parses L2 watchedevents

func (*L2EventParser) ParseL2SingleCrossChainEventLogs

func (e *L2EventParser) ParseL2SingleCrossChainEventLogs(ctx context.Context, logs []types.Log) ([]*orm.CrossMessage, error)

L2->L1 ParseL2SingleCrossChainEventLogs parses L2 watched events

type L2REDBurnt

type L2REDBurnt struct {
	TokenAddress    common.Address // address
	ChildSender     common.Address // address
	ParentRecipient common.Address // address
	Amount          *big.Int       // uint256
}

represent the structure of the event logs ParentREDTokenBurnt from ChildTokenMessageTransmitterFacet.sol

type L2WatcherLogic

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

func NewL2WatcherLogic

func NewL2WatcherLogic(cfg *evm.GethConfig, solidity *evm.Solidity) (*L2WatcherLogic, error)

func (*L2WatcherLogic) FilterLogs

func (f *L2WatcherLogic) FilterLogs(ctx context.Context, block *yutypes.Block, criteria ethereum.FilterQuery) ([]types.Log, error)

func (*L2WatcherLogic) HandleRead

func (f *L2WatcherLogic) HandleRead(rdCall *yucommon.RdCall) (*yucontext.ResponseData, error)

func (*L2WatcherLogic) L2FetcherUpwardMessageFromLogs

func (f *L2WatcherLogic) L2FetcherUpwardMessageFromLogs(ctx context.Context, block *yutypes.Block, l2BlockCollectionDepth *big.Int) ([]*orm.CrossMessage, map[uint64]uint64, error)

L2FetcherUpwardMessageFromLogs collects upward messages from the logs of the current block and the previous l2BlockCollectionDepth blocks.

type ParentERC1155TokenLocked

type ParentERC1155TokenLocked struct {
	TokenAddress   common.Address
	ParentSender   common.Address
	ChildRecipient common.Address
	TokenIds       []*big.Int
	Amounts        []*big.Int
}

type ParentERC20TokenLocked

type ParentERC20TokenLocked struct {
	TokenAddress   common.Address
	TokenName      string
	TokenSymbol    string
	Decimals       *big.Int
	ParentSender   common.Address
	ChildRecipient common.Address
	Amount         *big.Int
}

type ParentERC721TokenLocked

type ParentERC721TokenLocked struct {
	TokenAddress   common.Address
	TokenName      string
	TokenSymbol    string
	ParentSender   common.Address
	ChildRecipient common.Address
	TokenId        *big.Int
}

type ParentREDTokenLocked

type ParentREDTokenLocked struct {
	TokenAddress   common.Address
	ParentSender   common.Address
	ChildRecipient common.Address
	Amount         *big.Int
}

Jump to

Keyboard shortcuts

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