common

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StellarDeployerKeypairEnv   = "STELLAR_DEPLOYER_PRIVATE_KEY"
	StellarCCIPMessageSentTopic = "onramp_1_7_CCIPMessageSent"

	// StellarTransmitterKeyName is the full keystore path of the Ed25519 key used by
	// the Stellar accessor as the transmitter / deployer keypair when signing Soroban
	// transactions. The "stellar/tx/" prefix mirrors the "evm/tx/" convention used by
	// chainlink-ccv's executor.DefaultEVMTransmitterKeyName.
	StellarTransmitterKeyName = selectors.FamilyStellar + "/tx/stellar_transmitter_ed25519_key"
)
View Source
const DefaultStellarConfigPath = "/etc/config/stellar.toml"

TODO: This should be a global constant in the ccv package.

Variables

This section is empty.

Functions

func EncodeExtraArgsV3

func EncodeExtraArgsV3(args onrampbindings.GenericExtraArgsV3) ([]byte, error)

EncodeExtraArgsV3 converts a GenericExtraArgsV3 to XDR bytes suitable for the OnRamp contract's ExtraArgs field (parsed via GenericExtraArgsV3::from_xdr).

func EncodeStellarSourceExtraArgsForOnRamp

func EncodeStellarSourceExtraArgsForOnRamp(deployerGAddr, vvrContractID string, opts cciptestinterfaces.MessageOptions) ([]byte, error)

EncodeStellarSourceExtraArgsForOnRamp maps cciptest MessageOptions into the Soroban GenericExtraArgsV3 XDR blob expected by the Stellar OnRamp extra_args field (see EncodeExtraArgsV3). This is not EVM ABI extraArgs (GenericExtraArgsV1/V2 selectors): ABI bytes cause OnRamp::get_fee / forward_from_router to fail while parsing extra_args (host Error(Value, InvalidInput)).

We do not register this as cciptestinterfaces.ExtraArgsSerializer(FamilyStellar) because:

  1. ExtraArgsSerializer is func(MessageOptions) []byte with no chain context, but sensible defaults require the deployer account (mock executor) and VVR contract.
  2. That registry is keyed by destination family for EVM-style sends where the wire format follows the *destination* executor; Stellar OnRamp always consumes Soroban GenericExtraArgsV3 XDR regardless of destination, so dest-family lookup is the wrong axis for Stellar-as-source.

allowOutOfOrderExecution (MessageOptions.OutOfOrderExecution) is not represented on Soroban GenericExtraArgsV3 today; callers should still set it to true for parity with CCIP devenv policy — BuildChainMessage forces it before encoding.

func HexEncode

func HexEncode(b []byte) string

HexEncode returns b as a 0x-prefixed lowercase hex string.

func ToUnknownAddress

func ToUnknownAddress(addr string) (protocol.UnknownAddress, error)

ToUnknownAddress decodes a Stellar account (G…) or contract (C…) strkey into protocol.UnknownAddress (raw 32-byte contract ID or Ed25519 public key), matching bindings/scval.RawBytesFromAddressScVal for Soroban Address values.

Types

type Config

type Config struct {
	// ReaderConfigs is a map of chain selectors (as decimal strings) to reader
	// configurations.  The TOML key is "reader_configs".
	ReaderConfigs map[string]sourcereader.ReaderConfig `toml:"reader_configs"`
	// TransmitterConfigs is a map of chain selectors (as decimal strings) to transmitter
	// configurations.  The TOML key is "transmitter_configs".
	TransmitterConfigs map[string]contracttransmitter.ContractTransmitterConfig `toml:"transmitter_configs"`
	// DestinationReaderConfigs is a map of chain selectors (as decimal strings) to
	// destination reader configurations. The TOML key is "destination_reader_configs".
	DestinationReaderConfigs map[string]destinationreader.Config `toml:"destination_reader_configs"`
}

Jump to

Keyboard shortcuts

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