chainaccessor

package
v0.1.0-test Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoBindings = errors.New("no bindings found")

Functions

func NewTONAccessor

func NewTONAccessor(
	lggr logger.Logger,
	chainSelector ccipocr3.ChainSelector,
	client ton.APIClientWrapped,
	logPoller logpoller.Service,
	addrCodec ccipocr3.ChainSpecificAddressCodec,
) (ccipocr3.ChainAccessor, error)

Types

type TONAccessor

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

func (*TONAccessor) CommitReportsGTETimestamp

func (a *TONAccessor) CommitReportsGTETimestamp(ctx context.Context, ts time.Time, confidence primitives.ConfidenceLevel, limit int) ([]ccipocr3.CommitPluginReportWithMeta, error)

TON as destination chain methods

func (*TONAccessor) ExecutedMessages

func (*TONAccessor) GetAllConfigsLegacy

func (a *TONAccessor) GetAllConfigsLegacy(ctx context.Context, destChainSelector ccipocr3.ChainSelector, sourceChainSelectors []ccipocr3.ChainSelector) (ccipocr3.ChainConfigSnapshot, map[ccipocr3.ChainSelector]ccipocr3.SourceChainConfig, error)

func (*TONAccessor) GetChainFeeComponents

func (a *TONAccessor) GetChainFeeComponents(ctx context.Context) (ccipocr3.ChainFeeComponents, error)

func (*TONAccessor) GetChainFeePriceUpdate

func (a *TONAccessor) GetChainFeePriceUpdate(ctx context.Context, selectors []ccipocr3.ChainSelector) map[ccipocr3.ChainSelector]ccipocr3.TimestampedBig

func (*TONAccessor) GetContractAddress

func (a *TONAccessor) GetContractAddress(contractName string) ([]byte, error)

Common Accessor methods

func (*TONAccessor) GetExpectedNextSequenceNumber

func (a *TONAccessor) GetExpectedNextSequenceNumber(ctx context.Context, dest ccipocr3.ChainSelector) (ccipocr3.SeqNum, error)

func (*TONAccessor) GetFeeQuoterDestChainConfig

func (a *TONAccessor) GetFeeQuoterDestChainConfig(ctx context.Context, dest ccipocr3.ChainSelector) (ccipocr3.FeeQuoterDestChainConfig, error)

func (*TONAccessor) GetLatestPriceSeqNr

func (a *TONAccessor) GetLatestPriceSeqNr(ctx context.Context) (uint64, error)

func (*TONAccessor) GetTokenPriceUSD

func (a *TONAccessor) GetTokenPriceUSD(ctx context.Context, rawTokenAddress ccipocr3.UnknownAddress) (ccipocr3.TimestampedUnixBig, error)

func (*TONAccessor) LatestMessageTo

func (a *TONAccessor) LatestMessageTo(ctx context.Context, dest ccipocr3.ChainSelector) (ccipocr3.SeqNum, error)

func (*TONAccessor) MsgsBetweenSeqNums

func (a *TONAccessor) MsgsBetweenSeqNums(ctx context.Context, dest ccipocr3.ChainSelector, seqNumRange ccipocr3.SeqNumRange) ([]ccipocr3.Message, error)

TON as source chain methods

func (*TONAccessor) NextSeqNum

func (a *TONAccessor) NextSeqNum(ctx context.Context, sources []ccipocr3.ChainSelector) (seqNum map[ccipocr3.ChainSelector]ccipocr3.SeqNum, err error)

func (*TONAccessor) Nonces

func (*TONAccessor) Sync

func (a *TONAccessor) Sync(ctx context.Context, contractName string, contractAddress ccipocr3.UnknownAddress) error

Matching CCIP Plugins - default accessor w/ CR behavior CCIP contract discovery follows the same two-phase approach for TON: 1. Initial binding: Offramp address registered at startup (chainlink-ccip/pkg/reader/ccip.go:113-118) 2. Dynamic discovery: Onramp addresses discovered from offramp.SourceChainConfig (ccip.go:644-656)

Key implementation difference: - Default Accessor: Wraps ContractReader(CR) - delegates to CR's Bind() for event registration

  • Sync() calls contractReader.Bind() which registers event filters in EVM/SOL CR

- TON Accessor: Bypasses CR entirely - implements ChainAccessor interface directly

  • Sync() directly calls bindContractEvent() to register event filters with TON logPoller
  • Both expose same Sync() interface to CCIPChainReader

Jump to

Keyboard shortcuts

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