testadapter

package
v0.0.0-...-a48190a Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 54 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CCIPSendMinValue           = tlb.MustFromTON("0.364")
	CCIPSendWithTokensMinValue = tlb.MustFromTON("0.518") // exact calculated value is 0.517500012
)

Router_Costs.CCIPSend(false/true) from contracts/contracts/ccip/router/messages.tolk.

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

Functions

func NewTONAdapter

func NewTONAdapter(env *deployment.Environment, selector uint64) testadapters.TestAdapter

func SendCCIPMessage

func SendCCIPMessage(
	ctx context.Context,
	chain cldf_ton.Chain,
	state testadapters.StateProvider,
	sourceChain uint64,
	msg router.CCIPSend) (uint64, any, error)

SendCCIPMessage sends a CCIP request from a TON chain using the standard router.CCIPSend message.

Types

type TONAdapter

type TONAdapter struct {
	cldf_ton.Chain
	// contains filtered or unexported fields
}

func (*TONAdapter) AllowRouterToWithdrawTokens

func (a *TONAdapter) AllowRouterToWithdrawTokens(ctx context.Context, tokenAddress string, amount *big.Int) error

AllowRouterToWithdrawTokens deposits amount jettons into the deployer's Router-owned on-ramp account, from which the Router withdraws them on each CCIPSend with token amounts. It also funds the lockbox pool's liquidity so the pool can release tokens when TON is the destination.

func (*TONAdapter) BuildMessage

func (a *TONAdapter) BuildMessage(components testadapters.MessageComponents) (any, error)

func (*TONAdapter) CCIPReceiver

func (a *TONAdapter) CCIPReceiver() []byte

func (*TONAdapter) CurrentBlock

func (a *TONAdapter) CurrentBlock(t *testing.T) uint64

func (*TONAdapter) EOAReceiver

func (a *TONAdapter) EOAReceiver(t *testing.T) []byte

func (*TONAdapter) GetExtraArgs

func (a *TONAdapter) GetExtraArgs(receiver []byte, sourceFamily string, opts ...testadapters.ExtraArgOpt) ([]byte, error)

func (*TONAdapter) GetInboundNonce

func (a *TONAdapter) GetInboundNonce(ctx context.Context, sender []byte, srcSel uint64) (uint64, error)

func (*TONAdapter) GetRegistryAddress

func (a *TONAdapter) GetRegistryAddress() (string, error)

func (*TONAdapter) GetTokenBalance

func (a *TONAdapter) GetTokenBalance(ctx context.Context, tokenAddress string, ownerAddress []byte) (*big.Int, error)

GetTokenBalance returns the balance of the off-ramp deposit account where the Router delivers tokenAddress jettons for ownerAddress.

func (*TONAdapter) GetTokenExpansionConfig

func (a *TONAdapter) GetTokenExpansionConfig() (*tokensapi.TokenExpansionInputPerChain, error)

func (*TONAdapter) InvalidAddresses

func (a *TONAdapter) InvalidAddresses() [][]byte

func (*TONAdapter) LowGasLimit

func (a *TONAdapter) LowGasLimit() *big.Int

func (*TONAdapter) NativeFeeToken

func (a *TONAdapter) NativeFeeToken() string

func (*TONAdapter) RMNCursed

func (a *TONAdapter) RMNCursed(t *testing.T, chainSelector uint64, cursed bool) error

func (*TONAdapter) SendMessage

func (a *TONAdapter) SendMessage(ctx context.Context, destChainSelector uint64, m any) (uint64, string, error)

func (*TONAdapter) SetAllowlist

func (a *TONAdapter) SetAllowlist(t *testing.T, destChainSelector uint64, enabled bool) error

func (*TONAdapter) SetReceiverRejectAll

func (a *TONAdapter) SetReceiverRejectAll(ctx context.Context, t *testing.T, rejectAll bool) error

func (*TONAdapter) UpdateSenderAllowlistStatus

func (a *TONAdapter) UpdateSenderAllowlistStatus(t *testing.T, destChainSelector uint64, included bool) error

func (*TONAdapter) ValidateCommit

func (a *TONAdapter) ValidateCommit(t *testing.T, sourceSelector uint64, startBlock *uint64, seqNumRange ccipocr3.SeqNumRange)

func (*TONAdapter) ValidateExecFails

func (a *TONAdapter) ValidateExecFails(t *testing.T, sourceSelector uint64, startBlock *uint64, seqNrs []uint64)

func (*TONAdapter) ValidateExecSucceeds

func (a *TONAdapter) ValidateExecSucceeds(t *testing.T, sourceSelector uint64, startBlock *uint64, seqNrs []uint64) (execStates map[uint64]int)

Jump to

Keyboard shortcuts

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