config

package
v1.22.21 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package config defines configuration types for the DEX VM.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// IndexAllowIncomplete enables indexing of incomplete blocks
	IndexAllowIncomplete bool `json:"indexAllowIncomplete"`
	// IndexTransactions enables transaction indexing
	IndexTransactions bool `json:"indexTransactions"`
	// ChecksumsEnabled enables merkle checksum verification
	ChecksumsEnabled bool `json:"checksumsEnabled"`

	// DefaultSwapFeeBps is the default swap fee in basis points (100 = 1%)
	DefaultSwapFeeBps uint16 `json:"defaultSwapFeeBps"`
	// ProtocolFeeBps is the protocol fee in basis points
	ProtocolFeeBps uint16 `json:"protocolFeeBps"`
	// MaxSlippageBps is the maximum allowed slippage in basis points
	MaxSlippageBps uint16 `json:"maxSlippageBps"`

	// MinLiquidity is the minimum liquidity required for a pool
	MinLiquidity uint64 `json:"minLiquidity"`
	// MaxPoolsPerPair is the maximum number of pools allowed per token pair
	MaxPoolsPerPair uint16 `json:"maxPoolsPerPair"`

	// OrderbookConfig
	MaxOrdersPerAccount uint32        `json:"maxOrdersPerAccount"`
	MaxOrderSize        uint64        `json:"maxOrderSize"`
	MinOrderSize        uint64        `json:"minOrderSize"`
	OrderExpirationTime time.Duration `json:"orderExpirationTime"`

	// Cross-chain configuration
	WarpEnabled     bool     `json:"warpEnabled"`
	TeleportEnabled bool     `json:"teleportEnabled"`
	TrustedChains   []ids.ID `json:"trustedChains"`

	// Block configuration
	BlockInterval  time.Duration `json:"blockInterval"`
	MaxBlockSize   uint64        `json:"maxBlockSize"`
	MaxTxsPerBlock uint32        `json:"maxTxsPerBlock"`
}

Config contains configuration parameters for the DEX VM.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the default configuration for the DEX VM.

Jump to

Keyboard shortcuts

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