contracttransmitter

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultGasLimitOverride uint32 = 0

DefaultGasLimitOverride is passed to every offramp execute call. Zero means "use the gas limit from the message itself".

Variables

This section is empty.

Functions

func LogRestorePreambleFootprint

func LogRestorePreambleFootprint(lggr *zerolog.Logger, preamble *protocolrpc.RestorePreamble)

LogRestorePreambleFootprint decodes simulateTransaction.restorePreamble.transactionData (SorobanTransactionData XDR) and logs each footprint LedgerKey (read-only vs read-write), plus fee fields from the preamble and decoded Soroban data. Intended for debugging which archived ledger entries a RestoreFootprint tx would touch.

No-op if lggr is nil, preamble is nil, or transaction data is empty. Decode errors are logged at warn level.

Types

type ContractTransmitter

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

ContractTransmitter transmits aggregated reports to the Stellar OffRamp contract by calling its `execute` entry point via a Soroban invoker.

func NewContractTransmitterWithClient

func NewContractTransmitterWithClient(
	invoker bindings.Invoker,
	ccipOfframpAddress string,
	ccipStateChangedTopic string,
	rmnRemoteAddress string,
	lggr *zerolog.Logger,
) (*ContractTransmitter, error)

NewContractTransmitter creates a Stellar ContractTransmitter.

func (*ContractTransmitter) ConvertAndWriteMessageToChain

func (ct *ContractTransmitter) ConvertAndWriteMessageToChain(ctx context.Context, report protocol.AbstractAggregatedReport) error

ConvertAndWriteMessageToChain encodes the report into ScVal arguments and invokes OffRamp.execute on Stellar.

Stellar OffRamp.execute signature (Rust):

execute(env, encoded_message: Bytes, ccvs: Vec<Address>,
        verifier_results: Vec<Bytes>, gas_limit_override: u32)

type ContractTransmitterConfig

type ContractTransmitterConfig struct {
	// NetworkPassphrase is the Stellar network passphrase (e.g., "Standalone Network ; February 2017").
	NetworkPassphrase string `toml:"network_passphrase"`
	// OffRampContractID is the contract ID of the Stellar OffRamp contract.
	OffRampContractID string `toml:"offramp_contract_id"`
	// CCIPOfframpAddress is the address of the CCIP OffRamp contract.
	CCIPOfframpAddress string `toml:"ccip_offramp_address"`
	// CCIPStateChangedTopic is the topic of the CCIP StateChanged event.
	CCIPStateChangedTopic string `toml:"ccip_state_changed_topic"`
	// RMNRemoteAddress is the address of the RMN Remote contract.
	RMNRemoteAddress string `toml:"rmn_remote_address"`
}

ContractTransmitterConfig is the configuration required to create a Stellar contract transmitter.

Jump to

Keyboard shortcuts

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