config

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainID added in v0.1.26

type ChainID int

ChainID is a chain id enum

const (
	Unknown ChainID = iota
	BaseMainnet
	OptimismGoerli
	BaseAndromeda
	BaseSepolia
)

func (ChainID) Int added in v0.1.26

func (i ChainID) Int() int

func (ChainID) String added in v0.1.26

func (i ChainID) String() string

type ContractAddresses

type ContractAddresses struct {
	Core        string
	PerpsMarket string
	ERC7412     string
	Forwarder   string
}

ContractAddresses is a part of a PerpsvConfig struct with contract addresses

type FirstContractBlocks

type FirstContractBlocks struct {
	Core        uint64
	PerpsMarket uint64
}

FirstContractBlocks is a part of a config struct with default first block numbers used to filters contract logs

type Multicall added in v0.3.3

type Multicall struct {
	Retries int
	Wait    time.Duration
}

type PerpsvConfig

type PerpsvConfig struct {
	ChainID             ChainID
	RPC                 string
	ContractAddresses   *ContractAddresses
	FirstContractBlocks *FirstContractBlocks
	Multicall           *Multicall
	ConnectionTimeout   time.Duration
	ReadTimeout         time.Duration
}

PerpsvConfig is a type for lib configuration schema

func GetBaseAndromedaDefaultConfig added in v0.1.26

func GetBaseAndromedaDefaultConfig(rpcURL string) *PerpsvConfig

GetBaseAndromedaDefaultConfig is used to get default lib config for base goerli test net

func GetBaseMainnetDefaultConfig added in v0.3.1

func GetBaseMainnetDefaultConfig(rpcURL string) *PerpsvConfig

GetBaseMainnetDefaultConfig is used to get default lib config for base main net

func GetBaseSepoliaDefaultConfig added in v0.3.6

func GetBaseSepoliaDefaultConfig(rpcURL string) *PerpsvConfig

GetBaseSepoliaDefaultConfig is used to get default lib config for base sepolia test net

func GetOptimismGoerliDefaultConfig added in v0.1.26

func GetOptimismGoerliDefaultConfig(rpcURL string) *PerpsvConfig

GetOptimismGoerliDefaultConfig is used to get default lib config for goerli optimism test net

Jump to

Keyboard shortcuts

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