ccip_ton

package module
v0.0.0-...-dee172b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 46 Imported by: 0

README

CCIP16Devenv Implementation for TON network

Download chainlink-ccip repository, build the CLI and run

cd devenv
just cli
ccip up env.toml,../../chainlink-ton/devenv-impl/ton.toml # static CL node version
ccip up env.toml,env-cl-rebuild.toml,../../chainlink-ton/devenv-impl/ton.toml # rebuild CL node
ccip test smoke

Documentation

Index

Constants

View Source
const (
	EXECUTION_STATE_UNTOUCHED  = 0
	EXECUTION_STATE_INPROGRESS = 1
	EXECUTION_STATE_SUCCESS    = 2
	EXECUTION_STATE_FAILURE    = 3
)

Variables

View Source
var (
	// ErrTimeout is returned when event subscription times out
	ErrTimeout = errors.New("timed out waiting for events")
)

Functions

func GetNodeAddressFromBundle

func GetNodeAddressFromBundle(bundle *clclient.NodeKeysBundle) (string, error)

Types

type AnyMsgSentEvent

type AnyMsgSentEvent struct {
	SequenceNumber uint64
	// RawEvent contains the raw event depending on the chain:
	//  EVM:   *onramp.OnRampCCIPMessageSent
	//  Aptos: module_onramp.CCIPMessageSent
	RawEvent any
}

type CCIP16TON

type CCIP16TON struct {
	ExpectedSeqNumRange map[SourceDestPair]ccipocr3common.SeqNumRange
	ExpectedSeqNumExec  map[SourceDestPair][]uint64
	MsgSentEvents       []*AnyMsgSentEvent
	// contains filtered or unexported fields
}

func NewCCIP16TON

func NewCCIP16TON(ctx context.Context, e *deployment.Environment) (*CCIP16TON, error)

NewCCIP16TON creates new smart-contracts wrappers with utility functions for CCIP16TON implementation.

func NewEmptyCCIP16TON

func NewEmptyCCIP16TON() *CCIP16TON

func (*CCIP16TON) ConfigureNodes

func (m *CCIP16TON) ConfigureNodes(ctx context.Context, bc *blockchain.Input) (string, error)

func (*CCIP16TON) DeployLocalNetwork

func (m *CCIP16TON) DeployLocalNetwork(ctx context.Context, bc *blockchain.Input) (*blockchain.Output, error)

func (*CCIP16TON) ExposeMetrics

func (m *CCIP16TON) ExposeMetrics(
	ctx context.Context,
	source, dest uint64,
	chainIDs []string,
	wsURLs []string,
) ([]string, *prometheus.Registry, error)

func (*CCIP16TON) FundNodes

func (m *CCIP16TON) FundNodes(ctx context.Context, cls []*simple_node_set.Input, nodeKeyBundles map[string]clclient.NodeKeysBundle, bc *blockchain.Input, linkAmount, nativeAmount *big.Int) error

func (*CCIP16TON) GetEOAReceiverAddress

func (m *CCIP16TON) GetEOAReceiverAddress(ctx context.Context, chainSelector uint64) ([]byte, error)

func (*CCIP16TON) GetExpectedNextSequenceNumber

func (m *CCIP16TON) GetExpectedNextSequenceNumber(ctx context.Context, from, to uint64) (uint64, error)

func (*CCIP16TON) GetTokenBalance

func (m *CCIP16TON) GetTokenBalance(ctx context.Context, chainSelector uint64, address, tokenAddress []byte) (*big.Int, error)

func (*CCIP16TON) PostDeployContractsForSelector

func (m *CCIP16TON) PostDeployContractsForSelector(ctx context.Context, env *deployment.Environment, cls []*simple_node_set.Input, selector uint64, ccipHomeSelector uint64, crAddr string) error

func (*CCIP16TON) PreDeployContractsForSelector

func (m *CCIP16TON) PreDeployContractsForSelector(ctx context.Context, env *deployment.Environment, cls []*simple_node_set.Input, selector uint64, ccipHomeSelector uint64, crAddr string) error

func (*CCIP16TON) SendMessage

func (m *CCIP16TON) SendMessage(ctx context.Context, src, dest uint64, fields any, opts any) error

func (*CCIP16TON) SetCLDF

func (m *CCIP16TON) SetCLDF(e *deployment.Environment)

func (*CCIP16TON) WaitOneExecEventBySeqNo

func (m *CCIP16TON) WaitOneExecEventBySeqNo(ctx context.Context, from, to, seq uint64, timeout time.Duration) (any, error)

WaitOneExecEventBySeqNo wait and fetch strictly one ExecutionStateChanged event by sequence number and selector.

func (*CCIP16TON) WaitOneSentEventBySeqNo

func (m *CCIP16TON) WaitOneSentEventBySeqNo(ctx context.Context, from, to, seq uint64, timeout time.Duration) (any, error)

WaitOneSentEventBySeqNo wait and fetch strictly one CCIPMessageSent event by selector and sequence number and selector.

type CommitReportTracker

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

func NewCommitReportTracker

func NewCommitReportTracker(sourceChainSelector uint64, seqNrs ccipocr3common.SeqNumRange) CommitReportTracker

type SourceDestPair

type SourceDestPair struct {
	SourceChainSelector uint64
	DestChainSelector   uint64
}

Jump to

Keyboard shortcuts

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