swap

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 41 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BatchSizeConfigEnvName = envConfigPrefix + "WORKER_BATCH_SIZE"

	ClientTimeoutToFundConfigEnvName = envConfigPrefix + "CLIENT_TIMEOUT_TO_FUND"

	ExternalWalletFinalizationTimeoutConfigEnvName = envConfigPrefix + "EXTERNAL_WALLET_FINALIZATION_TIMEOUT"

	CoinbaseOnrampOrderTimeoutConfigEnvName = envConfigPrefix + "COINBASE_ONRAMP_ORDER_TIMEOUT"

	// The amounts a currency launch is charged: the original terms for legacy
	// or v0 initial purchase transactions, and the V2 terms for v1 initial
	// purchase transactions. These MUST be kept equal to the transaction
	// service's TRANSACTION_SERVICE_NEW_CURRENCY_PURCHASE_QUARKS,
	// TRANSACTION_SERVICE_NEW_CURRENCY_FEE_QUARKS and their V2 counterparts,
	// which are what a launch is actually validated and charged against.
	// Nothing checks the two agree, and a divergence silently misstates the
	// launch fee in transaction history.
	NewCurrencyPurchaseQuarksConfigEnvName = envConfigPrefix + "NEW_CURRENCY_PURCHASE_QUARKS"

	NewCurrencyFeeQuarksConfigEnvName = envConfigPrefix + "NEW_CURRENCY_FEE_QUARKS"

	NewCurrencyV2PurchaseQuarksConfigEnvName = envConfigPrefix + "NEW_CURRENCY_V2_PURCHASE_QUARKS"

	NewCurrencyV2FeeQuarksConfigEnvName = envConfigPrefix + "NEW_CURRENCY_V2_FEE_QUARKS"
)

Variables

This section is empty.

Functions

func New

func New(
	log *zap.Logger,
	data ocp_data.Provider,
	exchangeRateStore exchange.Store,
	reserveStore reserve.Store,
	vmIndexerClient indexerpb.IndexerClient,
	integration integration.Swap,
	solanaNoncePool *transaction.LocalNoncePool,
	coinbaseClient *coinbase.Client,
	configProvider ConfigProvider,
) (worker.Runtime, error)

Types

type ConfigProvider

type ConfigProvider func() *conf

ConfigProvider defines how config values are pulled

func WithEnvConfigs

func WithEnvConfigs() ConfigProvider

WithEnvConfigs returns configuration pulled from environment variables

Jump to

Keyboard shortcuts

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