Documentation
¶
Index ¶
Constants ¶
const ( StellarDeployerKeypairEnv = "STELLAR_DEPLOYER_PRIVATE_KEY" StellarCCIPMessageSentTopic = "onramp_1_7_CCIPMessageSent" )
const DefaultStellarConfigPath = "/etc/config/stellar.toml"
TODO: This should be a global constant in the ccv package.
const StellarTransmitterKeyName = deployment.StellarTransmitterKeyName
StellarTransmitterKeyName re-exports deployment.StellarTransmitterKeyName.
The canonical definition lives in the deployment package so that deployment/adapters can reference it without importing ccv/common (which would recreate the old ccv <-> deployment cycle). It is re-exported here so the cmd binaries (committee-verifier, executor) and the accessor can reference it through the ccv module, keeping the root module from taking a direct dependency on deployment for a single constant.
Variables ¶
var ( UseDefaultExecutorTag = [4]byte{0x72, 0x06, 0x8b, 0x37} NoExecutionTag = [4]byte{0xeb, 0xa5, 0x17, 0xd2} )
Executor sentinel tags — must match contracts/common/message/src/lib.rs (GenericExtraArgsV3::USE_DEFAULT_TAG / NO_EXECUTION_TAG). Each is a 4-byte tag left-aligned in a 32-byte Soroban contract Address; the OnRamp recognises these instead of the EVM address(0)/NO_EXECUTION_ADDRESS sentinels (Soroban Address has no zero value), so no GenericExtraArgsV3 schema change is needed. Go cannot express array constants, so these are package vars (treat as read-only).
var NoExecutionAddressRaw = append(NoExecutionTag[:], make([]byte, 28)...)
NoExecutionAddressRaw is the 32-byte "no auto-execution" sentinel Address (EVM NO_EXECUTION_ADDRESS parity). The OnRamp leaves it in place and zeroes the executor flat fee + execution-gas cost while still emitting the executor receipt with the sentinel as issuer.
var UseDefaultExecutorAddressRaw = append(UseDefaultExecutorTag[:], make([]byte, 28)...)
UseDefaultExecutorAddressRaw is the 32-byte "use the lane's default_executor" sentinel Address (EVM address(0) parity). The OnRamp resolves it to dest_config.default_executor before compute_ccv_and_executor_hash and before Executor::get_fee, so a sender can request the default executor without knowing its concrete address. Use this as the default for the executor field when a caller supplies no explicit executor: the OnRamp then targets the deployed Executor contract instead of an uninitialized mock address (which would trap with Error(Storage, MissingValue) on the new cross-contract get_fee call).
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 ExecutorSentinelStrkey ¶
ExecutorSentinelStrkey returns the VersionByteContract strkey form of a 32-byte executor sentinel, i.e. the form placed in GenericExtraArgsV3.executor and emitted as the executor receipt Issuer.
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"`
}