Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MainNetConfig = MainConfiguration{ AddressPrefix: "mldev", ChainId: "8453", ProtocolVersion: "/mlayer/1.0.0", LogLevel: "error", DataDir: "./data/", ListenerAdresses: []string{ "/ip4/0.0.0.0/udp/5002/quic-v1", "/ip4/0.0.0.0/udp/5002/quic-v1/webtransport", "/ip4/0.0.0.0/tcp/6001", }, BootstrapPeers: []string{}, BootstrapNode: false, EvmRpcConfig: map[string]EthConfig{ "8453": { Name: "base-sepolia", Http: "https://snowy-multi-liquid.base-sepolia.quiknode.pro/7dac4517f70845dc1d5ee3ffe539fa43352fce9f/", Wss: "wss://snowy-multi-liquid.base-sepolia.quiknode.pro/7dac4517f70845dc1d5ee3ffe539fa43352fce9f/", TokenContract: "0xEdC160695971977326Ff10f285a6cd7dA6B2186c", XTokenContract: "0xBf58C54DA1c778D3f77c47332C1554bda1D95ea0", ChainInfoContract: "0x7b45C5Bf6b4f27E9ac0F9a6907656c2BE342c16F", SentryNodeContract: "0x9856c3B8d03937862C57b2330aF088684CA196c1", ValidatorNodeContract: "0x58E549288E64e4A1bcF80aeCfa3bb002E6C4742b", SubnetContract: "0x331bd4973dAC41F20aAB98856bB2cF3b691419a6", }, }, SQLDB: SqlConfig{ DbDialect: "sqlite", }, }
View Source
var TestNetConfig = MainConfiguration{ AddressPrefix: "mldev", ChainId: "84532", ProtocolVersion: "/mlayer/1.0.0", LogLevel: "info", DataDir: "./data/", ListenerAdresses: []string{ "/ip4/0.0.0.0/udp/5002/quic-v1", "/ip4/0.0.0.0/udp/5002/quic-v1/webtransport", "/ip4/0.0.0.0/tcp/6001", }, BootstrapPeers: []string{ "/ip4/154.12.228.25/udp/5002/quic-v1/p2p/12D3KooWFipGipTgu1XxtqpV1wUXcosTjK351Yip7Nj32npo68in", "/ip4/154.12.228.25/tcp/6001/p2p/12D3KooWFipGipTgu1XxtqpV1wUXcosTjK351Yip7Nj32npo68in", "/ip4/154.12.228.25/udp/5002/quic-v1/webtransport/certhash/uEiA-5eiPdqljQ0S7mQhfcjn63eLwp2yvx3IjMlerBP9n2A/certhash/uEiDByOLXkNBStJPkb5UE9g9wZKc1l0dCI76IiRTmAV3iAQ/p2p/12D3KooWFipGipTgu1XxtqpV1wUXcosTjK351Yip7Nj32npo68in", }, BootstrapNode: false, EvmRpcConfig: map[string]EthConfig{ "84532": { Name: "base-sepolia", Http: "https://snowy-multi-liquid.base-sepolia.quiknode.pro/7dac4517f70845dc1d5ee3ffe539fa43352fce9f/", Wss: "wss://snowy-multi-liquid.base-sepolia.quiknode.pro/7dac4517f70845dc1d5ee3ffe539fa43352fce9f/", TokenContract: "0xEdC160695971977326Ff10f285a6cd7dA6B2186c", XTokenContract: "0xBf58C54DA1c778D3f77c47332C1554bda1D95ea0", ChainInfoContract: "0x7b45C5Bf6b4f27E9ac0F9a6907656c2BE342c16F", SentryNodeContract: "0x9856c3B8d03937862C57b2330aF088684CA196c1", ValidatorNodeContract: "0x58E549288E64e4A1bcF80aeCfa3bb002E6C4742b", SubnetContract: "0x331bd4973dAC41F20aAB98856bB2cF3b691419a6", }, }, SQLDB: SqlConfig{ DbDialect: "sqlite", }, }
Functions ¶
This section is empty.
Types ¶
type EthConfig ¶ added in v1.2.0
type EthConfig struct { Name string `toml:"name"` Http string `toml:"http"` Wss string `toml:"wss"` TokenContract string `toml:"token_contract"` XTokenContract string `toml:"x_token_contract"` ChainInfoContract string `toml:"chain_info_contract"` SentryNodeContract string `toml:"sentry_node_contract"` ValidatorNodeContract string `toml:"validator_node_contract"` SubnetContract string `toml:"subnet_contract"` RegistryContract string `toml:"registry_contract"` }
type IpfsConfig ¶
type MLChainAPI ¶
type MLChainAPI struct {
// contains filtered or unexported fields
}
type MainConfiguration ¶
type MainConfiguration struct { AddressPrefix string `toml:"network_address_prefix"` // StakeContract string `toml:"stake_contract"` ChainId ChainId `toml:"chain_id"` // Token string `toml:"token_address"` // EVMRPCUrl string `toml:"evm_rpc_url"` // deprecated // EVMRPCHttp string `toml:"evm_rpc_http"` // EVMRPCWss string `toml:"evm_rpc_wss"` ProtocolVersion string `toml:"protocol_version"` ChannelMessageBufferSize uint `toml:"channel_message_buffer_size"` Ipfs IpfsConfig `toml:"ipfs"` LogLevel string `toml:"log_level"` BootstrapPeers []string `toml:"bootstrap_peers"` ListenerAdresses []string `toml:"listener_addresses"` RPCHost string `toml:"rpc_host"` WSAddress string `toml:"ws_address"` RestAddress string `toml:"rest_address"` RPCPort string `toml:"rpc_port"` RPCHttpPort string `toml:"rpc_http_port"` Validator bool `toml:"validator"` BootstrapNode bool `toml:"bootstrap_node"` DataDir string `toml:"data_dir"` KeyStoreDir string `toml:"keystore_dir"` SQLDB SqlConfig `toml:"sql"` MLBlockchainAPIUrl string `toml:"mlayer_api_url"` PrivateKey string `toml:"private_key"` EvmRpcConfig map[string]EthConfig `toml:"evm_rpc"` QuicHost string `toml:"quic_host"` PublicKey string OperatorAddress string PrivateKeyEDD []byte PublicKeyEDD []byte PrivateKeySECP []byte PublicKeySECP []byte OwnerAddress common.Address NoSync bool Context *context.Context SyncBatchSize uint }
var (
Config MainConfiguration
)
func Init ¶
func Init(testnet bool) *MainConfiguration
func LoadConfig ¶ added in v1.2.0
func LoadConfig(testnet bool) (*MainConfiguration, error)
Config = *c }
type SqlConfig ¶
type SqlConfig struct { DbDialect string `toml:"db_dialect"` DbHost string `toml:"db_host"` DbStoragePath string `toml:"db_storage_dir"` DbPort uint `toml:"db_port"` DbDatabase string `toml:"db_database"` DbUser string `toml:"db_user"` DbPassword string `toml:"db_password"` DbSSLMode string `toml:"db_sslmode"` DbTimezone string `toml:"db_timezone"` DbMaxOpenConns int `toml:"db_max_open_conns"` DbMaxIdleConns int `toml:"db_max_idle_conns"` DbMaxConnLifetime int `toml:"db_max_conn_lifetime_seconds"` }
Click to show internal directories.
Click to hide internal directories.