Documentation
¶
Index ¶
- type BeholderConfig
- type CCIPAPIConfig
- type CCV
- type CCVAPIConfig
- type Config
- type ContractIdentifier
- type Executor
- type ExecutorAPIConfig
- type Factory
- type FactoryType
- type FeeToken
- type GlobalAPIConfig
- type MonitoringConfig
- type NodeConfig
- type Registry
- type RegistryAPIConfig
- type ServerConfig
- type TokenPool
- type TokenPoolAPIConfig
- type TokenPoolType
- type TokenStandardAPIConfig
- type TokenType
- type TransferPreapproval
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeholderConfig ¶
type BeholderConfig struct {
InsecureConnection bool `toml:"insecure_connection"`
CACertFile string `toml:"ca_cert_file"`
OtelExporterGRPCEndpoint string `toml:"otel_exporter_grpc_endpoint"`
OtelExporterHTTPEndpoint string `toml:"otel_exporter_http_endpoint"`
LogStreamingEnabled bool `toml:"log_streaming_enabled"`
MetricReaderInterval int64 `toml:"metric_reader_interval"`
TraceSampleRatio float64 `toml:"trace_sample_ratio"`
TraceBatchTimeout int64 `toml:"trace_batch_timeout"`
}
type CCIPAPIConfig ¶
type CCIPAPIConfig struct {
Enabled bool `toml:"enabled"`
// CcipOwner is the party that owns all the CCIP contracts (OnRamp, OffRamp, ...) and
// receives the fees paid in the fee token.
CcipOwner string `toml:"ccip_owner" validate:"required_if=Enabled true,omitempty"`
PerPartyRouterFactory ContractIdentifier `toml:"per_party_router_factory" validate:"required_if=Enabled true,omitempty"`
OnRamp ContractIdentifier `toml:"on_ramp" validate:"required_if=Enabled true,omitempty"`
OffRamp ContractIdentifier `toml:"off_ramp" validate:"required_if=Enabled true,omitempty"`
GlobalConfig ContractIdentifier `toml:"global_config" validate:"required_if=Enabled true,omitempty"`
TokenAdminRegistry ContractIdentifier `toml:"token_admin_registry" validate:"required_if=Enabled true,omitempty"`
RMNRemote ContractIdentifier `toml:"rmn_remote" validate:"required_if=Enabled true,omitempty"`
FeeQuoter ContractIdentifier `toml:"fee_quoter" validate:"required_if=Enabled true,omitempty"`
// FeeTokens configures the supported fee tokens, keyed by an alias that uniquely identifies
// the fee token within this config. A fee token itself is uniquely identified by the
// combination of its token id and admin party.
// If a fee token has a factory configured, the CCIP API returns the transfer factory
// disclosures for the fee token, otherwise clients have to get these from the
// TransferFactory API themselves.
FeeTokens map[string]FeeToken `toml:"fee_tokens" validate:"dive"`
}
type CCV ¶
type CCV struct {
ContractIdentifier
}
type CCVAPIConfig ¶
type Config ¶
type Config struct {
ChainSelector string `toml:"chain_selector" validate:"required"`
Server ServerConfig `toml:"server" validate:"required"`
Node NodeConfig `toml:"node" validate:"required"`
Monitoring MonitoringConfig `toml:"monitoring"`
// API Configs
GlobalAPIConfig GlobalAPIConfig `toml:"global_api"`
CCIPAPIConfig CCIPAPIConfig `toml:"ccip_api"`
CCVAPIConfig CCVAPIConfig `toml:"ccv_api"`
ExecutorAPIConfig ExecutorAPIConfig `toml:"executor_api"`
TokenPoolAPIConfig TokenPoolAPIConfig `toml:"token_pool_api"`
TokenStandardAPIConfig TokenStandardAPIConfig `toml:"token_standard_api"`
RegistryAPIConfig RegistryAPIConfig `toml:"registry_api"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
func ReadAndMerge ¶
ReadAndMerge merges multiple configs in low->high preceding order. Later passed readers will take precedence over earlier ones.
func (*Config) Merge ¶
Merge merges the in config into cfg and returns cfg. Any unexported/unset/zero-value field will be ignored. If in is nil, no merge will be performed and cfg will be returned as-is.
Token pool entries are merged separately by contract-address key: mergo cannot merge struct values inside maps correctly, so token_pool_api.token_pools uses a manual per-key merge.
type ContractIdentifier ¶
type ContractIdentifier struct {
PartyID string `toml:"party_id" validate:"required"`
InstanceAddress contracts.InstanceAddress `toml:"instance_address" validate:"required"`
}
ContractIdentifier uniquely identifies a contract using an InstanceAddress. It also contains a PartyID of a party that must be a stakeholder on the contract. This party will be used to retrieve contracts from the Active Contract Set, it can be the same party that owns the contract, but does not have to be.
type Executor ¶
type Executor struct {
ContractIdentifier
}
type ExecutorAPIConfig ¶
type Factory ¶
type Factory struct {
Type FactoryType `toml:"type" validate:"oneof='' address url urlRequests"`
TemplateId *string `toml:"template_id" validate:"required_if=Type address"`
Party *string `toml:"party" validate:"required_if=Type address"`
InstanceAddress *contracts.InstanceAddress `toml:"instance_address" validate:"required_if=Type address"`
TokenStandardURL *string `` /* 156-byte string literal not displayed */
TokenStandardAuthConfig *authConfig.AuthConfig `toml:"token_standard_auth" validate:"excluded_unless=Type url|excluded_unless=Type urlRequests"`
}
type FactoryType ¶
type FactoryType string
const ( FactoryTypeDisabled FactoryType = "" FactoryTypeAddress FactoryType = "address" FactoryTypeURL FactoryType = "url" FactoryTypeURLRequests FactoryType = "urlRequests" )
type FeeToken ¶ added in v1.1.0
type FeeToken struct {
// TokenId is the token id of the fee token's instrument.
TokenId string `toml:"token_id" validate:"required"`
// Admin is the admin party of the fee token's instrument.
Admin string `toml:"admin" validate:"required"`
// Factory is the transfer factory configuration for the fee token, optional.
Factory *Factory `toml:"factory" validate:"omitnil"`
}
FeeToken configures a token that can be used to pay CCIP message fees.
type GlobalAPIConfig ¶
type GlobalAPIConfig struct {
// The maximum number of disclosures that can be requested in a single batch request.
MaxBatchSize int `toml:"max_batch_size" validate:"required"`
}
type MonitoringConfig ¶
type MonitoringConfig struct {
Enabled bool `toml:"enabled"`
Beholder BeholderConfig `toml:"beholder" validate:"required_if=Enabled true"`
}
type NodeConfig ¶
type NodeConfig struct {
URL string `toml:"url" validate:"required,url"`
AuthConfig authConfig.AuthConfig `toml:"auth" validate:"required"`
MaxRetries int `toml:"max_retries"`
}
type Registry ¶
type Registry struct {
ContractIdentifier
TokenType TokenType `toml:"token_type" validate:"required,oneof=LINK"`
TokenId string `toml:"token_id" validate:"required"`
TokenName string `toml:"token_name"`
TokenSymbol string `toml:"token_symbol"`
}
type RegistryAPIConfig ¶
type RegistryAPIConfig struct {
Enabled bool `toml:"enabled"`
PartyID string `toml:"party_id" validate:"required_if=Enabled true"`
// TokenStandardURL is the base URL of the token-standard (DA registry) backend used to
// resolve burn-mint/transfer factories for discovered pools (URL factory mode — resolved
// over HTTP at serve time, so EDS needs no ledger visibility into the factory contract).
// Required when enabled: without it, discovered pools get no factory and send/execute
// aborts on-ledger (the pool requires the factory CID in the choice context).
TokenStandardURL string `toml:"token_standard_url" validate:"required_if=Enabled true,omitempty,url"`
}
RegistryAPIConfig configures EDS's registry observer party, used to detect Registry-deployed token pools that name it as an observer. PartyID is EDS's own party - it is never a pool's owner party, which is a separate, per-pool party EDS has no rights over.
type ServerConfig ¶
type TokenPool ¶
type TokenPool struct {
ContractIdentifier
Type TokenPoolType `toml:"type" validate:"required,oneof=lockRelease burnMint"`
// The owner party of the token pool.
PoolOwner string `toml:"pool_owner" validate:"required"`
Factory *Factory `toml:"factory" validate:"omitnil"`
TransferPreapproval *TransferPreapproval `toml:"transfer_preapproval" validate:"omitnil"`
}
type TokenPoolAPIConfig ¶
type TokenPoolAPIConfig struct {
Enabled bool `toml:"enabled"`
// TokenPools is keyed by instance_address (contracts.InstanceAddress.Hex()) so layered configs merge per pool.
// Not required_if=Enabled true: an instance running purely on registry-discovered pools may start with none.
TokenPools map[string]TokenPool `toml:"token_pools" validate:"dive"`
}
type TokenPoolType ¶
type TokenPoolType string
const ( TokenPoolTypeLockRelease TokenPoolType = "lockRelease" TokenPoolTypeBurnMint TokenPoolType = "burnMint" )
type TokenStandardAPIConfig ¶
type TokenStandardAPIConfig struct {
Enabled bool `toml:"enabled"`
// The duration for which to cache a token's totalSupply.
// Defaults to 10 seconds if not specified.
SupplyCacheTTL time.Duration `toml:"supply_cache_ttl"`
Admin string `toml:"admin" validate:"required_if=Enabled true"`
Registries map[string]Registry `toml:"registries" validate:"required_if=Enabled true,dive"`
}