diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index 688dc9c..d058692 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -10,16 +10,16 @@ jobs: - uses: actions/checkout@v2 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable + + - name: Cache Rust artifacts + uses: Swatinem/rust-cache@v2 with: - profile: minimal - toolchain: stable - override: true + cache-on-failure: true + workspaces: rust - name: Build and Install Rust Project - run: | - cd rust - cargo install --path crates/mesc_cli + run: cargo install --path rust/crates/mesc_cli --profile dev - name: Set up Python uses: actions/setup-python@v2 diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml new file mode 100644 index 0000000..7630e50 --- /dev/null +++ b/.github/workflows/typescript.yml @@ -0,0 +1,46 @@ +name: TypeScript + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +defaults: + run: + working-directory: typescript + +env: + # enable debug logging + ACTIONS_RUNNER_DEBUG: true + +jobs: + build-lint-test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: typescript + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Lint, Format, & Typecheck + working-directory: typescript + run: | + bun run lint + bun run format + bun run typecheck + + - name: Build + run: bun run build + + - name: Test + run: bun run test diff --git a/.gitignore b/.gitignore index 45cae29..9b55d9e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,13 @@ TODO.md INTEGRATION.md PITCH.md *.json +!biome.json __pycache__ python/dist docs/book *.gif +node_modules +dist +.env +!.env.example +_ \ No newline at end of file diff --git a/README.md b/README.md index ac26bba..5e85ada 100644 --- a/README.md +++ b/README.md @@ -105,33 +105,38 @@ endpoints: list[Endpoint] = mesc.find_endpoints(chain_id=5) ###### rust ```rust -use mesc; -use mesc::MescError; +use mesc::{MescError, Endpoint}; +use std::collections::HashMap; type OptionalResult = Result, MescError>; type MultiResult = Result, MescError>; +type MetadataResult = Result, MescError>; + +// check whether mesc is enabled +let enabled: bool = mesc::is_mesc_enabled(); // get the default endpoint let endpoint: OptionalResult = mesc::get_default_endpoint(None); // get the default endpoint of a network -let endpoint: OptionalResult = mesc::get_endpoint_by_network(5, None); +let endpoint: OptionalResult = mesc::get_endpoint_by_network("5", None); // get the default network for a particular tool -let chain_id: OptionalResult = mesc::get_default_endpoint("xyz_tool"); +let chain_id: OptionalResult = mesc::get_default_endpoint(Some("xyz_tool")); // get the default endpoint of a network for a particular tool -let endpoint: OptionalResult = mesc::get_endpoint_by_network(5, "xyz_tool"); +let endpoint: OptionalResult = mesc::get_endpoint_by_network("5", Some("xyz_tool")); // get an endpoint by name let endpoint: OptionalResult = mesc::get_endpoint_by_name("local_goerli"); // parse a user-provided string into a matching endpoint // (first try 1. endpoint name, then 2. chain id, then 3. network name) -let endpoint: OptionalResult = mesc::get_endpoint_by_query(user_str, "xyz_tool"); +let user_str = "local_goerli"; +let endpoint: OptionalResult = mesc::get_endpoint_by_query(user_str, Some("xyz_tool")); // find all endpoints matching given criteria -let query = mesc::MultiEndpointQuery::new().chain_id(5); +let query = mesc::MultiEndpointQuery::new().chain_id("5").unwrap(); let endpoints: MultiResult = mesc::find_endpoints(query); ``` diff --git a/docs/src/setup.md b/docs/src/setup.md index c86b195..eabb06b 100644 --- a/docs/src/setup.md +++ b/docs/src/setup.md @@ -11,7 +11,7 @@ As described in the [quickstart](./quickstart.md), the `mesc.json` file is usual ## Alternative setup without a `mesc.json` -Sometimes it is convenient to configure a system without editing any files (e.g. inside a container, or on a network drive, or in a low-privilege environment). +Sometimes it is convenient to configure a system without editing any files (e.g. inside a container, or when creating lots of unit tests, or in a low-privilege environment). This can be accomplished with MESC by setting the `MESC_ENV` variable instead of the `MESC_PATH` variable. `MESC_ENV` should simply contain the JSON content of a MESC configuration. diff --git a/go/pkg/mesc/endpoint/io/serialization/json.go b/go/pkg/mesc/endpoint/io/serialization/json.go index c0062de..9e1f0fb 100644 --- a/go/pkg/mesc/endpoint/io/serialization/json.go +++ b/go/pkg/mesc/endpoint/io/serialization/json.go @@ -19,6 +19,21 @@ func DeserializeJSON(reader io.Reader) (*model.RPCConfig, error) { return jsonConfig.toModel(), nil } +// DeserializeEndpointMetadataJSON deserializes the given representation of endpoint metadata mapped by endpoint name. +func DeserializeEndpointMetadataJSON(reader io.Reader) (map[string]model.EndpointMetadata, error) { + var endpointJSONMetadata map[string]*jsonEndpoint + if decodeErr := json.NewDecoder(reader).Decode(&endpointJSONMetadata); decodeErr != nil { + return nil, fmt.Errorf("failed to decode endpoint metadata JSON: %w", decodeErr) + } + + endpoints := make(map[string]model.EndpointMetadata, len(endpointJSONMetadata)) + for endpointName, endpointJSON := range endpointJSONMetadata { + endpoints[endpointName] = endpointJSON.toModel() + } + + return endpoints, nil +} + func toOptionalChainID(v *string) *model.ChainID { if v == nil { return nil diff --git a/go/pkg/mesc/env.go b/go/pkg/mesc/env.go new file mode 100644 index 0000000..07a8938 --- /dev/null +++ b/go/pkg/mesc/env.go @@ -0,0 +1,348 @@ +package mesc + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "net/url" + "os" + "strconv" + "strings" + + "github.com/paradigmxyz/mesc/go/pkg/mesc/endpoint/io/serialization" + model "github.com/paradigmxyz/mesc/go/pkg/mesc/model" +) + +// ResolveRPCConfig resolves an RPC configuration per the MESC specification rules. +func ResolveRPCConfig(ctx context.Context) (*model.RPCConfig, error) { + byMode, hasByMode, err := resolveFromMode() + if err != nil { + return nil, fmt.Errorf("failed to resolve RPC configuration by mode: %w", err) + } else if hasByMode { + return applyOverrides(byMode) + } + + byPath, hasByPath, err := readRPCConfigFile() + if err != nil { + return nil, fmt.Errorf("failed to read RPC configuration from file: %w", err) + } else if hasByPath { + return applyOverrides(byPath) + } + + byEnv, hasByEnv, err := readRPCConfigEnv() + if err != nil { + return nil, fmt.Errorf("failed to read RPC configuration from env: %w", err) + } else if hasByEnv { + return applyOverrides(byEnv) + } + + return nil, fmt.Errorf("unable to resolve MESC configuration") +} + +func applyEndpointMetadataOverrides(rpcConfig *model.RPCConfig) error { + endpointMetadataOverrideJSON := os.Getenv("MESC_ENDPOINT_METADATA") + if endpointMetadataOverrideJSON == "" { + return nil + } + + endpointMetadataOverrides, err := serialization.DeserializeEndpointMetadataJSON(bytes.NewBufferString(endpointMetadataOverrideJSON)) + if err != nil { + return fmt.Errorf("failed to deserialize endpoint metadata overrides: %w", err) + } + + if rpcConfig.Endpoints == nil { + rpcConfig.Endpoints = make(map[string]model.EndpointMetadata) + } + + for endpointName, endpointMetadata := range endpointMetadataOverrides { + rpcConfig.Endpoints[endpointName] = endpointMetadata + } + + return nil +} + +func applyEndpointOverrides(rpcConfig *model.RPCConfig) error { + endpointOverrides := os.Getenv("MESC_ENDPOINTS") + if endpointOverrides == "" { + return nil + } + + endpoints := make(map[string]model.EndpointMetadata) + for _, endpoint := range strings.Split(endpointOverrides, " ") { + splitEndpoint := strings.Split(endpoint, "=") + if len(splitEndpoint) != 2 { + return fmt.Errorf("invalid endpoint override: '%s'", endpoint) + } + + endpoint := model.EndpointMetadata{} + endpointKey := splitEndpoint[0] + if strings.Contains(endpointKey, ":") { + splitKey := strings.Split(endpointKey, ":") + endpoint.Name = splitKey[0] + endpointKey = splitKey[0] + chainID := model.ChainID(splitKey[1]) + endpoint.ChainID = &chainID + } else { + endpoint.Name = splitEndpoint[0] + } + + endpoint.URL = splitEndpoint[1] + + endpoints[endpointKey] = endpoint + } + rpcConfig.Endpoints = endpoints + + return nil +} + +func applyGlobalMetadataOverride(rpcConfig *model.RPCConfig) error { + globalMetadataOverride := os.Getenv("MESC_GLOBAL_METADATA") + if globalMetadataOverride == "" { + return nil + } + + var globalMetadataOverrides map[string]any + if unmarshalErr := json.Unmarshal([]byte(globalMetadataOverride), &globalMetadataOverrides); unmarshalErr != nil { + return fmt.Errorf("failed to unmarshal global metadata override: %w", unmarshalErr) + } + + if rpcConfig.GlobalMetadata == nil { + rpcConfig.GlobalMetadata = make(map[string]any) + } + + for overrideName, overrideValue := range globalMetadataOverrides { + rpcConfig.GlobalMetadata[overrideName] = overrideValue + } + + return nil +} + +func applyNetworkDefaultsOverride(rpcConfig *model.RPCConfig) error { + networkDefaultsOverride := os.Getenv("MESC_NETWORK_DEFAULTS") + if networkDefaultsOverride == "" { + return nil + } + + networkDefaults := make(map[model.ChainID]string) + for _, networkDefault := range strings.Split(networkDefaultsOverride, " ") { + splitNetworkDefault := strings.Split(networkDefault, "=") + if len(splitNetworkDefault) != 2 { + return fmt.Errorf("invalid network default override: '%s'", networkDefault) + } + + networkDefaults[model.ChainID(splitNetworkDefault[0])] = splitNetworkDefault[1] + } + rpcConfig.NetworkDefaults = networkDefaults + + return nil +} + +func applyNetworkNamesOverride(rpcConfig *model.RPCConfig) error { + networkNameOverride := os.Getenv("MESC_NETWORK_NAMES") + if networkNameOverride == "" { + return nil + } + + networkNames := make(map[string]model.ChainID) + for _, networkName := range strings.Split(networkNameOverride, " ") { + splitNetworkName := strings.Split(networkName, "=") + if len(splitNetworkName) != 2 { + return fmt.Errorf("invalid network name overide: '%s'", networkName) + } + + networkNames[splitNetworkName[0]] = model.ChainID(splitNetworkName[1]) + } + rpcConfig.NetworkNames = networkNames + + return nil +} + +func applyOverrides(rpcConfig *model.RPCConfig) (*model.RPCConfig, error) { + if err := applyNetworkDefaultsOverride(rpcConfig); err != nil { + return nil, fmt.Errorf("failed to apply network defaults overrides: %w", err) + } + + if err := applyNetworkNamesOverride(rpcConfig); err != nil { + return nil, fmt.Errorf("failed to apply network names overrides: %w", err) + } + + if err := applyEndpointOverrides(rpcConfig); err != nil { + return nil, fmt.Errorf("failed apply endpoint overrides: %w", err) + } + + if err := applyProfileOverrides(rpcConfig); err != nil { + return nil, fmt.Errorf("failed to apply profile overrides: %w", err) + } + + if err := applyGlobalMetadataOverride(rpcConfig); err != nil { + return nil, fmt.Errorf("failed to apply global metadata overrides: %w", err) + } + + if err := applyEndpointMetadataOverrides(rpcConfig); err != nil { + return nil, fmt.Errorf("failed to apply endpoint metadata overrides: %w", err) + } + + if defaultEndpointOverride := os.Getenv("MESC_DEFAULT_ENDPOINT"); defaultEndpointOverride != "" { + rpcConfig.DefaultEndpoint = &defaultEndpointOverride + synthesizeEndpoint(rpcConfig, defaultEndpointOverride) + } + + return rpcConfig, nil +} + +func applyProfileOverrides(rpcConfig *model.RPCConfig) error { + profileOverrides := os.Getenv("MESC_PROFILES") + if profileOverrides == "" { + return nil + } + + profiles := make(map[string]*model.Profile) + for _, profileOverride := range strings.Split(profileOverrides, " ") { + keyValue := strings.Split(profileOverride, "=") + if len(keyValue) != 2 { + return fmt.Errorf("invalid profile override: '%s'", profileOverride) + } + + keyParts := strings.Split(keyValue[0], ".") + if len(keyParts) < 2 { + return fmt.Errorf("invalid key in profile override key/value pair: '%s'", profileOverride) + } + + profile, hasProfile := profiles[keyParts[0]] + if !hasProfile { + profile = &model.Profile{ + Name: keyParts[0], + } + profiles[keyParts[0]] = profile + } + + switch keyParts[1] { + case "default_endpoint": + profile.DefaultEndpoint = &keyValue[1] + case "network_defaults": + if len(keyParts) < 3 { + return fmt.Errorf("invalid network default setting in profile override: '%s'", profileOverride) + } + + networkDefaults := profile.NetworkDefaults + if networkDefaults == nil { + networkDefaults = make(map[model.ChainID]string) + profile.NetworkDefaults = networkDefaults + } + networkDefaults[model.ChainID(keyParts[2])] = keyValue[1] + case "profile_metadata": + if len(keyParts) < 3 { + return fmt.Errorf("invalid profile metadata setting in profile override: '%s'", profileOverride) + } + + profileMetadata := profile.ProfileMetadata + if profileMetadata == nil { + profileMetadata = make(map[string]any) + profile.ProfileMetadata = profileMetadata + } + profileMetadata[keyParts[2]] = keyValue[1] + case "use_mesc": + parsedBool, parseErr := strconv.ParseBool(keyValue[1]) + if parseErr != nil { + return fmt.Errorf("invalid use_mesc setting in profile override: '%s'", profileOverride) + } + + profile.UseMESC = parsedBool + default: + return fmt.Errorf("unrecognized profile override setting: '%s'", profileOverride) + } + } + + dereffedProfiles := make(map[string]model.Profile, len(profiles)) + for profileName, profile := range profiles { + dereffedProfiles[profileName] = *profile + } + rpcConfig.Profiles = dereffedProfiles + + return nil +} + +func readRPCConfigBytes(jsonBytes []byte) (*model.RPCConfig, error) { + rpcConfig, serializationErr := serialization.DeserializeJSON(bytes.NewBuffer(jsonBytes)) + if serializationErr != nil { + return nil, fmt.Errorf("failed to deserialize JSON: %w", serializationErr) + } + + return rpcConfig, nil +} + +func readRPCConfigEnv() (*model.RPCConfig, bool, error) { + mescJSON := os.Getenv("MESC_ENV") + if mescJSON == "" { + return nil, false, nil + } + + rpcConfig, err := readRPCConfigBytes([]byte(mescJSON)) + if err != nil { + return nil, false, fmt.Errorf("failed to unmarshal RPC config JSON from env var: %w", err) + } + + return rpcConfig, true, nil +} + +func readRPCConfigFile() (*model.RPCConfig, bool, error) { + filePath := os.Getenv("MESC_PATH") + if filePath == "" { + return nil, false, nil + } + + jsonBytes, err := os.ReadFile(filePath) + if err != nil { + return nil, false, fmt.Errorf("failed to read RPC configuration from file '%s': %w", filePath, err) + } + + rpcConfig, err := readRPCConfigBytes(jsonBytes) + if err != nil { + return nil, false, fmt.Errorf("failed to unmarshal RPC config JSON from file '%s': %w", filePath, err) + } + + return rpcConfig, true, nil +} + +func resolveFromMode() (*model.RPCConfig, bool, error) { + mescMode := os.Getenv("MESC_MODE") + switch strings.TrimSpace(mescMode) { + case "PATH": + return readRPCConfigFile() + case "ENV": + return readRPCConfigEnv() + default: + if mescMode != "" { + return nil, false, fmt.Errorf("invalid MESC_MODE value: '%s'", mescMode) + } + } + + return nil, false, nil +} + +func synthesizeEndpoint(rpcConfig *model.RPCConfig, endpointName string) { + endpoints := rpcConfig.Endpoints + if endpoints == nil { + endpoints = make(map[string]model.EndpointMetadata) + rpcConfig.Endpoints = endpoints + } + + syntheticEndpointName := endpointName + if url, parseErr := url.Parse(endpointName); parseErr == nil { + if host := url.Host; host != "" { + syntheticEndpointName = host + } else if scheme := url.Scheme; scheme != "" { + syntheticEndpointName = scheme + } + } + + if _, hasEndpoint := endpoints[syntheticEndpointName]; hasEndpoint { + return + } + + endpoints[syntheticEndpointName] = model.EndpointMetadata{ + Name: syntheticEndpointName, + URL: endpointName, + } +} diff --git a/go/pkg/mesc/env_test.go b/go/pkg/mesc/env_test.go new file mode 100644 index 0000000..56a8a0f --- /dev/null +++ b/go/pkg/mesc/env_test.go @@ -0,0 +1,292 @@ +package mesc_test + +import ( + "context" + "os" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/paradigmxyz/mesc/go/pkg/mesc" + "github.com/paradigmxyz/mesc/go/pkg/mesc/model" +) + +var _ = Describe("Env", func() { + var ctx context.Context + + BeforeEach(func() { + ctx = context.Background() + }) + + Context("reading from environmental variables", func() { + When("the mode is set to ENV", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_MODE", "ENV")).To(Succeed(), "setting the mode should succeed") + }) + + It("reads the configuration from the environment", func() { + Expect(setAndResetEnv("MESC_ENV", `{ "mesc_version": "MESC 1.0", "default_endpoint": "ethereum_env" }`)) + + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configuration should not fail") + Expect(rpcConfig).ToNot(BeNil(), "the resolved RPC configuration should not be nil") + Expect(rpcConfig.DefaultEndpoint).ToNot(BeNil(), "the RPC configuration should have a default endpoint set") + Expect(*rpcConfig.DefaultEndpoint).To(Equal("ethereum_env"), "the RPC config should be read from the environmental variable") + }) + }) + + When("there is no mode set", func() { + When("there is JSON in MESC_ENV", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_ENV", `{ "mesc_version": "MESC 1.0", "default_endpoint": "ethereum_env_nomode" }`)) + }) + + It("resolves the JSON from the environmental variable", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configuration should not fail") + Expect(rpcConfig).ToNot(BeNil(), "the resolved RPC configuration should not be nil") + Expect(rpcConfig.DefaultEndpoint).ToNot(BeNil(), "the RPC configuration should have a default endpoint set") + Expect(*rpcConfig.DefaultEndpoint).To(Equal("ethereum_env_nomode"), "the RPC config should be read from the environmental variable") + }) + }) + }) + }) + + Context("applying overrides", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_MODE", "ENV")).To(Succeed(), "setting the mode should not fail") + Expect(setAndResetEnv("MESC_ENV", `{ "mesc_version": "MESC 1.0" }`)).To(Succeed(), "setting the JSON env should not fail") + }) + + When("there is a default endpoint override", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_DEFAULT_ENDPOINT", "localhost.default:9999")).To(Succeed(), "setting the default endpoint override should succeed") + }) + + It("overrides the default endpoint", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configuration should not fail") + Expect(rpcConfig.DefaultEndpoint).ToNot(BeNil(), "the default endpoint should be set") + Expect(*rpcConfig.DefaultEndpoint).To(Equal("localhost.default:9999"), "the default endpoint override should be applied") + + // A synthesized endpoint should also be created + Expect(rpcConfig.Endpoints).To(And( + HaveLen(1), + HaveKey("localhost.default"), + ), "a synthesized endpoint with the host name should be created") + + endpoint := rpcConfig.Endpoints["localhost.default"] + Expect(endpoint.Name).To(Equal("localhost.default"), "the endpoint name should match its key") + Expect(endpoint.URL).To(Equal("localhost.default:9999"), "the endpoint should inherit the specified URL") + Expect(endpoint.ChainID).To(BeNil(), "no chain ID should be inferred") + }) + + When("the override is a URL with a scheme", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_DEFAULT_ENDPOINT", "http://localhost.schemed:9999")).To(Succeed(), "setting the default endpoint override should succeed") + }) + + It("extracts the host out as the endpoint name", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configuration should not fail") + + Expect(rpcConfig.Endpoints).To(And( + HaveLen(1), + HaveKey("localhost.schemed:9999"), + ), "a synthesized endpoint with the host name should be created") + }) + }) + + When("there is another endpoint configured with the name of the override", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_DEFAULT_ENDPOINT", "localhost.default")).To(Succeed(), "setting the default endpoint override should succeed") + Expect(setAndResetEnv("MESC_ENDPOINTS", "localhost.default=https://alchemy.com/default")).To(Succeed(), "setting the endpoint overrides should succeed") + }) + + It("does not synthesize a new endpoint", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configuration should not fail") + + Expect(rpcConfig.DefaultEndpoint).ToNot(BeNil(), "the default endpoint should be present") + Expect(*rpcConfig.DefaultEndpoint).To(Equal("localhost.default"), "the default endpoint should be correct") + + Expect(rpcConfig.Endpoints).To(And( + HaveLen(1), + HaveKey("localhost.default"), + ), "the existing endpoint should be re-used") + + endpoint := rpcConfig.Endpoints["localhost.default"] + Expect(endpoint.URL).To(Equal("https://alchemy.com/default"), "the URL of the endpoint should be correct") + }) + }) + }) + + When("there are network defaults set", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_NETWORK_DEFAULTS", "5=alchemy_optimism 1=local_mainnet")).To(Succeed(), "setting the network defaults override should succeed") + }) + + It("applies the network default overrides", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.NetworkDefaults).To(And( + HaveLen(2), + HaveKeyWithValue(model.ChainID("1"), "local_mainnet"), + HaveKeyWithValue(model.ChainID("5"), "alchemy_optimism"), + ), "the network default override should have been applied") + }) + }) + + When("there are network names set", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_NETWORK_NAMES", "zora=7777777 scroll=534352")).To(Succeed(), "setting the network names override should work") + }) + + It("applies the network names override", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.NetworkNames).To(And( + HaveLen(2), + HaveKeyWithValue("zora", model.ChainID("7777777")), + HaveKeyWithValue("scroll", model.ChainID("534352")), + ), "the network names override should be applied") + }) + }) + + When("there are endpoint overrides set", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_ENDPOINTS", "alchemy_optimism=https://alchemy.com/fjsj local_goerli:5=localhost:8545")).To(Succeed(), "setting the endpoint overrides should succeed") + }) + + It("applies the endpoint overrides", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.Endpoints).To(And( + HaveLen(2), + HaveKey("alchemy_optimism"), + HaveKey("local_goerli"), + ), "the endpoints should be loaded into the RPC configuration") + + optimismEndpoint := rpcConfig.Endpoints["alchemy_optimism"] + Expect(optimismEndpoint.Name).To(Equal("alchemy_optimism"), "the Optimism endpoint should inherit its key as its name") + Expect(optimismEndpoint.URL).To(Equal("https://alchemy.com/fjsj"), "the Optimism URL should be set") + Expect(optimismEndpoint.ChainID).To(BeNil(), "no chain ID should be set for the Optimism endpoint") + + goerliEndpoint := rpcConfig.Endpoints["local_goerli"] + Expect(goerliEndpoint.Name).To(Equal("local_goerli"), "the Goerli endpoint should inherit its key as its name") + Expect(goerliEndpoint.URL).To(Equal("localhost:8545"), "the Goerli endpoint should have the right URL") + Expect(goerliEndpoint.ChainID).ToNot(BeNil(), "the Goerli endpoint should have a chain ID set") + Expect(*goerliEndpoint.ChainID).To(Equal(model.ChainID("5")), "the Goerli endpoint should have the correct chain ID") + }) + }) + + When("there are profile overrides set", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_PROFILES", "foundry.default_endpoint=local_goerli foundry.network_defaults.5=alchemy_optimism foundry.profile_metadata.metadatum_key=metadatum_value foundry.use_mesc=true")).To(Succeed(), "setting the profiles override should not fail") + }) + + It("applies the profile overrides", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.Profiles).To(And( + HaveLen(1), + HaveKey("foundry"), + ), "the profile should be loaded") + + profile := rpcConfig.Profiles["foundry"] + Expect(profile.Name).To(Equal("foundry"), "the profile should inherit the key as the name") + Expect(profile.DefaultEndpoint).ToNot(BeNil(), "the profile should have a default endpoint") + Expect(*profile.DefaultEndpoint).To(Equal("local_goerli"), "the profile should have the correct default endpoint") + Expect(profile.NetworkDefaults).To(And( + HaveLen(1), + HaveKeyWithValue(model.ChainID("5"), "alchemy_optimism"), + ), "the profile should have the correct network defaults loaded") + Expect(profile.ProfileMetadata).To(And( + HaveLen(1), + HaveKeyWithValue("metadatum_key", "metadatum_value"), + ), "the profile should have the correct metadata") + Expect(profile.UseMESC).To(BeTrue(), "the profile should have MESC enabled") + }) + }) + + When("there is a global metadata override", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_GLOBAL_METADATA", `{ "bool_field": true, "string_field": "str_value" }`)) + }) + + It("assigns the configured metadata as global metadata", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.GlobalMetadata).To(And( + HaveLen(2), + HaveKeyWithValue("bool_field", true), + HaveKeyWithValue("string_field", "str_value"), + ), "the global metadata should be overridden") + }) + + When("the configuration already has global metadata set", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_ENV", `{ "mesc_version": "MESC 1.0", "global_metadata": { "keep_val": "do not lose" } }`)).To(Succeed(), "setting the JSON env should not fail") + }) + + It("overlays the override on top of the data", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.GlobalMetadata).To(And( + HaveLen(3), + HaveKeyWithValue("bool_field", true), + HaveKeyWithValue("string_field", "str_value"), + HaveKeyWithValue("keep_val", "do not lose"), + ), "the global metadata should be overlayed by what's set as an override") + }) + }) + }) + + When("there is an endpoint metadata override", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_ENDPOINT_METADATA", `{ "local_ethereum": { "url": "http://localhost:8545" } }`)) + }) + + It("overrides it with the set JSON", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.Endpoints).To(And( + HaveLen(1), + HaveKey("local_ethereum"), + ), "the RPC configuration should have the endpoint metadata loaded") + Expect(rpcConfig.Endpoints["local_ethereum"].URL).To(Equal("http://localhost:8545"), "the data for the endpoint should have been deserialized") + }) + + When("the RPC configuration already has endpoint metadata", func() { + BeforeEach(func() { + Expect(setAndResetEnv("MESC_ENV", `{ "mesc_version": "MESC 1.0", "endpoints": { "base_mainnet": { "url": "https://base.coinbase.com/rpc" }} }`)).To(Succeed(), "setting the JSON env should not fail") + }) + + It("overlays the existing configuration with the configured override", func() { + rpcConfig, err := mesc.ResolveRPCConfig(ctx) + Expect(err).ToNot(HaveOccurred(), "resolving the RPC configurations should not fail") + Expect(rpcConfig.Endpoints).To(And( + HaveLen(2), + HaveKey("base_mainnet"), + HaveKey("local_ethereum"), + ), "the RPC configuration should have the override endpoint metadata overlayed onto the pre-existing data") + }) + }) + }) + }) + + When("there is no resolvable RPC configuration", func() { + It("fails to resolve an RPC configuration", func() { + _, err := mesc.ResolveRPCConfig(ctx) + Expect(err).To(HaveOccurred(), "resolving the RPC configuration should fail") + Expect(err.Error()).To(Equal("unable to resolve MESC configuration"), "it should fail for the correct reason") + }) + }) +}) + +func setAndResetEnv(name string, value string) error { + originalValue := os.Getenv(name) + DeferCleanup(func() { + _ = os.Setenv(name, originalValue) + }) + return os.Setenv(name, value) +} diff --git a/go/pkg/mesc/mesc_suite_test.go b/go/pkg/mesc/mesc_suite_test.go new file mode 100644 index 0000000..5f0f30f --- /dev/null +++ b/go/pkg/mesc/mesc_suite_test.go @@ -0,0 +1,13 @@ +package mesc_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestMesc(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Mesc Suite") +} diff --git a/python/generate_network_names.py b/python/generate_network_names.py index 7dc3419..75a824b 100755 --- a/python/generate_network_names.py +++ b/python/generate_network_names.py @@ -8,16 +8,20 @@ This script creates the following files in the MESC repository: - ./python/mesc/network_names.py - ./rust/crates/mesc/src/network_names.rs """ + from __future__ import annotations import os -import requests from typing import Mapping, MutableMapping +import requests # specialcase the standard name for certain chains special_cases: Mapping[str, str] = { 'OP Mainnet': 'optimism', + 'Avalanche C-Chain': 'avalanche', + 'Arbitrum One': 'arbitrum', + 'BNB Smart Chain Mainnet': 'bsc', 'Genesis Coin': 'genesis_coin', 'X1 Network': 'x1_network', 'ThaiChain 2.0 ThaiFi': 'thaifi', @@ -59,6 +63,8 @@ def standardize_name(name: str) -> str: name = name.lower() name = name.replace(' ', '_') name = name.replace('-', '_') + name = name.replace('___', '_') + name = name.replace('__', '_') name = name.replace('(', '') name = name.replace(')', '') @@ -119,13 +125,16 @@ def generate_python_content(network_names: Mapping[str, str]) -> str: rust_path = '../rust/crates/mesc/src/network_names.rs' rust_template = """{preamble} -use crate::{{ChainId, TryIntoChainId}}; -use std::collections::HashMap; +use crate::ChainId; +use std::{{collections::HashMap, sync::OnceLock}}; /// get default mapping between chain_id's and network names -pub fn get_network_names() -> HashMap {{ - {name_data} +pub fn get_network_names() -> &'static HashMap {{ + static CACHE: OnceLock> = OnceLock::new(); + CACHE.get_or_init(|| NETWORKS.iter().map(|&(chain_id, name)| (chain_id.into(), name)).collect()) }} + +pub(crate) const NETWORKS: &[(u64, &str)] = &{name_data}; """ @@ -133,14 +142,8 @@ def generate_rust_content(network_names: Mapping[str, str]) -> str: rust_preamble = '\n'.join(('//! ' + line).strip() for line in preamble.split('\n')) name_data = '[' for chain_id, network_name in network_names.items(): - name_data += '\n ("' + chain_id + '", "' + network_name + '"),' - name_data += """\n ] - .into_iter() - .filter_map(|(chain_id, name)| match chain_id.try_into_chain_id() { - Ok(chain_id) => Some((chain_id, name.to_string())), - Err(_) => None, - }) - .collect()""" + name_data += '\n (' + chain_id + ', "' + network_name + '"),' + name_data += '\n]' return rust_template.format(preamble=rust_preamble, name_data=name_data) diff --git a/python/mesc/__init__.py b/python/mesc/__init__.py index 5d6e603..8b0e8f0 100644 --- a/python/mesc/__init__.py +++ b/python/mesc/__init__.py @@ -39,4 +39,4 @@ else: 'get_global_metadata', ) -__version__ = '0.2.0' +__version__ = '0.2.1' diff --git a/python/mesc/load.py b/python/mesc/load.py index baa4af3..ffdc67a 100644 --- a/python/mesc/load.py +++ b/python/mesc/load.py @@ -9,7 +9,7 @@ from . import overrides from . import validation if typing.TYPE_CHECKING: - from typing_extensions import cast, Literal, Any + from typing_extensions import Literal, Any from .types import RpcConfig @@ -41,7 +41,7 @@ def read_config_data() -> RpcConfig: # validate validation.validate(config) - return cast(RpcConfig, config) + return config # type: ignore @typing.overload @@ -72,9 +72,7 @@ def read_env_config(*, validate: bool = True) -> RpcConfig | Any: # validate config if validate: validation.validate(config) - return cast(RpcConfig, config) - else: - return config + return config @typing.overload @@ -124,6 +122,4 @@ def read_file_config( # validate config if validate: validation.validate(config) - return cast(RpcConfig, config) - else: - return config + return config diff --git a/python/mesc/network_names.py b/python/mesc/network_names.py index e074245..433e0b1 100644 --- a/python/mesc/network_names.py +++ b/python/mesc/network_names.py @@ -22,7 +22,7 @@ network_names = { '13': 'diode_testnet_staging', '14': 'flare', '15': 'diode_prenet', - '16': 'flare_testnet_coston', + '16': 'songbird_testnet_coston', '17': 'thaifi', '18': 'thundercore_testnet', '19': 'songbird_canary', @@ -62,7 +62,7 @@ network_names = { '53': 'coinex_testnet', '54': 'openpiece', '55': 'zyx', - '56': 'bnb', + '56': 'bsc', '57': 'syscoin', '58': 'ontology', '59': 'eos_evm_legacy', @@ -94,8 +94,8 @@ network_names = { '85': 'gate_testnet', '86': 'gate', '87': 'nova', - '88': 'tomo', - '89': 'tomo_testnet', + '88': 'viction', + '89': 'viction_testnet', '90': 'garizon_stage0', '91': 'garizon_stage1', '92': 'garizon_stage2', @@ -136,15 +136,20 @@ network_names = { '128': 'huobi_eco', '129': 'innovator', '131': 'engram_testnet', + '132': 'namefi', + '133': 'hashkey_testnet', '134': 'iexec', '135': 'alyx_testnet', '136': 'deam', '137': 'polygon', '138': 'defi_oracle_meta', '139': 'woop', + '140': 'eternal', '141': 'openpiece_testnet', '142': 'dax', '144': 'phi_v2', + '145': 'soraai_testnet', + '147': 'flag', '148': 'shimmerevm', '150': 'six_protocol_testnet', '151': 'redbelly', @@ -153,43 +158,67 @@ network_names = { '154': 'redbelly_tge', '155': 'tenet_testnet', '156': 'oeblock_testnet', + '157': 'puppynet_shibarium', + '158': 'roburna', + '159': 'roburna_testnet', '160': 'armonia_eva', '161': 'armonia_eva_testnet', '162': 'lightstreams_testnet', '163': 'lightstreams', - '165': 'omni_testnet', + '164': 'omni_omega_testnet', + '166': 'omni', '167': 'atoshi_testnet', '168': 'aioz', '169': 'manta_pacific', '170': 'hoo_testnet', + '171': 'co2e_ledger', '172': 'latam_block_resil_testnet', + '176': 'dc', + '178': 'abey_testnet', + '179': 'abey', '180': 'ame', + '181': 'waterfall', + '183': 'ethernity', + '184': 'dojima_testnet', + '185': 'mint', '186': 'seele', + '187': 'dojima', '188': 'bmc', '189': 'bmc_testnet', + '190': 'cmdao_bbq', + '191': 'filefilego', '193': 'crypto_emergency', - '195': 'x1_testnet', - '196': 'x1', + '195': 'x_layer_testnet', + '196': 'x_layer', '197': 'neutrinos_testnet', '198': 'bit', '199': 'bittorrent', '200': 'arbitrum_on_xdai', '201': 'moac_testnet', + '202': 'edgeless_testnet', '204': 'opbnb', + '205': 'ekaash', '206': 'vinu_testnet', '207': 'vinu', '208': 'structx', '210': 'bitnet', '211': 'freight_trust', - '212': 'map_makalu', + '212': 'mapo_makalu', + '213': 'b2_hub', '214': 'shinarium', '217': 'siriusnet_v2', '218': 'soterone_old', '220': 'scalind_testnet', + '221': 'blockex', '222': 'permission', + '223': 'b2', + '224': 'viridis_testnet', '225': 'la', '226': 'la_testnet', + '228': 'mind', '230': 'swapdex', + '233': 'ethernity_testnet', + '234': 'protojumbo_testnet', '236': 'deam_testnet', '238': 'blast', '242': 'plinga', @@ -197,13 +226,21 @@ network_names = { '248': 'oasys', '250': 'fantom_opera', '252': 'fraxtal', + '254': 'swan', '255': 'kroma', '256': 'huobi_eco_testnet', '258': 'setheum', '259': 'neonlink', + '261': 'guru_testnet', '262': 'sur_block', + '266': 'neura', + '267': 'neura_testnet', + '268': 'neura_devnet', '269': 'high_performance_block', '271': 'egoncoin', + '278': 'xfair.ai', + '279': 'bpx_block', + '282': 'cronos_zkevm_testnet', '288': 'boba', '291': 'orderly', '295': 'hedera', @@ -212,7 +249,11 @@ network_names = { '298': 'hedera_localnet', '300': 'zksync_sepolia_testnet', '301': 'bobaopera', + '302': 'zkcandy_sepolia_testnet', '303': 'neuro_testnet', + '305': 'zksats', + '307': 'lovely_testnet', + '308': 'furtheon', '309': 'wyzth_testnet', '311': 'omax', '313': 'neuro', @@ -221,10 +262,14 @@ network_names = { '322': 'kcc_testnet', '323': 'cosvm', '324': 'zksync', + '325': 'grvt', + '326': 'grvt_sepolia_testnet', '333': 'web3q', '335': 'dfk_test', '336': 'shiden', '338': 'cronos_testnet', + '345': 'tsc', + '360': 'shape', '361': 'theta', '363': 'theta_sapphire_testnet', '364': 'theta_amber_testnet', @@ -234,24 +279,33 @@ network_names = { '380': 'zkamoeba_testnet', '381': 'zkamoeba', '385': 'lisinski', + '388': 'cronos_zkevm', + '395': 'camdl_testnet', + '397': 'near', + '398': 'near_testnet', '399': 'nativ3', '400': 'hyperon_testnet', '401': 'ozone_testnet', + '404': 'syndr_l3', '411': 'pepe', '416': 'sx', '418': 'latestnet', '420': 'optimism_goerli_testnet', + '422': 'viridis', '424': 'pgn_public_goods', '427': 'zeeth', '428': 'geso_verse', + '434': 'boyaa', '443': 'ten_testnet', '444': 'synapse_testnet', '456': 'arzio', '462': 'areon_testnet', '463': 'areon', + '480': 'world', '499': 'rupaya', '500': 'camino_c', '501': 'columbus_test', + '510': 'syndicate', '512': 'double_a', '513': 'double_a_testnet', '516': 'gear_zero', @@ -259,12 +313,15 @@ network_names = { '529': 'fire', '530': 'fxcore', '534': 'candle', + '537': 'optrust', '542': 'paw_testnet', + '545': 'evm_on_flow_testnet', '555': 'vela1', '558': 'tao', '568': 'doge_testnet', '570': 'rollux', '571': 'meta', + '579': 'filenova', '588': 'metis_stardust_testnet', '592': 'astar', '595': 'acala_mandala_testnet_tc9', @@ -273,28 +330,40 @@ network_names = { '599': 'metis_goerli_testnet', '600': 'meshnyan_testnet', '601': 'vine_testnet', + '610': 'darwin_devnet', '612': 'eiob', '614': 'graphlinq_block', + '624': 'binary', + '625': 'binary_sepolia', '634': 'avocado', + '646': 'previewnet', '647': 'sx_testnet', '648': 'endurance', '653': 'kali_testnet', '654': 'kali', + '662': 'ultronsmart', '666': 'pixie_testnet', '667': 'laos_arrakis', '668': 'junca', '669': 'junca_testnet', '686': 'karura', + '690': 'redstone', '700': 'star_social_testnet', + '701': 'darwinia_koi_testnet', '707': 'block_station', '708': 'block_station_testnet', '710': 'highbury', + '711': 'tucana', + '712': 'birdee_2', + '713': 'vrcscan', '719': 'shibarium_beta', '721': 'lycan', '727': 'blucrates', + '730': 'lovely', '740': 'canto_testnet', '741': 'vention_testnet', '742': 'script_testnet', + '747': 'evm_on_flow', '766': 'ql1', '776': 'open_testnet', '777': 'cheapeth', @@ -302,6 +371,7 @@ network_names = { '787': 'acala', '788': 'aero_testnet', '789': 'patex', + '799': 'rupaya_testnet', '800': 'lucid_block', '803': 'haic', '808': 'portal_fantasy_test', @@ -310,20 +380,26 @@ network_names = { '814': 'fire_zkevm', '818': 'beone', '820': 'callisto', + '822': 'runic_testnet', + '831': 'checkdot_block_devnet', '841': 'taraxa', '842': 'taraxa_testnet', + '852': 'hongkong', '859': 'zeeth_dev', '868': 'fantasia', '876': 'bandai_namco_research_verse', '877': 'dexit', '880': 'ambros', '888': 'wan', + '898': 'maxi_testnet', + '899': 'maxi', '900': 'garizon_testnet_stage0', '901': 'garizon_testnet_stage1', '902': 'garizon_testnet_stage2', '903': 'garizon_testnet_stage3', '909': 'portal_fantasy', '910': 'decentrabone_layer1_testnet', + '911': 'taproot', '917': 'rinia_testnet', '919': 'mode_testnet', '927': 'yidark', @@ -331,27 +407,37 @@ network_names = { '941': 'pulse_testnet_v2b', '942': 'pulse_testnet_v3', '943': 'pulse_testnet_v4', + '945': 'subtensor_evm_testnet', '956': 'munode_testnet', '957': 'lyra', '963': 'btc20', + '969': 'ethxy', '970': 'oort', '971': 'oort_huygens', '972': 'oort_ascraeus', + '973': 'palm', '977': 'nepal_block', + '979': 'ethxy_testnet', '980': 'top_evm', '985': 'memo', '989': 'top', '990': 'eliberty', - '997': '5ire_thunder', + '995': '5ire', + '996': 'bifrost_polkadot', + '997': '5ire_thunder_testnet', '998': 'lucky', '999': 'wan_testnet', '1000': 'gton', - '1001': 'klaytn_testnet_baobab', + '1001': 'kaia_testnet_kairos', '1003': 'tectum_emission_token', '1004': 't_ekta', + '1005': 'lemontestnet', + '1006': 'lemon', '1007': 'newton_testnet', '1008': 'eurus', + '1009': 'jumbo', '1010': 'evrice', + '1011': 'rebus', '1012': 'newton', '1022': 'sakura', '1023': 'clover_testnet', @@ -362,42 +448,59 @@ network_names = { '1038': 'bronos_testnet', '1039': 'bronos', '1073': 'shimmerevm_testnet', + '1075': 'iota_evm_testnet', '1079': 'mintara_testnet', '1080': 'mintara', '1088': 'metis_andromeda', '1089': 'humans.ai', '1099': 'moac', + '1100': 'dymension', '1101': 'polygon_zkevm', '1107': 'blxq_testnet', '1108': 'blxq', '1111': 'wemix', '1112': 'wemix_testnet', + '1113': 'b2_hub_testnet', '1115': 'core_block_testnet', '1116': 'core_block', '1117': 'dogcoin', + '1123': 'b2_testnet', '1130': 'defi_evm', '1131': 'defi_evm_testnet', '1133': 'defimeta_changi_testnet', + '1135': 'lisk', '1138': 'amstar_testnet', '1139': 'math', '1140': 'math_testnet', + '1147': 'flag_testnet', '1149': 'symplexia', '1170': 'origin_testnet', '1177': 'smart_host_teknoloji_testnet', + '1188': 'clubmos', '1197': 'iora', + '1200': 'cuckoo', '1201': 'evanesco_testnet', '1202': 'world_trade_technical', + '1209': 'saitablocksbc', + '1210': 'cuckoo_sepolia', '1213': 'popcateum', '1214': 'enter', + '1221': 'cycle_testnet', + '1223': 'cycle_testnet_jellyfish', + '1225': 'hybrid_testnet', + '1227': 'bitcoin_protocol_testnet', + '1228': 'cycle_testnet_cuttlefish', '1229': 'exzo', '1230': 'ultron_testnet', '1231': 'ultron', '1234': 'step', + '1235': 'itx', '1243': 'arc', '1244': 'arc_testnet', '1246': 'om_platform', '1248': 'dogether', '1252': 'cic_testnet', + '1260': 'metacces_testnet', '1280': 'halo', '1284': 'moonbeam', '1285': 'moonriver', @@ -408,15 +511,20 @@ network_names = { '1294': 'bobabeam', '1297': 'bobabase_testnet', '1311': 'dos_fuji_subnet', + '1313': 'jaiho', '1314': 'alyx', '1319': 'aia', '1320': 'aia_testnet', + '1328': 'sei_testnet', + '1329': 'sei', '1337': 'geth_testnet', '1338': 'elysium_testnet', '1339': 'elysium', '1343': 'blitz_subnet', '1353': 'cic', '1369': 'zafirium', + '1370': 'ramestta', + '1377': 'pingaksha_testnet', '1379': 'kalar', '1388': 'amstar', '1392': 'joseon', @@ -426,44 +534,69 @@ network_names = { '1440': 'living_assets', '1442': 'polygon_zkevm_testnet', '1452': 'gil_testnet', + '1453': 'meta_istanbul', '1455': 'ctex_scan_block', + '1456': 'zkbase', + '1490': 'vitruveo', + '1499': 'idos_games_testnet', '1501': 'bevm_canary', '1506': 'sherpax', '1507': 'sherpax_testnet', + '1513': 'story_testnet', '1515': 'beagle_messaging', '1559': 'tenet', + '1570': 'star_testnet', + '1578': 'star', + '1617': 'ethereum_inscription', '1618': 'catecoin', '1620': 'atheios', + '1625': 'gravity_alpha', + '1648': 'pivotal', '1657': 'bta', '1662': 'liqui', '1663': 'horizen_gobi_testnet', + '1686': 'mint_testnet', + '1687': 'mint_sepolia_testnet', '1688': 'ludan', '1701': 'anytype_evm', '1707': 'tbsi', '1708': 'tbsi_testnet', + '1717': 'doric', '1718': 'palette', + '1729': 'reya', + '1740': 'metal_l2_testnet', + '1750': 'metal_l2', '1773': 'party', '1777': 'gauss', + '1789': 'zkbase_sepolia_testnet', '1804': 'kerleano', '1807': 'rabbit_analog_testnet', + '1811': 'lif3_testnet', '1818': 'cube', '1819': 'cube_testnet', '1821': 'ruby', + '1853': 'highoctane_subnet', '1856': 'teslafunds', - '1875': 'whitebit', + '1875': 'white', '1881': 'gitshock_cartenz_testnet', '1890': 'lightlink_phoenix', '1891': 'lightlink_pegasus_testnet', '1898': 'bon', + '1899': 'redefi_layer_2', '1904': 'sports', '1907': 'bitci', '1908': 'bitci_testnet', '1909': 'merkle_scan', '1911': 'scalind', '1912': 'ruby_testnet', + '1918': 'upb_crescdi_testnet', '1945': 'onus_testnet', + '1946': 'minato', '1951': 'd', + '1953': 'selendra_testnet', '1954': 'dexilla_testnet', + '1956': 'aiw3_testnet', + '1961': 'selendra', '1967': 'eleanor', '1969': 'super_testnet', '1970': 'super', @@ -474,46 +607,67 @@ network_names = { '1985': 'satoshie', '1986': 'satoshie_testnet', '1987': 'ethergem', + '1992': 'hubble_exchange', + '1993': 'b3_sepolia_testnet', '1994': 'ekta', '1995': 'edexa_testnet', + '1996': 'sanko', + '1997': 'kyoto', '1998': 'kyoto_testnet', '2000': 'doge', '2001': 'milkomeda_c1', '2002': 'milkomeda_a1', + '2004': 'metalink', '2008': 'cloudwalk_testnet', '2009': 'cloudwalk', + '2013': 'panarchy', + '2014': 'now_testnet', '2016': 'mainnetz', + '2017': 'adiri', '2018': 'publicmint_devnet', '2019': 'publicmint_testnet', '2020': 'publicmint', '2021': 'edgeware_edgeevm', '2022': 'beresheet_bereevm_testnet', '2023': 'taycan_testnet', + '2024': 'swan_saturn_testnet', '2025': 'rangers_protocol', + '2026': 'edgeless', '2031': 'centrifuge', '2032': 'catalyst', '2035': 'phala', '2037': 'kiwi_subnet', '2038': 'shrapnel_testnet', - '2043': 'origintrail_para', + '2039': 'aleph_zero', + '2040': 'vanar', + '2043': 'neuroweb', '2044': 'shrapnel_subnet', + '2045': 'aiw3', '2047': 'stratos_testnet', '2048': 'stratos', '2049': 'movo', + '2071': 'metacces', '2077': 'quokkacoin', '2088': 'altair', '2089': 'algol', '2100': 'ecoball', '2101': 'ecoball_testnet_espuma', '2109': 'exosama', + '2112': 'u', + '2121': 'catena', '2122': 'metaplayerone', '2124': 'metaplayerone_dubai_testnet', + '2136': 'bigshortbets_testnet', '2137': 'bigshortbets', '2138': 'defi_oracle_meta_testnet', + '2140': 'oneness', + '2141': 'oneness_testnet', '2151': 'bosagora', '2152': 'findora', '2153': 'findora_testnet', '2154': 'findora_forge', + '2162': 'anime_testnet', + '2192': 'snax', '2199': 'moonsama', '2202': 'antofy', '2203': 'bitcoin_evm', @@ -525,52 +679,89 @@ network_names = { '2300': 'bomb', '2306': 'ebro', '2309': 'arevia', + '2311': 'chronicle_vesuvius_lit_protocol_testnet', '2323': 'soma_testnet', '2330': 'altcoin', + '2331': 'rss3_vsl_sepolia_testnet', '2332': 'soma', + '2340': 'atleta_olympia', + '2342': 'omnia', + '2355': 'silicon_zkevm', '2358': 'kroma_sepolia', + '2370': 'nexis_testnet', '2399': 'bomb_testnet', '2400': 'tcg_verse', + '2410': 'karak', '2415': 'xodex', - '2458': 'hybrid_testnet', + '2425': 'king_of_legends', + '2442': 'polygon_zkevm_cardona_testnet', '2468': 'hybrid', + '2477': '6degree_of_outreach', '2484': 'unicorn_ultra_nebulas_testnet', + '2511': 'karak_goerli', '2522': 'fraxtal_testnet', + '2525': 'inevm', '2559': 'kortho', '2569': 'techpay', '2606': 'pocrnet', '2611': 'redlight', '2612': 'ez_c', '2613': 'ez_c_testnet', - '2625': 'whitebit_testnet', + '2625': 'white_testnet', + '2648': 'ailayer_testnet', + '2649': 'ailayer', + '2662': 'apex', '2710': 'morph_testnet', '2718': 'k_laos', + '2730': 'xr_sepolia', + '2731': 'elizabeth_testnet', + '2748': 'nanon', + '2777': 'gm', + '2810': 'morph_holesky', + '2868': 'hyperagi', + '2882': 'chips', '2888': 'boba_goerli_testnet', + '2889': 'aarma', + '2907': 'elux', + '2911': 'hy', + '2941': 'xenon_testnet', '2999': 'bityuan', '3000': 'cennznet_rata', '3001': 'cennznet_nikau', '3003': 'canxium', '3011': 'playa3ull_games', '3031': 'orlando', + '3033': 'rebus_testnet', '3068': 'bifrost', + '3073': 'movement_evm', + '3084': 'xl_testnet', '3100': 'immu3_evm', '3102': 'vulture_evm_beta', - '3141': 'filecoin___hyperspace_testnet', + '3109': 'satoshivm_alpha', + '3110': 'satoshivm_testnet', + '3141': 'filecoin_hyperspace_testnet', '3269': 'dubxcoin', '3270': 'dubxcoin_testnet', '3306': 'debounce_subnet_testnet', '3331': 'zcore_testnet', - '3333': 'web3q_testnet', + '3333': 'ethstorage_testnet', '3334': 'web3q_galileo', + '3335': 'ethstorage', + '3338': 'peaq', '3400': 'paribu_net', + '3424': 'evolve', '3434': 'secure_testnet', + '3456': 'layeredge_testnet', + '3490': 'gtcscan', '3500': 'paribu_net_testnet', '3501': 'jfin', '3601': 'pandoproject', '3602': 'pandoproject_testnet', + '3630': 'tycooncoin', '3636': 'botanix_testnet', '3637': 'botanix', '3639': 'i', + '3645': 'i_testnet', '3666': 'jouleverse', '3690': 'bittex', '3693': 'empire', @@ -578,6 +769,7 @@ network_names = { '3699': 'senjepowers', '3701': 'xpla_testnet', '3737': 'crossbell', + '3776': 'astar_zkevm', '3797': 'alvey', '3799': 'tangle_testnet', '3885': 'fire_zkevm_ghostrider', @@ -587,34 +779,50 @@ network_names = { '3939': 'dos_tesnet', '3966': 'dyno', '3967': 'dyno_testnet', + '3993': 'apex_testnet', '3999': 'yuan', '4000': 'ozone', '4001': 'peperium_testnet', '4002': 'fantom_testnet', '4003': 'x1_fastnet', + '4040': 'carbonium_testnet', + '4048': 'gan_testnet', '4051': 'bobaopera_testnet', + '4058': 'bahamut_ocean', '4061': 'nahmii_3', '4062': 'nahmii_3_testnet', '4078': 'muster', + '4080': 'tobe_testnet', + '4088': 'zeroth', '4090': 'fastex_bahamut_oasis_testnet', '4096': 'bitindi_testnet', '4099': 'bitindi', '4102': 'aioz_testnet', '4139': 'humans.ai_testnet', '4141': 'tipboxcoin_testnet', + '4157': 'crossfi_testnet', + '4162': 'sx_rollup', '4181': 'phi_v1', + '4200': 'merlin', '4201': 'lukso_testnet', + '4202': 'lisk_sepolia_testnet', '4242': 'nexi', '4243': 'nexi_v2', + '4269': 'laika_testnet', '4328': 'bobafuji_testnet', '4337': 'beam', '4400': 'credit', '4444': 'htmlcoin', '4460': 'orderly_sepolia_testnet', + '4488': 'hydra', + '4544': 'emoney_testnet', + '4613': 'very', + '4653': 'gold', '4689': 'iotex', '4690': 'iotex_testnet', '4759': 'meverse_testnet', '4777': 'blackfort_exchange_testnet', + '4801': 'world_sepolia_testnet', '4893': 'globel', '4918': 'venidium_testnet', '4919': 'venidium', @@ -624,6 +832,18 @@ network_names = { '5002': 'treasurenet_alpha', '5003': 'mantle_sepolia_testnet', '5005': 'treasurenet_testnet', + '5039': 'onigiri_test_subnet', + '5040': 'onigiri_subnet', + '5051': 'nollie_skate_testnet', + '5100': 'syndicate_testnet', + '5101': 'syndicate_frame', + '5102': 'sic_testnet', + '5103': 'coordinape_testnet', + '5104': 'charmverse_testnet', + '5105': 'superloyalty_testnet', + '5106': 'azra_testnet', + '5112': 'ham', + '5151': 'me_testnet', '5165': 'bahamut', '5169': 'smart_layer', '5177': 'tl', @@ -631,68 +851,113 @@ network_names = { '5234': 'humanode', '5290': 'fire_old', '5315': 'uzmi', + '5317': 'optrust_testnet', + '5321': 'itx_testnet', + '5333': 'netsbo', '5353': 'tritanium_testnet', + '5372': 'settlus_testnet', + '5424': 'edexa', + '5439': 'ego', '5522': 'vex_evm_testnet', - '5551': 'nahmii', - '5553': 'nahmii_testnet', + '5545': 'duck', + '5551': 'nahmii_2', + '5553': 'nahmii_2_testnet', '5555': 'verse', '5611': 'opbnb_testnet', + '5615': 'arcturus_testneet', '5616': 'arcturus_testnet', - '5678': 'tanssi_evm_container', + '5656': 'qie_block', + '5675': 'filenova_testnet', + '5678': 'tanssi_demo', '5700': 'syscoin_tanenbaum_testnet', '5729': 'hika_testnet', '5758': 'satoshi_testnet', '5777': 'ganache', + '5845': 'tangle', '5851': 'ontology_testnet', + '5858': 'chang_foundation', '5869': 'wego_rubidium', + '6000': 'bouncebit_testnet', + '6001': 'bouncebit', '6065': 'tres_testnet', '6066': 'tres', '6102': 'cascadia_testnet', '6118': 'uptn_testnet', '6119': 'uptn', + '6283': 'laos', + '6321': 'aura_euphoria_testnet', + '6322': 'aura', '6363': 'digit_soul', + '6398': 'connext_sepolia', '6502': 'peerpay', + '6550': 'flamma_testnet', '6552': 'scolcoin_wei_testnet', '6565': 'fox_testnet', '6626': 'pixie', '6660': 'latest_testnet', '6661': 'cybria', '6666': 'cybria_testnet', + '6667': 'stor', + '6678': 'edge_matrix', '6688': 'irishub', + '6699': 'ox', '6701': 'paxb', '6779': 'compverse', - '6789': 'gold', + '6805': 'race', + '6806': 'race_testnet', + '6868': 'pools', + '6880': 'mtt', + '6942': 'laika', '6969': 'tomb', '6999': 'polysmart', '7000': 'zeta', - '7001': 'zeta_athens_3_testnet', + '7001': 'zeta_testnet', '7007': 'bst', '7027': 'ella_the_heart', '7070': 'planq', + '7077': 'planq_atlas_testnet', '7100': 'nume', '7118': 'help_the_homeless', '7171': 'bitrock', + '7210': 'nibiru_testnet_1', + '7222': 'nibiru_devnet_3', + '7244': 'zeus_testnet', + '7300': 'xpla_verse', '7331': 'klyntar', '7332': 'horizen_eon', '7341': 'shyft', '7484': 'raba', '7518': 'meverse', + '7560': 'cyber', '7575': 'adil_testnet', '7576': 'adil_v2', '7668': 'the_root', - '7672': 'the_root___porcini_testnet', + '7672': 'the_root_porcini_testnet', '7700': 'canto', '7701': 'canto_tesnet', '7771': 'bitrock_testnet', + '7774': 'gdcc', + '7775': 'gdcc_testnet', + '7776': 'pandasea', '7777': 'rise_of_the_warbots_testnet', + '7778': 'orenium_protocol', + '7798': 'openex_long_testnet', '7860': 'maal_testnet', + '7862': 'maal_v2', + '7863': 'maal_testnet_v2', '7878': 'hazlor_testnet', '7887': 'kinto', '7895': 'ardenium_athena', + '7923': 'dot_blox', + '7924': 'mo', '7979': 'dos', '8000': 'teleport', '8001': 'teleport_testnet', + '8008': 'polynomial', + '8017': 'isuncoin', '8029': 'mdgl_testnet', + '8047': 'boat', + '8054': 'karak_sepolia', '8080': 'shardeum_liberty_1.x', '8081': 'shardeum_liberty_2.x', '8082': 'shardeum_sphinx_1.x', @@ -708,11 +973,16 @@ network_names = { '8181': 'testnet_beone', '8192': 'torus', '8194': 'torus_testnet', - '8217': 'klaytn_cypress', + '8217': 'kaia', + '8227': 'space_subnet', '8272': 'blockton_block', '8285': 'korthotest', + '8329': 'lorenzo', + '8333': 'b3', '8387': 'dracones_financial_services', + '8428': 'that', '8453': 'base', + '8545': 'chakra_testnet', '8654': 'toki', '8655': 'toki_testnet', '8668': 'hela_official_runtime', @@ -720,28 +990,47 @@ network_names = { '8724': 'tool_global_testnet', '8726': 'storage', '8727': 'storage_testnet', + '8732': 'bullions', '8738': 'alph', '8768': 'tmy', + '8822': 'iota_evm', + '8844': 'hydra_testnet', '8848': 'maro_block', + '8866': 'superlumio', + '8869': 'lif3', '8880': 'unique', '8881': 'quartz_by_unique', '8882': 'opal_testnet_by_unique', '8883': 'sapphire_by_unique', + '8886': 'avenium_testnet', '8888': 'xana', '8889': 'vyvo', + '8890': 'orenium_testnet_protocol', '8898': 'mammoth', '8899': 'jib', + '8911': 'algen', + '8912': 'algen_testnet', + '8921': 'algen_layer2', + '8922': 'algen_layer2_testnet', '8989': 'giant_mammoth', '8995': 'bloxberg', '9000': 'evmos_testnet', '9001': 'evmos', + '9007': 'shido_testnet_block', + '9008': 'shido_block', '9012': 'berylbit', - '9024': 'nexa_block', + '9024': 'nexa_testnet_block', + '9025': 'nexa_block', + '9069': 'apex_fusion_nexus', + '9070': 'apex_fusion_nexus_testnet', '9100': 'genesis_coin', '9170': 'rinia_testnet_old', '9223': 'codefin', '9339': 'dogcoin_testnet', + '9372': 'oasys_testnet', + '9393': 'dela_sepolia_testnet', '9395': 'evoke', + '9496': 'weavevm_testnet', '9527': 'rangers_protocol_testnet_robin', '9528': 'qeasyweb3_testnet', '9559': 'neonlink_testnet', @@ -749,223 +1038,374 @@ network_names = { '9728': 'boba_bnb_testnet', '9768': 'mainnetz_testnet', '9779': 'pepenetwork', + '9789': 'tabi_testnet', '9790': 'carbon_evm', '9792': 'carbon_evm_testnet', + '9797': 'optimusz7', '9818': 'imperium_testnet', '9819': 'imperium', + '9876': 'binary_testnet', '9888': 'dogelayer', + '9897': 'arena_z_testnet', + '9898': 'larissa', + '9911': 'espento', + '9966': 'uxer_testnet', '9977': 'mind_testnet', '9980': 'combo', + '9981': 'volley', '9990': 'agung', - '9996': 'mind', '9997': 'altlayer_testnet', + '9998': 'ztc', '9999': 'myown_testnet', '10000': 'smart_bitcoin_cash', '10001': 'smart_bitcoin_cash_testnet', '10024': 'gon', '10081': 'japan_open_testnet', '10086': 'sjatsh', + '10096': 'metanova_verse', '10101': 'block_genesis', '10200': 'gnosis_chiado_testnet', '10201': 'maxx', + '10222': 'glscan', '10242': 'arthera', '10243': 'arthera_testnet', '10248': '0xtade', + '10321': 'tao_evm', + '10324': 'tao_evm_testnet', '10395': 'worldland_testnet', '10507': 'numbers', '10508': 'numbers_testnet', '10823': 'cryptocoinpay', + '10849': 'lamina1', + '10850': 'lamina1_identity', '10946': 'quadrans_block', '10947': 'quadrans_block_testnet', + '11000': 'kb', + '11011': 'shape_sepolia_testnet', '11110': 'astra', '11111': 'wagmi', '11115': 'astra_testnet', '11119': 'hashbit', + '11124': 'abstract_testnet', + '11221': 'shine', + '11227': 'jiritsu_testnet_subnet', '11235': 'haqq', '11437': 'shyft_testnet', + '11501': 'bevm', + '11503': 'bevm_testnet', + '11521': 'sats', '11612': 'sardis_testnet', - '11888': 'sanr', + '11822': 'artela_testnet', '11891': 'polygon_supernet_arianee', + '12001': 'fuse_testnet', '12009': 'satoshi', + '12020': 'aternos', '12051': 'singularity_zero_testnet', '12052': 'singularity_zero', '12123': 'brc', '12306': 'fibonacci', '12321': 'blg_testnet', + '12324': 'l3x_protocol', + '12325': 'l3x_protocol_testnet', '12345': 'step_testnet', - '12611': 'astar_zkevm', + '12553': 'rss3_vsl', '12715': 'rikeza_testnet', + '12781': 'playdapp_testnet', '12890': 'quantum_testnet', + '12898': 'playfair_testnet_subnet', '13000': 'sps', '13337': 'beam_testnet', + '13370': 'cannon_testnet', '13371': 'immutable_zkevm', '13381': 'phoenix', + '13396': 'masa', '13473': 'immutable_zkevm_testnet', + '13505': 'gravity_alpha_testnet_sepolia', + '13600': 'kronobit', '13812': 'susono', '14000': 'sps_testnet', + '14088': 'zeroth_testnet', + '14324': 'evolve_testnet', + '14333': 'vitruveo_testnet', + '14800': 'vana_moksha_testnet', + '14801': 'vana_satori_testnet', '14853': 'humanode_testnet_5_israfel', '15003': 'immutable_zkevm_devnet', + '15257': 'poodl_testnet', + '15259': 'poodl', + '15430': 'kymtc', '15551': 'loopnetwork', '15555': 'trust_evm_testnet', '15557': 'eos_evm_testnet', '16000': 'metadot', '16001': 'metadot_testnet', + '16116': 'defiverse', + '16166': 'cypherium', + '16180': 'plyr_phi', + '16350': 'incentiv_devnet', + '16481': 'pivotal_sepolia', '16507': 'genesys', + '16600': '0g_newton_testnet', '16688': 'irishub_testnet', '16718': 'airdao', '16888': 'ivar_testnet', '17000': 'holesky', '17001': 'redstone_holesky_testnet', + '17069': 'garnet_holesky', + '17071': 'on_points', + '17117': 'defiverse_testnet', '17171': 'g8', '17172': 'eclipse_subnet', '17180': 'palette_testnet', + '17217': 'konet', '17777': 'eos_evm', '18000': 'frontier_of_dreams_testnet', '18122': 'smart_trades', '18159': 'proof_of_memes', '18181': 'g8_testnet', - '18686': 'mxc_zkevm', + '18231': 'unreal_old', + '18233': 'unreal', + '18686': 'mxc_zkevm_moon', + '18888': 'titan_tkx', + '18889': 'titan_tkx_testnet', '19011': 'home_verse', + '19077': 'blockx_atlantis_testnet', + '19191': 'blockx', + '19224': 'decentraconnect_social', '19527': 'magnet', + '19600': 'lbry', '19845': 'btcix', '20001': 'camelark', + '20041': 'niza', + '20073': 'niza_testnet', '20729': 'callisto_testnet', '20736': 'p12', '20765': 'jono11_subnet', + '21004': 'c4ei', '21133': 'all_about_healthy', + '21223': 'dcpay', + '21224': 'dcpay_testnet', '21337': 'cennznet_azalea', + '21363': 'lestnet', '21816': 'om', '21912': 'bsl', '22023': 'taycan', '22040': 'airdao_testnet', '22222': 'nautilus', '22324': 'goldx_testnet', - '22776': 'map', + '22776': 'map_protocol', '23006': 'antofy_testnet', '23118': 'opside_testnet', '23294': 'oasis_sapphire', '23295': 'oasis_sapphire_testnet', + '23451': 'dreyerx', + '23452': 'dreyerx_testnet', '23888': 'blast_testnet', + '24076': 'kymtc_testnet', '24484': 'web', '24734': 'mintme.com', '25186': 'liquidlayer', + '25327': 'everclear', + '25839': 'alvey_testnet', '25888': 'hammer', '25925': 'bitkub_testnet', '26026': 'ferrum_testnet', + '26482': 'ducatusx_testnet', + '26483': 'ducatusx', '26600': 'hertz', '26863': 'oasis', + '27181': 'klaos_nova', + '27483': 'nanon_sepolia', + '27827': 'zeroone_subnet', + '28516': 'vizing_testnet', + '28518': 'vizing', '28528': 'optimism_bedrock_goerli_alpha_testnet', + '28882': 'boba_sepolia', + '29112': 'hy_testnet', + '29223': 'nexa_metanet', + '29536': 'kai_testnet', '29548': 'mch_verse', + '30000': 'q', '30067': 'piece_testnet', + '30088': 'miyou', '30103': 'cerium_testnet', + '30730': 'movement_evm_legacy', + '30731': 'movement_evm_devnet', + '30732': 'movement_evm_testnet', '31102': 'ethersocial', '31223': 'cloudtx', '31224': 'cloudtx_testnet', '31337': 'go_testnet', '31414': 'evoke_testnet', - '31415': 'filecoin___wallaby_testnet', + '31415': 'filecoin_wallaby_testnet', + '31753': 'x', + '31754': 'x_testnet', '32001': 'w3gamez_holesky_testnet', + '32382': 'santiment_intelligence', '32520': 'bitgert', '32659': 'fusion', '32769': 'zilliqa_evm', '32990': 'zilliqa_evm_isolated_server', + '33033': 'entangle', '33101': 'zilliqa_evm_testnet', + '33103': 'zilliqa_2_evm_proto_testnet', + '33111': 'curtis', + '33133': 'entangle_testnet', '33210': 'cloudverse_subnet', '33333': 'aves', '33385': 'zilliqa_evm_devnet', + '33401': 'slingshot', '33469': 'zilliqa_2_evm_devnet', + '33979': 'funki', '34443': 'mode', + '34504': 'zeus', '35011': 'j2o_taro', - '35441': 'q', '35443': 'q_testnet', '38400': 'connectormanager', '38401': 'connectormanager_robin', + '39656': 'prm', '39797': 'energi', '39815': 'oho', + '40000': 'div', + '41455': 'aleph_zero_evm', '41500': 'opulent_x_beta', '42069': 'pegglecoin', - '42161': 'arbitrum_one', + '42072': 'agentlayer_testnet', + '42161': 'arbitrum', '42170': 'arbitrum_nova', '42220': 'celo', '42261': 'oasis_emerald_testnet', '42262': 'oasis_emerald', '42355': 'goldx', + '42421': 'asset_testnet', '42766': 'zkfair', + '42793': 'etherlink', '42801': 'gesoten_verse_testnet', '42888': 'kinto_testnet', '43110': 'athereum', + '43111': 'hemi', '43113': 'avalanche_fuji_testnet', - '43114': 'avalanche_c', + '43114': 'avalanche', '43288': 'boba_avax', '43851': 'zkfair_testnet', '44444': 'fren', + '44445': 'quantum', '44787': 'celo_alfajores_testnet', '45000': 'autobahn', + '45454': 'swamps_l2', '45510': 'deelance', + '45513': 'blessnet', '46688': 'fusion_testnet', + '47763': 'neo_x', + '47803': 'redefi_layer_1', '47805': 'rei', + '48795': 'space_subnet_testnet', + '48899': 'zircuit_testnet', + '48900': 'zircuit', '49049': 'wireshape_floripa_testnet', '49088': 'bifrost_testnet', + '49321': 'gunz_testnet', '49797': 'energi_testnet', '50001': 'liveplex_oracleevm', '50005': 'yooldo_verse', '50006': 'yooldo_verse_testnet', '50021': 'gton_testnet', + '50888': 'erbie', '51178': 'lumoz_testnet_alpha', '51712': 'sardis', '52014': 'electroneum', + '53277': 'doid', + '53302': 'superseed_sepolia_testnet', + '53457': 'dodo_testnet', '53935': 'dfk', + '54176': 'overprotocol', '54211': 'haqq_testnet', '54321': 'toronet_testnet', '55004': 'titan', + '55551': 'photon_aurora_testnet', '55556': 'rei_testnet', + '55614': 'flamma', + '56026': 'lambda', '56288': 'boba_bnb', + '56400': 'testnet_zeroone_subnet', '56789': 'velo_labs', + '56797': 'doid_testnet', '57000': 'rollux_testnet', + '57451': 'coinsec', '58008': 'sepolia_pgn_public_goods', - '59140': 'linea_testnet', + '58680': 'lumoz_quidditch_testnet', + '59140': 'linea_goerli', + '59141': 'linea_sepolia', '59144': 'linea', + '59902': 'metis_sepolia_testnet', '59971': 'genesys_code', '60000': 'thinkium_testnet_0', '60001': 'thinkium_testnet_1', '60002': 'thinkium_testnet_2', '60103': 'thinkium_testnet_103', + '60808': 'bob', + '61022': 'orange', + '61406': 'kai', '61800': 'axel_dev_net', '61803': 'etica', '61916': 'doken_super', + '62049': 'optopia_testnet', + '62050': 'optopia', + '62298': 'citrea_devnet', '62320': 'celo_baklava_testnet', '62621': 'multivac', + '62831': 'plyr_tau_testnet', + '62850': 'laos_sigma_testnet', '63000': 'ecredits', '63001': 'ecredits_testnet', + '63002': 'esync_testnet', + '65349': 'cratd2c_testnet', + '65357': 'vecno', '65450': 'scolcoin', + '65536': 'automata', + '66665': 'creator_testnet', '66988': 'janus_testnet', '67390': 'siriusnet', '67588': 'cosmic', '68770': 'dm2_verse', + '68775': 'dm2_verse_testnet', '69420': 'condrieu', '70000': 'thinkium_0', '70001': 'thinkium_1', '70002': 'thinkium_2', '70103': 'thinkium_103', + '70700': 'proof_of_play_apex', '71111': 'guapcoinx', '71393': 'polyjuice_testnet', '71401': 'godwoken_testnet_v1', '71402': 'godwoken', + '72778': 'caga_crypto_ankara_testnet', '72992': 'grok', + '73114': 'icb_testnet', + '73115': 'icb', '73799': 'energy_web_volta_testnet', '73927': 'mixin_virtual_machine', '75000': 'resincoin', + '75512': 'geek_verse', + '75513': 'geek_verse_testnet', + '77001': 'bora', '77238': 'foundry_testnet', '77612': 'vention', + '77677': 'cycle_sailboat', '77777': 'toronet', '78110': 'firenze_test', '78281': 'dragonfly_hexapod', '78430': 'amplify_subnet', '78431': 'bulletin_subnet', '78432': 'conduit_subnet', + '78600': 'vanguard', '79879': 'gold_testnet', '80001': 'mumbai', + '80002': 'amoy', + '80008': 'polynomia_sepolia', + '80084': 'bera_bartio', '80085': 'bera_artio', + '80096': 'hizoco', '81041': 'nordek', '81341': 'amana_testnet', '81342': 'amana_mixnet', @@ -976,23 +1416,41 @@ network_names = { '81361': 'mizana_testnet', '81362': 'mizana_mixnet', '81363': 'mizana_privnet', - '81720': 'quantum', '82459': 'smart_layer_testnet', + '83144': 'xprotocol_testnet', + '83278': 'esa', + '83872': 'zedxion', '84531': 'base_goerli_testnet', '84532': 'base_sepolia_testnet', '84886': 'aerie', '85449': 'cybertrust', '88002': 'nautilus_proteus_testnet', + '88559': 'inoai', + '88800': 'zkasino', + '88817': 'unit_zero_testnet', + '88819': 'unit_zero_stagenet', '88880': 'chiliz_scoville_testnet', - '88888': 'ivar', + '88882': 'chiliz_spicy_testnet', + '88888': 'chiliz', + '90001': 'fxcore_testnet', '90210': 'beverly_hills', + '90354': 'camp_testnet', '91002': 'nautilus_trition', + '91120': 'metadap_enterprise', '91715': 'combo_testnet', '92001': 'lambda_testnet', '93572': 'liquidlayer_testnet', + '93747': 'stratovm_testnet', '96970': 'mantis_testnet_hexapod', + '97053': 'tetron_testnet', + '97055': 'tetron', '97288': 'boba_bnb_old', + '97435': 'slingshot_testnet', + '97531': 'green_testnet', + '97970': 'optimusz7_testnet', + '98881': 'ebi', '99099': 'eliberty_testnet', + '99876': 'edge_matrix_testnet', '99998': 'ubtestnet', '99999': 'ub', '100000': 'quark_root', @@ -1006,8 +1464,15 @@ network_names = { '100008': 'quark_shard_7', '100009': 've', '100010': 've_testnet', - '101010': 'soverun_testnet', + '100011': 'quark_l2', + '101010': 'global_trust', + '102030': 'creditcoin', + '102031': 'creditcoin_testnet', + '102032': 'creditcoin_devnet', '103090': 'crystaleum', + '103454': 'masa_testnet', + '104566': 'kaspaclassic', + '105105': 'stratis', '108801': 'bro', '110000': 'quark_devnet_root', '110001': 'quark_devnet_shard_0', @@ -1018,60 +1483,106 @@ network_names = { '110006': 'quark_devnet_shard_5', '110007': 'quark_devnet_shard_6', '110008': 'quark_devnet_shard_7', + '110011': 'quark_l2_testnet', + '110110': 'mars_credit', '111000': 'siberium_test', '111111': 'siberium', + '111188': 're.al', '112358': 'meta_one', + '119139': 'metadap_enterprise_testnet', + '123321': 'gem', '123456': 'adil_devnet', '128123': 'etherlink_testnet', + '131313': 'odyssey_testnet', '131419': 'etnds', + '132902': 'form_testnet', + '141319': 'magape_testnet', '142857': 'icplaza', + '161212': 'playfi', + '165279': 'eclat', + '167000': 'taiko', '167004': 'taiko_alpha_2_testnet', '167005': 'taiko_grimsvotn_l2', '167006': 'taiko_eldfell_l3', '167007': 'taiko_jolnir_l2', '167008': 'taiko_katla_l2', + '167009': 'taiko_hekla_l2', + '168168': 'zs', + '171000': 'fair_testnet', + '175177': 'chronicle_lit_protocol_testnet', + '175188': 'chronicle_yellowstone_lit_protocol_testnet', '188710': 'bitica', '188881': 'condor_test', + '199991': 'mazze_testnet', + '200000': 'xfair.ai_testnet', '200101': 'milkomeda_c1_testnet', '200202': 'milkomeda_a1_testnet', '200625': 'akroma', + '200810': 'bitlayer_testnet', + '200901': 'bitlayer', '201018': 'alaya', '201030': 'alaya_dev_testnet', '201804': 'mythical', '202020': 'decimal_testnet', + '202105': 'duck_testnet', + '202202': 'bethel_sydney', '202212': 'x1_devnet', + '202401': 'ymtech_besu_testnet', '202624': 'jellie', '204005': 'x1_network', + '205205': 'auroria_testnet', + '210049': 'gitagi_atlas_testnet', '210425': 'platon', + '212013': 'litentry', '220315': 'mas', '221230': 'reap', '221231': 'reap_testnet', + '222222': 'hydradx', + '222555': 'deepl', + '222666': 'deepl_testnet', '224168': 'taf_eco', '224422': 'conet_sebolia_testnet', '224433': 'conet_holesky', - '230315': 'hashkey_testnet', + '229772': 'abyss_protocol', + '230315': 'hashkey_testnetdiscard', '234666': 'haymo_testnet', + '240515': 'orange_testnet', '246529': 'artis_sigma1', '246785': 'artis_testnet_tau1', '247253': 'saakuru_testnet', '256256': 'cmp', + '262371': 'eclat_testnet', '266256': 'gear_zero_testnet', '271271': 'egoncoin_testnet', '281121': 'social', - '314159': 'filecoin___calibration_testnet', + '282828': 'zillion_sepolia_testnet', + '292003': 'cipherem_testnet', + '309075': 'one_world', + '313313': 'saharaai_testnet', + '314159': 'filecoin_calibration_testnet', + '322202': 'parex', + '323213': 'bloom_genesis_testnet', + '327126': 'waba_testnet', + '328527': 'nal', '330844': 'ttcoin', + '333313': 'bloom_genesis', '333331': 'aves_testnet', '333333': 'nativ3_testnet', '333666': 'oone_testnet', '333777': 'oone_devnet', '333888': 'polis_testnet', '333999': 'polis', + '336655': 'up_testnet', + '336666': 'up', + '355110': 'bitfinity', '355113': 'bitfinity_testnet', + '360890': 'lavita', '363636': 'digit_soul_2', '373737': 'hap_testnet', '381931': 'metal_c', '381932': 'metal_tahoe_c', '404040': 'tipboxcoin', + '413413': 'aie_testnet', '420420': 'kek', '420666': 'kek_kektest', '420692': 'alterium_l2_testnet', @@ -1082,31 +1593,64 @@ network_names = { '431140': 'markr_go', '432201': 'dexalot_subnet_testnet', '432204': 'dexalot_subnet', + '444444': 'syndr_l3_sepolia', '444900': 'weelink_testnet', '471100': 'patex_sepolia_testnet', '473861': 'ultra_pro', '474142': 'open', + '486487': 'gobbl_testnet', + '490000': 'autonomys_testnet_nova_domain', + '504441': 'playdapp', '512512': 'cmp_testnet', - '513100': 'ethereum_fair', + '513100': 'dis', + '526916': 'docoin_community', '534351': 'scroll_sepolia_testnet', '534352': 'scroll', '534353': 'scroll_alpha_testnet', '534354': 'scroll_pre_alpha_testnet', '534849': 'shinarium_beta', '535037': 'beaneco_smart', + '541764': 'overprotocol_testnet', + '552981': 'one_world_testnet', + '555555': 'pentagon_testnet', + '555666': 'eclipse_testnet', + '555888': 'dustboy_iot', '622277': 'hypra', + '622463': 'atlas', '641230': 'bear', '651940': 'all', - '666666': 'vision___vpioneer_test', + '656476': 'open_campus_codex', + '660279': 'xai', + '666666': 'vision_vpioneer_test', '666888': 'hela_official_runtime_testnet', + '686868': 'won', + '696969': 'galadriel_devnet', + '710420': 'tiltyard_subnet', + '713715': 'sei_devnet', + '721529': 'eram', + '723107': 'tix_testnet', + '743111': 'hemi_sepolia', '751230': 'bear_testnet', + '752024': 'ternoa_testnet', '761412': 'miexs_smart', + '764984': 'lamina1_testnet', + '767368': 'lamina1_identity_testnet', '776877': 'modularium', '800001': 'octaspace', + '808080': 'biz_testnet', + '808813': 'bob_sepolia', + '810180': 'zklink_nova', + '810181': 'zklink_nova_sepolia_testnet', + '810182': 'zklink_nova_goerli_testnet', + '812397': 'sg_verse', + '820522': 'tsc_testnet', '827431': 'curve', + '839320': 'prm_testnet', + '840000': 'runevm_testnet', '846000': '4goodnetwork', '855456': 'dodao', '879151': 'blocx', + '888882': 'rexx', '888888': 'vision', '900000': 'posi_shard_0', '910000': 'posi_testnet_shard_0', @@ -1116,95 +1660,164 @@ network_names = { '923018': 'fncy_testnet', '955081': 'jono12_subnet', '955305': 'eluvio_content_fabric', + '978657': 'treasure_ruby', + '984122': 'forma', + '984123': 'forma_sketchpad', '988207': 'ecrox', - '1127469': 'tiltyard_subnet', + '998899': 'supernet_testnet', + '999999': 'am', + '1100789': 'netmind_testnet', + '1234567': 'sharecle', '1261120': 'zkatana', '1313114': 'etho_protocol', '1313500': 'xerom', '1337702': 'kintsugi', '1337802': 'kiln', '1337803': 'zhejiang', + '1398243': 'automata_testnet', + '1398244': 'automata_orbit_testnet', + '1612127': 'playfi_albireo_testnet', + '1637450': 'xterio_testnet', '1731313': 'turkey_demo_dev', '2021398': 'debank_testnet', '2099156': 'plian_main', '2206132': 'platon_dev_testnet2', '2611555': 'dpu', - '3141592': 'filecoin___butterfly_testnet', + '2702128': 'xterio', + '3132023': 'saharaai', + '3141592': 'filecoin_butterfly_testnet', + '3397901': 'funki_sepolia_sandbox', '3441005': 'manta_pacific_testnet', + '3441006': 'manta_pacific_sepolia_testnet', '4000003': 'altlayer_zero_gas', '4281033': 'worlds_caldera', + '4444444': 'altar_testnet', + '4457845': 'zero_testnet_sepolia', + '5112023': 'numblock', '5167003': 'mxc_wannsee_zkevm_testnet', + '5167004': 'moon_geneva_testnet', '5201420': 'electroneum_testnet', + '5318008': 'reactive_kopli', '5555555': 'imversed', '5555558': 'imversed_testnet', + '6038361': 'astar_zkyoto', + '6666665': 'safeanwang', + '6666666': 'safeanwang_testnet', + '7082400': 'coti_testnet', '7225878': 'saakuru', '7355310': 'openvessel', '7668378': 'ql1_testnet', '7762959': 'musicoin', '7777777': 'zora', '8007736': 'plian_sub_1', + '8008135': 'fhenix_helium', '8080808': 'hokum', + '8601152': 'waterfall_8_test', '8794598': 'hap', '8888881': 'quarix_testnet', '8888888': 'quarix', '9322252': 'xcap', '9322253': 'milvine', + '9999999': 'fluence', '10067275': 'plian_testnet_sub_1', '10101010': 'soverun', + '10241024': 'alienx', + '10241025': 'alienx_hal_testnet', + '11145513': 'blessnet_sepolia', '11155111': 'sepolia', '11155420': 'op_sepolia_testnet', + '12052024': 'memento_testnet', + '12227331': 'neox_testnet_t3', + '12227332': 'neo_x_testnet_t4', + '13068200': 'coti_devnet', '13371337': 'pep_churchill', '14288640': 'andus', '16658437': 'plian_testnet_main', + '18071918': 'mande', '18289463': 'iolite', + '19850818': 'deepbrain_testnet', + '19880818': 'deepbrain', + '20180427': 'stability_testnet', '20180430': 'smartmesh', '20181205': 'quarkblock', '20201022': 'pego', + '20230825': 'vcity_testnet', + '20240324': 'debank_sepolia_testnet', + '20240603': 'dbk', + '20241133': 'swan_proxima_testnet', '20482050': 'hokum_testnet', '22052002': 'excelon', + '24772477': '6degree_of_outreach_testnet', '27082017': 'excoincial_volta_testnet', '27082022': 'excoincial', '28122024': 'ancient8_testnet', '28945486': 'auxilium', '29032022': 'fla', - '31415926': 'filecoin___local_testnet', + '31415926': 'filecoin_local_testnet', + '33626250': 'toliman_suave_testnet', '35855456': 'joys_digital', + '37084624': 'skale_nebula_hub_testnet', + '39916801': 'kingdom', '43214913': 'maistestsubnet', + '52164803': 'fluence_testnet', '61717561': 'aqua', '65010000': 'autonity_bakerloo_thames_testnet', '65010001': 'autonity_bakerloo_barada_testnet', + '65010002': 'autonity_bakerloo_sumida_testnet', + '65010003': 'autonity_bakerloo_yamuna_testnet', '65100000': 'autonity_piccadilly_thames_testnet', '65100001': 'autonity_piccadilly_barada_testnet', + '65100002': 'autonity_piccadilly_sumida_testnet', + '65100003': 'autonity_piccadilly_yamuna_testnet', '68840142': 'frame_testnet', + '77787778': '0xhash_testnet', + '79479957': 'sx_toronto_rollup', + '88558801': 'backstop_testnet', '88888888': 't.e.a.m_block', + '94204209': 'polygon_blackberry', '99415706': 'joys_digital_testnet', + '100000000': 'ethos', + '108160679': 'orai', + '111557560': 'cyber_testnet', + '123420111': 'op_celestia_raspberry', + '161221135': 'plume_testnet', '168587773': 'blast_sepolia_testnet', '192837465': 'gather', '222000222': 'kanazawa', '245022926': 'neon_evm_devnet', + '245022929': 'neon_evm_devnet_rollup', '245022934': 'neon_evm', '245022940': 'neon_evm_testnet', '278611351': 'razor_skale', '311752642': 'oneledger', + '328527624': 'nal_sepolia_testnet', '333000333': 'meld', - '344106930': 'skale_calypso_hub_testnet', '356256156': 'gather_testnet', - '476158412': 'skale_europa_hub_testnet', + '476462898': 'skopje_testnet', '486217935': 'gather_devnet', - '503129905': 'skale_nebula_hub_testnet', + '531050104': 'sophon_testnet', + '666666666': 'degen', + '728126428': 'tron', '888888888': 'ancient8', + '889910245': 'ptcescan_testnet', + '889910246': 'ptcescan', + '974399131': 'skale_calypso_hub_testnet', '999999999': 'zora_sepolia_testnet', + '1020352220': 'skale_titan_hub_testnet', '1122334455': 'ipos', '1146703430': 'cyberdecknet', '1273227453': 'human_protocol', '1313161554': 'aurora', '1313161555': 'aurora_testnet', '1313161556': 'aurora_betanet', + '1313161560': 'powergold', '1350216234': 'skale_titan_hub', '1351057110': 'chaos_skale_testnet', + '1380012617': 'rari', '1380996178': 'raptor', + '1444673419': 'skale_europa_hub_testnet', '1482601649': 'skale_nebula_hub', - '1517929550': 'skale_titan_hub_testnet', + '1511670449': 'gpt', '1564830818': 'skale_calypso_hub', '1666600000': 'harmony_shard_0', '1666600001': 'harmony_shard_1', @@ -1214,16 +1827,26 @@ network_names = { '1666700001': 'harmony_testnet_shard_1', '1666900000': 'harmony_devnet_shard_0', '1666900001': 'harmony_devnet_shard_1', + '1722641160': 'silicon_zkevm_sepolia_testnet', + '1802203764': 'kakarot_sepolia', + '1903648807': 'gemu_testnet', + '1918988905': 'rari_testnet', '2021121117': 'datahopper', '2046399126': 'skale_europa_hub', '3125659152': 'pirl', '4216137055': 'oneledger_testnet_frankenstein', '11297108099': 'palm_testnet', - '11297108109': 'palm', + '28872323069': 'gitswarm_test', + '37714555429': 'xai_testnet_v2', + '88153591557': 'arbitrum_blueberry', '111222333444': 'alphabet', + '111551119090': 'thanos_sepolia', + '123420000220': 'fluence_stage', '197710212030': 'ntity', '197710212031': 'haradev_testnet', + '202402181627': 'gm_testnet', '383414847825': 'zeniq', '666301171999': 'pdc', '6022140761023': 'molereum', + '2713017997578000': 'd_testnet', } diff --git a/python/pyproject.toml b/python/pyproject.toml index 872b7ea..94f0de8 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -28,14 +28,17 @@ classifiers = [ "Programming Language :: Python :: 3.12", "Typing :: Typed", ] -dependencies = [ - "typing-extensions >=4.9.0", -] +dependencies = [] [project.urls] Documentation = "https://github.com/paradigmxyz/mesc" Source = "https://github.com/paradigmxyz/mesc" +[project.optional-dependencies] +test = [ + "typing-extensions >=4.9.0", +] + [tool.mypy] python_version = "3.9" strict = true diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 80168c7..a428cd8 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -4,24 +4,24 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", @@ -32,9 +32,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -56,9 +56,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -77,56 +77,57 @@ dependencies = [ [[package]] name = "ansi_colours" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a1558bd2075d341b9ca698ec8eb6fcc55a746b1fc4255585aad5b141d918a80" +checksum = "14eec43e0298190790f41679fe69ef7a829d2a2ddd78c8c00339e84710e435fe" dependencies = [ "rgb", ] [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -134,9 +135,9 @@ dependencies = [ [[package]] name = "argminmax" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202108b46429b765ef483f8a24d5c46f48c14acfdacc086dd4ab6dddf6bcdbd2" +checksum = "52424b59d69d69d5056d508b260553afd91c57e21849579cd1f50ee8b8b88eaa" dependencies = [ "num-traits", ] @@ -176,18 +177,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -207,23 +208,23 @@ checksum = "9ae037714f313c1353189ead58ef9eec30a8e8dc101b2622d461418fd59e28a9" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -232,6 +233,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "bat" version = "0.24.0" @@ -286,15 +293,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "brotli" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -313,9 +320,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "regex-automata", @@ -335,35 +342,41 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.14.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] -name = "bytes" +name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bytesize" @@ -373,12 +386,13 @@ checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" [[package]] name = "cc" -version = "1.0.83" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -389,23 +403,23 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.33" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] name = "clap" -version = "4.4.18" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -413,9 +427,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.18" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -426,21 +440,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clircle" @@ -456,15 +470,15 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored_json" -version = "4.1.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cff32df5cfea75e6484eeff0b4e48ad3977fb6582676a7862b3590dddc7a87" +checksum = "e35980a1b846f8e3e359fd18099172a0857140ba9230affc4f71348081e039b6" dependencies = [ "serde", "serde_json", @@ -473,13 +487,13 @@ dependencies = [ [[package]] name = "comfy-table" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" +checksum = "b34115915337defe99b2aff5c2ce6771e5fbc4079f4b506301f5cf394c8452f7" dependencies = [ "crossterm 0.27.0", "strum", - "strum_macros", + "strum_macros 0.26.4", "unicode-width", ] @@ -517,24 +531,24 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.11" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176dc175b78f56c0f321911d9c8eb2b77a78a4860b9c19db83835fea1a46649b" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -569,9 +583,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crossterm" @@ -582,7 +596,7 @@ dependencies = [ "bitflags 1.3.2", "crossterm_winapi", "libc", - "mio", + "mio 0.8.11", "parking_lot", "signal-hook", "signal-hook-mio", @@ -595,7 +609,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "crossterm_winapi", "libc", "parking_lot", @@ -622,9 +636,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "edit" @@ -638,9 +652,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -650,23 +664,23 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "enum_dispatch" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -677,9 +691,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -716,15 +730,15 @@ checksum = "95765f67b4b18863968b4a1bd5bb576f732b29a4a28c7cd84c09fa3e2875f33c" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", "miniz_oxide", @@ -831,7 +845,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -865,10 +879,28 @@ dependencies = [ ] [[package]] -name = "getrandom" -version = "0.2.12" +name = "fuzzy-matcher" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" +dependencies = [ + "thread_local", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -879,9 +911,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "git-version" @@ -900,16 +932,16 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "git2" -version = "0.18.1" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" +checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "libc", "libgit2-sys", "log", @@ -924,22 +956,22 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", "log", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "grep-cli" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea40788c059ab8b622c4d074732750bfb3bd2912e2dd58eabc11798a4d5ad725" +checksum = "47f1288f0e06f279f84926fa4c17e3fcd2a22b357927a82f2777f7be26e4cec0" dependencies = [ "bstr", "globset", @@ -951,9 +983,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -970,28 +1002,19 @@ dependencies = [ [[package]] name = "halfbrown" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5681137554ddff44396e5f149892c769d45301dd9aa19c51602a89ee214cb0ec" +checksum = "8588661a8607108a5ca69cab034063441a0413a0b041c13618a7dd348021ef6f" dependencies = [ - "hashbrown 0.13.2", + "hashbrown", "serde", ] [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", @@ -1005,10 +1028,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "hermit-abi" -version = "0.3.4" +name = "heck" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1027,9 +1056,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1049,9 +1078,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -1061,9 +1090,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1098,9 +1127,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1131,26 +1160,27 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] name = "inquire" -version = "0.6.2" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33e7c1ddeb15c9abcbfef6029d8e29f69b52b6d6c891031b88ed91b5065803b" +checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "crossterm 0.25.0", "dyn-clone", - "lazy_static", + "fuzzy-matcher", + "fxhash", "newline-converter", - "thiserror", + "once_cell", "unicode-segmentation", "unicode-width", ] @@ -1170,39 +1200,45 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.67" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lexical-core" @@ -1270,15 +1306,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.152" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libgit2-sys" -version = "0.16.1+1.7.1" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ "cc", "libc", @@ -1294,9 +1330,9 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libz-sys" -version = "1.1.15" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -1304,15 +1340,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1321,15 +1348,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1337,15 +1364,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lz4" -version = "1.24.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -1353,9 +1380,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -1363,9 +1390,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -1378,7 +1405,7 @@ dependencies = [ [[package]] name = "mesc" -version = "0.2.0" +version = "0.3.0" dependencies = [ "serde", "serde_json", @@ -1387,7 +1414,7 @@ dependencies = [ [[package]] name = "mesc_cli" -version = "0.2.0" +version = "0.3.0" dependencies = [ "bat", "clap", @@ -1414,18 +1441,18 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -1434,10 +1461,22 @@ dependencies = [ ] [[package]] -name = "multiversion" -version = "0.7.3" +name = "mio" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2c7b9d7fe61760ce5ea19532ead98541f6b4c495d87247aff9826445cf6872a" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +dependencies = [ + "hermit-abi", + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "multiversion" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4851161a11d3ad0bf9402d90ffc3967bf231768bfd7aeb61755ad06dbf1a142" dependencies = [ "multiversion-macros", "target-features", @@ -1445,9 +1484,9 @@ dependencies = [ [[package]] name = "multiversion-macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a83d8500ed06d68877e9de1dde76c1dbb83885dcdbda4ef44ccbc3fbda2ac8" +checksum = "79a74ddee9e0c27d2578323c13905793e91622148f138ba29738f9dddb835e90" dependencies = [ "proc-macro2", "quote", @@ -1457,11 +1496,10 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -1475,9 +1513,9 @@ dependencies = [ [[package]] name = "newline-converter" -version = "0.2.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f71d09d5c87634207f894c6b31b6a2b2c64ea3bdcf71bd5599fdbbe1600c00f" +checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f" dependencies = [ "unicode-segmentation", ] @@ -1520,30 +1558,26 @@ dependencies = [ ] [[package]] -name = "num-traits" -version = "0.2.17" +name = "num-conv" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -1578,11 +1612,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.63" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -1599,7 +1633,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -1610,9 +1644,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.99" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -1628,9 +1662,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1638,15 +1672,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1676,9 +1710,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -1688,9 +1722,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "planus" @@ -1703,13 +1737,12 @@ dependencies = [ [[package]] name = "plist" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5699cc8a63d1aa2b1ee8e12b9ad70ac790d65788cd36101fa37f87ea46c4cef" +checksum = "42cf17e9a1800f5f396bc67d193dc9411b59012a5876445ef450d449881e1016" dependencies = [ - "base64", + "base64 0.22.1", "indexmap", - "line-wrap", "quick-xml", "serde", "time", @@ -1749,7 +1782,7 @@ dependencies = [ "foreign_vec", "futures", "getrandom", - "hashbrown 0.14.3", + "hashbrown", "itoa", "lz4", "multiversion", @@ -1771,12 +1804,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae73d5b8e55decde670caba1cc82b61f14bfb9a72503198f0997d657a98dcfd6" dependencies = [ "ahash", - "bitflags 2.4.2", + "bitflags 2.6.0", "bytemuck", "chrono", "comfy-table", "either", - "hashbrown 0.14.3", + "hashbrown", "indexmap", "num-traits", "once_cell", @@ -1853,7 +1886,7 @@ dependencies = [ "ahash", "chrono", "fallible-streaming-iterator", - "hashbrown 0.14.3", + "hashbrown", "indexmap", "itoa", "num-traits", @@ -1872,7 +1905,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3555f759705be6dd0d3762d16a0b8787b2dc4da73b57465f3b2bf1a070ba8f20" dependencies = [ "ahash", - "bitflags 2.4.2", + "bitflags 2.6.0", "glob", "once_cell", "polars-arrow", @@ -1897,10 +1930,10 @@ checksum = "1a7eb218296aaa7f79945f08288ca32ca3cf25fa505649eeee689ec21eebf636" dependencies = [ "ahash", "argminmax", - "base64", + "base64 0.21.7", "bytemuck", "either", - "hashbrown 0.14.3", + "hashbrown", "hex", "indexmap", "memchr", @@ -1923,7 +1956,7 @@ checksum = "146010e4b7dd4d2d0e58ddc762f6361f77d7a0385c54471199370c17164f67dd" dependencies = [ "ahash", "async-stream", - "base64", + "base64 0.21.7", "brotli", "ethnum", "flate2", @@ -1950,7 +1983,7 @@ dependencies = [ "crossbeam-channel", "crossbeam-queue", "enum_dispatch", - "hashbrown 0.14.3", + "hashbrown", "num-traits", "polars-arrow", "polars-core", @@ -1984,7 +2017,7 @@ dependencies = [ "rayon", "regex", "smartstring", - "strum_macros", + "strum_macros 0.25.3", "version_check", ] @@ -2043,7 +2076,7 @@ checksum = "da6ce68169fe61d46958c8eab7447360f30f2f23f6e24a0ce703a14b0a3cfbfc" dependencies = [ "ahash", "bytemuck", - "hashbrown 0.14.3", + "hashbrown", "indexmap", "num-traits", "once_cell", @@ -2062,33 +2095,36 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quick-xml" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33" +checksum = "1d3a6e5838b60e0e8fa7a43f22ade549a37d61f8bdbe636d0d7816191de969c2" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2135,9 +2171,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -2155,75 +2191,69 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "ref-cast" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4846d4c50d1721b1a3bef8af76924eef20d5e723647333798c1b519b3a9473f" +checksum = "ccf0a6f84d5f1d581da8b41b47ec8600871962f2a528115b542b362d4b744931" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" +checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "regex" -version = "1.10.3" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" -version = "0.11.23" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", @@ -2241,9 +2271,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper", "system-configuration", "tokio", "tokio-native-tls", @@ -2257,35 +2289,35 @@ dependencies = [ [[package]] name = "rgb" -version = "0.8.37" +version = "0.8.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" dependencies = [ "bytemuck", ] [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -2293,22 +2325,25 @@ dependencies = [ ] [[package]] -name = "rustversion" -version = "1.0.14" +name = "rustls-pemfile" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -2321,11 +2356,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2336,11 +2371,11 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2349,9 +2384,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2359,9 +2394,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "seq-macro" @@ -2371,31 +2406,32 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2414,9 +2450,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.31" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ "indexmap", "itoa", @@ -2446,6 +2482,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook" version = "0.3.17" @@ -2458,29 +2500,29 @@ dependencies = [ [[package]] name = "signal-hook-mio" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" +checksum = "34db1a06d485c9142248b7a054f034b349b212551f3dfd19c94d45a754a217cd" dependencies = [ "libc", - "mio", + "mio 0.8.11", "signal-hook", ] [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] [[package]] name = "simd-json" -version = "0.13.8" +version = "0.13.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faf8f101b9bc484337a6a6b0409cf76c139f2fb70a9e3aee6b6774be7bfbf76" +checksum = "570c430b3d902ea083097e853263ae782dfe40857d93db019a12356c8e8143fa" dependencies = [ "ahash", "getrandom", @@ -2511,9 +2553,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smartstring" @@ -2534,12 +2576,12 @@ checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2586,15 +2628,15 @@ checksum = "fe895eb47f22e2ddd4dabc02bce419d2e643c8e3b585c78158b349195bc24d82" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" @@ -2602,11 +2644,24 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.77", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.77", ] [[package]] @@ -2622,9 +2677,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -2632,10 +2687,16 @@ dependencies = [ ] [[package]] -name = "syntect" -version = "5.1.0" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02b4b303bf8d08bfeb0445cba5068a3d306b6baece1d5582171a9bf49188f91" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "syntect" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1" dependencies = [ "bincode", "bitflags 1.3.2", @@ -2644,8 +2705,9 @@ dependencies = [ "once_cell", "onig", "plist", - "regex-syntax 0.7.5", + "regex-syntax", "serde", + "serde_derive", "serde_json", "thiserror", "walkdir", @@ -2699,21 +2761,21 @@ dependencies = [ [[package]] name = "target-features" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb5fa503293557c5158bd215fdc225695e567a77e453f5d4452a50a193969bd" +checksum = "c1bbb9f3c5c463a01705937a24fdabc5047929ac764b2d5b9cf681c1f5041ed5" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2737,29 +2799,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "thread_local" -version = "1.1.7" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ "cfg-if", "once_cell", @@ -2767,12 +2829,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.31" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -2787,18 +2850,19 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -2811,32 +2875,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.35.1" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", - "mio", - "num_cpus", + "mio 1.0.2", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -2851,23 +2914,22 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] name = "toolstr" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af0deafe22b11f8422063fc8bf7aeeaeaf291fc644fc2926917774e9c5eea394" +checksum = "eea5389dd1f24e3b2b025cd6f4efe63729a57b1c930e7208daec0905b8318388" dependencies = [ "chrono", "polars", @@ -2889,9 +2951,9 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -2912,7 +2974,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -2964,24 +3026,24 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-truncate" @@ -2994,21 +3056,21 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -3017,9 +3079,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "valuable" @@ -3047,15 +3109,15 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -3078,34 +3140,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.40" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -3115,9 +3178,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3125,28 +3188,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.90" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.67" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -3191,11 +3254,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -3210,7 +3273,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", ] [[package]] @@ -3228,7 +3291,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -3248,17 +3320,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -3269,9 +3342,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3281,9 +3354,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3293,9 +3366,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3305,9 +3384,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3317,9 +3396,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3329,9 +3408,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3341,9 +3420,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winreg" @@ -3357,9 +3436,9 @@ dependencies = [ [[package]] name = "xxhash-rust" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53be06678ed9e83edb1745eb72efc0bbcd7b5c3c35711a860906aed827a13d61" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "yaml-rust" @@ -3372,53 +3451,54 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index f5e759d..ce713ff 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -7,10 +7,9 @@ members = ["crates/mesc", "crates/mesc_cli"] resolver = "2" [workspace.package] -version = "0.2.0" +version = "0.3.0" edition = "2021" license = "MIT OR Apache-2.0" -homepage = "https://github.com/paradigmxyz/mesc" repository = "https://github.com/paradigmxyz/mesc" exclude = [".github/"] diff --git a/rust/README.md b/rust/README.md index bc38369..75bb36d 100644 --- a/rust/README.md +++ b/rust/README.md @@ -16,7 +16,7 @@ The `crates/mesc_cli` crate is a tool for reading, writing, and validating MESC Inside a cargo project: `cargo add mesc` -Inside a `Cargo.toml`: `mesc = "1.0"` +Inside a `Cargo.toml`: `mesc = "0.2.1"` ## Example Usage @@ -56,12 +56,12 @@ pub struct ChainId(String); Basic read functions ```rust -use mesc; -use mesc::MescError; +use mesc::{MescError, Endpoint}; +use std::collections::HashMap; type OptionalResult = Result, MescError>; type MultiResult = Result, MescError>; -type MetadataResult = Result, MescError> +type MetadataResult = Result, MescError>; // check whether mesc is enabled let enabled: bool = mesc::is_mesc_enabled(); @@ -70,23 +70,24 @@ let enabled: bool = mesc::is_mesc_enabled(); let endpoint: OptionalResult = mesc::get_default_endpoint(None); // get the default endpoint of a network -let endpoint: OptionalResult = mesc::get_endpoint_by_network(5, None); +let endpoint: OptionalResult = mesc::get_endpoint_by_network("5", None); // get the default network for a particular tool let chain_id: OptionalResult = mesc::get_default_endpoint(Some("xyz_tool")); // get the default endpoint of a network for a particular tool -let endpoint: OptionalResult = mesc::get_endpoint_by_network(5, Some("xyz_tool")); +let endpoint: OptionalResult = mesc::get_endpoint_by_network("5", Some("xyz_tool")); // get an endpoint by name let endpoint: OptionalResult = mesc::get_endpoint_by_name("local_goerli"); // parse a user-provided string into a matching endpoint // (first try 1. endpoint name, then 2. chain id, then 3. network name) +let user_str = "local_goerli"; let endpoint: OptionalResult = mesc::get_endpoint_by_query(user_str, Some("xyz_tool")); // find all endpoints matching given criteria -let query = mesc::MultiEndpointQuery::new().chain_id(5); +let query = mesc::MultiEndpointQuery::new().chain_id("5").unwrap(); let endpoints: MultiResult = mesc::find_endpoints(query); // get non-endpoint metadata diff --git a/rust/crates/mesc/Cargo.toml b/rust/crates/mesc/Cargo.toml index 2bd9d68..113aefd 100644 --- a/rust/crates/mesc/Cargo.toml +++ b/rust/crates/mesc/Cargo.toml @@ -4,7 +4,6 @@ description = "libraries for creating, loading, and modifying MESC configuation version.workspace = true edition.workspace = true license.workspace = true -homepage.workspace = true repository.workspace = true [dependencies] diff --git a/rust/crates/mesc/src/directory.rs b/rust/crates/mesc/src/directory.rs index 383e055..25069a5 100644 --- a/rust/crates/mesc/src/directory.rs +++ b/rust/crates/mesc/src/directory.rs @@ -1,30 +1,14 @@ use crate::ChainId; -use std::collections::HashMap; - -fn known_networks() -> HashMap<&'static str, ChainId> { - [ - ("ethereum", 1u32.into()), - ("goerli", 5u32.into()), - ("optimism", 10u32.into()), - ("polygon", 137u32.into()), - ("arbitrum", 42161u32.into()), - ] - .iter() - .cloned() - .collect() -} /// get chain id of given network name -pub(crate) fn get_network_chain_id(network: &str) -> Option { - known_networks().remove(network) +pub(crate) fn get_network_chain_id(network_name: &str) -> Option { + crate::network_names::NETWORKS + .iter() + .find(|(_, name)| *name == network_name) + .map(|(chain_id, _)| (*chain_id).into()) } /// get network name of given chain id -pub fn get_network_name(chain_id: &ChainId) -> Option { - for (name, other_chain_id) in known_networks().iter() { - if chain_id == other_chain_id { - return Some(name.to_string()) - } - } - None +pub fn get_network_name(chain_id: &ChainId) -> Option<&'static str> { + crate::network_names::get_network_names().get(chain_id).copied() } diff --git a/rust/crates/mesc/src/metadata.rs b/rust/crates/mesc/src/metadata.rs index f58c86c..e4edbca 100644 --- a/rust/crates/mesc/src/metadata.rs +++ b/rust/crates/mesc/src/metadata.rs @@ -15,7 +15,7 @@ pub fn get_api_key>( if let Some(api_keys) = profile.profile_metadata.get("api_keys") { let api_keys: HashMap = get_value_at(api_keys, &[])?; if let Some(key) = api_keys.get(key_name) { - return Ok(Some(key.clone())) + return Ok(Some(key.clone())); } } } @@ -24,7 +24,7 @@ pub fn get_api_key>( if let Some(api_keys) = config.global_metadata.get("api_keys") { let api_keys: HashMap = get_value_at(api_keys, &[])?; if let Some(key) = api_keys.get(key_name) { - return Ok(Some(key.clone())) + return Ok(Some(key.clone())); } } diff --git a/rust/crates/mesc/src/network_names.rs b/rust/crates/mesc/src/network_names.rs index ae3c7c5..5c3442a 100644 --- a/rust/crates/mesc/src/network_names.rs +++ b/rust/crates/mesc/src/network_names.rs @@ -6,1236 +6,1856 @@ //! //! Do not edit this file manually. -use crate::{ChainId, TryIntoChainId}; -use std::collections::HashMap; +use crate::ChainId; +use std::{collections::HashMap, sync::OnceLock}; /// get default mapping between chain_id's and network names -pub fn get_network_names() -> HashMap { - [ - ("1", "ethereum"), - ("2", "expanse"), - ("3", "ropsten"), - ("4", "rinkeby"), - ("5", "goerli"), - ("6", "kotti_testnet"), - ("7", "thai"), - ("8", "ubiq"), - ("9", "ubiq_testnet"), - ("10", "optimism"), - ("11", "metadium"), - ("12", "metadium_testnet"), - ("13", "diode_testnet_staging"), - ("14", "flare"), - ("15", "diode_prenet"), - ("16", "flare_testnet_coston"), - ("17", "thaifi"), - ("18", "thundercore_testnet"), - ("19", "songbird_canary"), - ("20", "elastos"), - ("21", "elastos_testnet"), - ("22", "ela_did"), - ("23", "ela_did_testnet"), - ("24", "kardia"), - ("25", "cronos"), - ("26", "genesis_testnet"), - ("27", "shiba"), - ("28", "boba_rinkeby_testnet"), - ("29", "genesis"), - ("30", "rootstock"), - ("31", "rootstock_testnet"), - ("32", "gooddata_testnet"), - ("33", "gooddata"), - ("34", "secure"), - ("35", "tbwg"), - ("36", "dx"), - ("37", "xpla"), - ("38", "valorbit"), - ("39", "u2u_solaris"), - ("40", "telos_evm"), - ("41", "telos_evm_testnet"), - ("42", "lukso"), - ("43", "darwinia_pangolin_testnet"), - ("44", "crab"), - ("45", "darwinia_pangoro_testnet"), - ("46", "darwinia"), - ("47", "acria_intelli"), - ("48", "ennothem_proterozoic"), - ("49", "ennothem_testnet_pioneer"), - ("50", "xdc"), - ("51", "xdc_apothem"), - ("52", "coinex"), - ("53", "coinex_testnet"), - ("54", "openpiece"), - ("55", "zyx"), - ("56", "bnb"), - ("57", "syscoin"), - ("58", "ontology"), - ("59", "eos_evm_legacy"), - ("60", "go"), - ("61", "ethereum_classic"), - ("62", "morden_testnet"), - ("63", "mordor_testnet"), - ("64", "ellaism"), - ("65", "okex_testnet"), - ("66", "okx"), - ("67", "db_testnet"), - ("68", "soterone"), - ("69", "optimism_kovan"), - ("70", "hoo"), - ("71", "conflux_espace_testnet"), - ("72", "dx_testnet"), - ("73", "fncy"), - ("74", "id"), - ("75", "decimal"), - ("76", "mix"), - ("77", "poa_sokol"), - ("78", "primus"), - ("79", "zenith"), - ("80", "gene"), - ("81", "japan_open"), - ("82", "meter"), - ("83", "meter_testnet"), - ("84", "linqto_devnet"), - ("85", "gate_testnet"), - ("86", "gate"), - ("87", "nova"), - ("88", "tomo"), - ("89", "tomo_testnet"), - ("90", "garizon_stage0"), - ("91", "garizon_stage1"), - ("92", "garizon_stage2"), - ("93", "garizon_stage3"), - ("94", "swissdlt"), - ("95", "camdl"), - ("96", "bitkub"), - ("97", "bnb_testnet"), - ("98", "six_protocol"), - ("99", "poa_core"), - ("100", "gnosis"), - ("101", "etherinc"), - ("102", "web3games_testnet"), - ("103", "worldland"), - ("104", "kaiba_lightning_testnet"), - ("105", "web3games_devnet"), - ("106", "velas_evm"), - ("107", "nebula_testnet"), - ("108", "thundercore"), - ("109", "shibarium"), - ("110", "proton_testnet"), - ("111", "etherlite"), - ("112", "coinbit"), - ("113", "dehvo"), - ("114", "flare_testnet_coston2"), - ("116", "debank"), - ("117", "uptick"), - ("118", "arcology_testnet"), - ("119", "enuls"), - ("120", "enuls_testnet"), - ("121", "real"), - ("122", "fuse"), - ("123", "fuse_sparknet"), - ("124", "decentralized_web"), - ("125", "oy_testnet"), - ("126", "oy"), - ("127", "factory_127"), - ("128", "huobi_eco"), - ("129", "innovator"), - ("131", "engram_testnet"), - ("134", "iexec"), - ("135", "alyx_testnet"), - ("136", "deam"), - ("137", "polygon"), - ("138", "defi_oracle_meta"), - ("139", "woop"), - ("141", "openpiece_testnet"), - ("142", "dax"), - ("144", "phi_v2"), - ("148", "shimmerevm"), - ("150", "six_protocol_testnet"), - ("151", "redbelly"), - ("152", "redbelly_devnet"), - ("153", "redbelly_testnet"), - ("154", "redbelly_tge"), - ("155", "tenet_testnet"), - ("156", "oeblock_testnet"), - ("160", "armonia_eva"), - ("161", "armonia_eva_testnet"), - ("162", "lightstreams_testnet"), - ("163", "lightstreams"), - ("165", "omni_testnet"), - ("167", "atoshi_testnet"), - ("168", "aioz"), - ("169", "manta_pacific"), - ("170", "hoo_testnet"), - ("172", "latam_block_resil_testnet"), - ("180", "ame"), - ("186", "seele"), - ("188", "bmc"), - ("189", "bmc_testnet"), - ("193", "crypto_emergency"), - ("195", "x1_testnet"), - ("196", "x1"), - ("197", "neutrinos_testnet"), - ("198", "bit"), - ("199", "bittorrent"), - ("200", "arbitrum_on_xdai"), - ("201", "moac_testnet"), - ("204", "opbnb"), - ("206", "vinu_testnet"), - ("207", "vinu"), - ("208", "structx"), - ("210", "bitnet"), - ("211", "freight_trust"), - ("212", "map_makalu"), - ("214", "shinarium"), - ("217", "siriusnet_v2"), - ("218", "soterone_old"), - ("220", "scalind_testnet"), - ("222", "permission"), - ("225", "la"), - ("226", "la_testnet"), - ("230", "swapdex"), - ("236", "deam_testnet"), - ("238", "blast"), - ("242", "plinga"), - ("246", "energy_web"), - ("248", "oasys"), - ("250", "fantom_opera"), - ("252", "fraxtal"), - ("255", "kroma"), - ("256", "huobi_eco_testnet"), - ("258", "setheum"), - ("259", "neonlink"), - ("262", "sur_block"), - ("269", "high_performance_block"), - ("271", "egoncoin"), - ("288", "boba"), - ("291", "orderly"), - ("295", "hedera"), - ("296", "hedera_testnet"), - ("297", "hedera_previewnet"), - ("298", "hedera_localnet"), - ("300", "zksync_sepolia_testnet"), - ("301", "bobaopera"), - ("303", "neuro_testnet"), - ("309", "wyzth_testnet"), - ("311", "omax"), - ("313", "neuro"), - ("314", "filecoin"), - ("321", "kcc"), - ("322", "kcc_testnet"), - ("323", "cosvm"), - ("324", "zksync"), - ("333", "web3q"), - ("335", "dfk_test"), - ("336", "shiden"), - ("338", "cronos_testnet"), - ("361", "theta"), - ("363", "theta_sapphire_testnet"), - ("364", "theta_amber_testnet"), - ("365", "theta_testnet"), - ("369", "pulse"), - ("371", "consta_testnet"), - ("380", "zkamoeba_testnet"), - ("381", "zkamoeba"), - ("385", "lisinski"), - ("399", "nativ3"), - ("400", "hyperon_testnet"), - ("401", "ozone_testnet"), - ("411", "pepe"), - ("416", "sx"), - ("418", "latestnet"), - ("420", "optimism_goerli_testnet"), - ("424", "pgn_public_goods"), - ("427", "zeeth"), - ("428", "geso_verse"), - ("443", "ten_testnet"), - ("444", "synapse_testnet"), - ("456", "arzio"), - ("462", "areon_testnet"), - ("463", "areon"), - ("499", "rupaya"), - ("500", "camino_c"), - ("501", "columbus_test"), - ("512", "double_a"), - ("513", "double_a_testnet"), - ("516", "gear_zero"), - ("520", "xt"), - ("529", "fire"), - ("530", "fxcore"), - ("534", "candle"), - ("542", "paw_testnet"), - ("555", "vela1"), - ("558", "tao"), - ("568", "doge_testnet"), - ("570", "rollux"), - ("571", "meta"), - ("588", "metis_stardust_testnet"), - ("592", "astar"), - ("595", "acala_mandala_testnet_tc9"), - ("596", "karura_testnet"), - ("597", "acala_testnet"), - ("599", "metis_goerli_testnet"), - ("600", "meshnyan_testnet"), - ("601", "vine_testnet"), - ("612", "eiob"), - ("614", "graphlinq_block"), - ("634", "avocado"), - ("647", "sx_testnet"), - ("648", "endurance"), - ("653", "kali_testnet"), - ("654", "kali"), - ("666", "pixie_testnet"), - ("667", "laos_arrakis"), - ("668", "junca"), - ("669", "junca_testnet"), - ("686", "karura"), - ("700", "star_social_testnet"), - ("707", "block_station"), - ("708", "block_station_testnet"), - ("710", "highbury"), - ("719", "shibarium_beta"), - ("721", "lycan"), - ("727", "blucrates"), - ("740", "canto_testnet"), - ("741", "vention_testnet"), - ("742", "script_testnet"), - ("766", "ql1"), - ("776", "open_testnet"), - ("777", "cheapeth"), - ("786", "maal"), - ("787", "acala"), - ("788", "aero_testnet"), - ("789", "patex"), - ("800", "lucid_block"), - ("803", "haic"), - ("808", "portal_fantasy_test"), - ("810", "haven1_testnet"), - ("813", "qitmeer"), - ("814", "fire_zkevm"), - ("818", "beone"), - ("820", "callisto"), - ("841", "taraxa"), - ("842", "taraxa_testnet"), - ("859", "zeeth_dev"), - ("868", "fantasia"), - ("876", "bandai_namco_research_verse"), - ("877", "dexit"), - ("880", "ambros"), - ("888", "wan"), - ("900", "garizon_testnet_stage0"), - ("901", "garizon_testnet_stage1"), - ("902", "garizon_testnet_stage2"), - ("903", "garizon_testnet_stage3"), - ("909", "portal_fantasy"), - ("910", "decentrabone_layer1_testnet"), - ("917", "rinia_testnet"), - ("919", "mode_testnet"), - ("927", "yidark"), - ("940", "pulse_testnet"), - ("941", "pulse_testnet_v2b"), - ("942", "pulse_testnet_v3"), - ("943", "pulse_testnet_v4"), - ("956", "munode_testnet"), - ("957", "lyra"), - ("963", "btc20"), - ("970", "oort"), - ("971", "oort_huygens"), - ("972", "oort_ascraeus"), - ("977", "nepal_block"), - ("980", "top_evm"), - ("985", "memo"), - ("989", "top"), - ("990", "eliberty"), - ("997", "5ire_thunder"), - ("998", "lucky"), - ("999", "wan_testnet"), - ("1000", "gton"), - ("1001", "klaytn_testnet_baobab"), - ("1003", "tectum_emission_token"), - ("1004", "t_ekta"), - ("1007", "newton_testnet"), - ("1008", "eurus"), - ("1010", "evrice"), - ("1012", "newton"), - ("1022", "sakura"), - ("1023", "clover_testnet"), - ("1024", "clv_para"), - ("1028", "bittorrent_testnet"), - ("1030", "conflux_espace"), - ("1031", "proxy_testnet"), - ("1038", "bronos_testnet"), - ("1039", "bronos"), - ("1073", "shimmerevm_testnet"), - ("1079", "mintara_testnet"), - ("1080", "mintara"), - ("1088", "metis_andromeda"), - ("1089", "humans.ai"), - ("1099", "moac"), - ("1101", "polygon_zkevm"), - ("1107", "blxq_testnet"), - ("1108", "blxq"), - ("1111", "wemix"), - ("1112", "wemix_testnet"), - ("1115", "core_block_testnet"), - ("1116", "core_block"), - ("1117", "dogcoin"), - ("1130", "defi_evm"), - ("1131", "defi_evm_testnet"), - ("1133", "defimeta_changi_testnet"), - ("1138", "amstar_testnet"), - ("1139", "math"), - ("1140", "math_testnet"), - ("1149", "symplexia"), - ("1170", "origin_testnet"), - ("1177", "smart_host_teknoloji_testnet"), - ("1197", "iora"), - ("1201", "evanesco_testnet"), - ("1202", "world_trade_technical"), - ("1213", "popcateum"), - ("1214", "enter"), - ("1229", "exzo"), - ("1230", "ultron_testnet"), - ("1231", "ultron"), - ("1234", "step"), - ("1243", "arc"), - ("1244", "arc_testnet"), - ("1246", "om_platform"), - ("1248", "dogether"), - ("1252", "cic_testnet"), - ("1280", "halo"), - ("1284", "moonbeam"), - ("1285", "moonriver"), - ("1286", "moonrock_old"), - ("1287", "moonbase_alpha"), - ("1288", "moonrock"), - ("1291", "swisstronik_testnet"), - ("1294", "bobabeam"), - ("1297", "bobabase_testnet"), - ("1311", "dos_fuji_subnet"), - ("1314", "alyx"), - ("1319", "aia"), - ("1320", "aia_testnet"), - ("1337", "geth_testnet"), - ("1338", "elysium_testnet"), - ("1339", "elysium"), - ("1343", "blitz_subnet"), - ("1353", "cic"), - ("1369", "zafirium"), - ("1379", "kalar"), - ("1388", "amstar"), - ("1392", "joseon"), - ("1402", "polygon_zkevm_testnet_old"), - ("1422", "polygon_zkevm_testnet_pre_audit_upgraded"), - ("1433", "rikeza"), - ("1440", "living_assets"), - ("1442", "polygon_zkevm_testnet"), - ("1452", "gil_testnet"), - ("1455", "ctex_scan_block"), - ("1501", "bevm_canary"), - ("1506", "sherpax"), - ("1507", "sherpax_testnet"), - ("1515", "beagle_messaging"), - ("1559", "tenet"), - ("1618", "catecoin"), - ("1620", "atheios"), - ("1657", "bta"), - ("1662", "liqui"), - ("1663", "horizen_gobi_testnet"), - ("1688", "ludan"), - ("1701", "anytype_evm"), - ("1707", "tbsi"), - ("1708", "tbsi_testnet"), - ("1718", "palette"), - ("1773", "party"), - ("1777", "gauss"), - ("1804", "kerleano"), - ("1807", "rabbit_analog_testnet"), - ("1818", "cube"), - ("1819", "cube_testnet"), - ("1821", "ruby"), - ("1856", "teslafunds"), - ("1875", "whitebit"), - ("1881", "gitshock_cartenz_testnet"), - ("1890", "lightlink_phoenix"), - ("1891", "lightlink_pegasus_testnet"), - ("1898", "bon"), - ("1904", "sports"), - ("1907", "bitci"), - ("1908", "bitci_testnet"), - ("1909", "merkle_scan"), - ("1911", "scalind"), - ("1912", "ruby_testnet"), - ("1945", "onus_testnet"), - ("1951", "d"), - ("1954", "dexilla_testnet"), - ("1967", "eleanor"), - ("1969", "super_testnet"), - ("1970", "super"), - ("1971", "atelier"), - ("1972", "redecoin"), - ("1975", "onus"), - ("1984", "eurus_testnet"), - ("1985", "satoshie"), - ("1986", "satoshie_testnet"), - ("1987", "ethergem"), - ("1994", "ekta"), - ("1995", "edexa_testnet"), - ("1998", "kyoto_testnet"), - ("2000", "doge"), - ("2001", "milkomeda_c1"), - ("2002", "milkomeda_a1"), - ("2008", "cloudwalk_testnet"), - ("2009", "cloudwalk"), - ("2016", "mainnetz"), - ("2018", "publicmint_devnet"), - ("2019", "publicmint_testnet"), - ("2020", "publicmint"), - ("2021", "edgeware_edgeevm"), - ("2022", "beresheet_bereevm_testnet"), - ("2023", "taycan_testnet"), - ("2025", "rangers_protocol"), - ("2031", "centrifuge"), - ("2032", "catalyst"), - ("2035", "phala"), - ("2037", "kiwi_subnet"), - ("2038", "shrapnel_testnet"), - ("2043", "origintrail_para"), - ("2044", "shrapnel_subnet"), - ("2047", "stratos_testnet"), - ("2048", "stratos"), - ("2049", "movo"), - ("2077", "quokkacoin"), - ("2088", "altair"), - ("2089", "algol"), - ("2100", "ecoball"), - ("2101", "ecoball_testnet_espuma"), - ("2109", "exosama"), - ("2122", "metaplayerone"), - ("2124", "metaplayerone_dubai_testnet"), - ("2137", "bigshortbets"), - ("2138", "defi_oracle_meta_testnet"), - ("2151", "bosagora"), - ("2152", "findora"), - ("2153", "findora_testnet"), - ("2154", "findora_forge"), - ("2199", "moonsama"), - ("2202", "antofy"), - ("2203", "bitcoin_evm"), - ("2213", "evanesco"), - ("2221", "kava_testnet"), - ("2222", "kava"), - ("2223", "v"), - ("2241", "krest"), - ("2300", "bomb"), - ("2306", "ebro"), - ("2309", "arevia"), - ("2323", "soma_testnet"), - ("2330", "altcoin"), - ("2332", "soma"), - ("2358", "kroma_sepolia"), - ("2399", "bomb_testnet"), - ("2400", "tcg_verse"), - ("2415", "xodex"), - ("2458", "hybrid_testnet"), - ("2468", "hybrid"), - ("2484", "unicorn_ultra_nebulas_testnet"), - ("2522", "fraxtal_testnet"), - ("2559", "kortho"), - ("2569", "techpay"), - ("2606", "pocrnet"), - ("2611", "redlight"), - ("2612", "ez_c"), - ("2613", "ez_c_testnet"), - ("2625", "whitebit_testnet"), - ("2710", "morph_testnet"), - ("2718", "k_laos"), - ("2888", "boba_goerli_testnet"), - ("2999", "bityuan"), - ("3000", "cennznet_rata"), - ("3001", "cennznet_nikau"), - ("3003", "canxium"), - ("3011", "playa3ull_games"), - ("3031", "orlando"), - ("3068", "bifrost"), - ("3100", "immu3_evm"), - ("3102", "vulture_evm_beta"), - ("3141", "filecoin___hyperspace_testnet"), - ("3269", "dubxcoin"), - ("3270", "dubxcoin_testnet"), - ("3306", "debounce_subnet_testnet"), - ("3331", "zcore_testnet"), - ("3333", "web3q_testnet"), - ("3334", "web3q_galileo"), - ("3400", "paribu_net"), - ("3434", "secure_testnet"), - ("3500", "paribu_net_testnet"), - ("3501", "jfin"), - ("3601", "pandoproject"), - ("3602", "pandoproject_testnet"), - ("3636", "botanix_testnet"), - ("3637", "botanix"), - ("3639", "i"), - ("3666", "jouleverse"), - ("3690", "bittex"), - ("3693", "empire"), - ("3698", "senjepowers_testnet"), - ("3699", "senjepowers"), - ("3701", "xpla_testnet"), - ("3737", "crossbell"), - ("3797", "alvey"), - ("3799", "tangle_testnet"), - ("3885", "fire_zkevm_ghostrider"), - ("3888", "kaly"), - ("3889", "kaly_testnet"), - ("3912", "drac"), - ("3939", "dos_tesnet"), - ("3966", "dyno"), - ("3967", "dyno_testnet"), - ("3999", "yuan"), - ("4000", "ozone"), - ("4001", "peperium_testnet"), - ("4002", "fantom_testnet"), - ("4003", "x1_fastnet"), - ("4051", "bobaopera_testnet"), - ("4061", "nahmii_3"), - ("4062", "nahmii_3_testnet"), - ("4078", "muster"), - ("4090", "fastex_bahamut_oasis_testnet"), - ("4096", "bitindi_testnet"), - ("4099", "bitindi"), - ("4102", "aioz_testnet"), - ("4139", "humans.ai_testnet"), - ("4141", "tipboxcoin_testnet"), - ("4181", "phi_v1"), - ("4201", "lukso_testnet"), - ("4242", "nexi"), - ("4243", "nexi_v2"), - ("4328", "bobafuji_testnet"), - ("4337", "beam"), - ("4400", "credit"), - ("4444", "htmlcoin"), - ("4460", "orderly_sepolia_testnet"), - ("4689", "iotex"), - ("4690", "iotex_testnet"), - ("4759", "meverse_testnet"), - ("4777", "blackfort_exchange_testnet"), - ("4893", "globel"), - ("4918", "venidium_testnet"), - ("4919", "venidium"), - ("4999", "blackfort_exchange"), - ("5000", "mantle"), - ("5001", "mantle_testnet"), - ("5002", "treasurenet_alpha"), - ("5003", "mantle_sepolia_testnet"), - ("5005", "treasurenet_testnet"), - ("5165", "bahamut"), - ("5169", "smart_layer"), - ("5177", "tl"), - ("5197", "eraswap"), - ("5234", "humanode"), - ("5290", "fire_old"), - ("5315", "uzmi"), - ("5353", "tritanium_testnet"), - ("5522", "vex_evm_testnet"), - ("5551", "nahmii"), - ("5553", "nahmii_testnet"), - ("5555", "verse"), - ("5611", "opbnb_testnet"), - ("5616", "arcturus_testnet"), - ("5678", "tanssi_evm_container"), - ("5700", "syscoin_tanenbaum_testnet"), - ("5729", "hika_testnet"), - ("5758", "satoshi_testnet"), - ("5777", "ganache"), - ("5851", "ontology_testnet"), - ("5869", "wego_rubidium"), - ("6065", "tres_testnet"), - ("6066", "tres"), - ("6102", "cascadia_testnet"), - ("6118", "uptn_testnet"), - ("6119", "uptn"), - ("6363", "digit_soul"), - ("6502", "peerpay"), - ("6552", "scolcoin_wei_testnet"), - ("6565", "fox_testnet"), - ("6626", "pixie"), - ("6660", "latest_testnet"), - ("6661", "cybria"), - ("6666", "cybria_testnet"), - ("6688", "irishub"), - ("6701", "paxb"), - ("6779", "compverse"), - ("6789", "gold"), - ("6969", "tomb"), - ("6999", "polysmart"), - ("7000", "zeta"), - ("7001", "zeta_athens_3_testnet"), - ("7007", "bst"), - ("7027", "ella_the_heart"), - ("7070", "planq"), - ("7100", "nume"), - ("7118", "help_the_homeless"), - ("7171", "bitrock"), - ("7331", "klyntar"), - ("7332", "horizen_eon"), - ("7341", "shyft"), - ("7484", "raba"), - ("7518", "meverse"), - ("7575", "adil_testnet"), - ("7576", "adil_v2"), - ("7668", "the_root"), - ("7672", "the_root___porcini_testnet"), - ("7700", "canto"), - ("7701", "canto_tesnet"), - ("7771", "bitrock_testnet"), - ("7777", "rise_of_the_warbots_testnet"), - ("7860", "maal_testnet"), - ("7878", "hazlor_testnet"), - ("7887", "kinto"), - ("7895", "ardenium_athena"), - ("7979", "dos"), - ("8000", "teleport"), - ("8001", "teleport_testnet"), - ("8029", "mdgl_testnet"), - ("8080", "shardeum_liberty_1.x"), - ("8081", "shardeum_liberty_2.x"), - ("8082", "shardeum_sphinx_1.x"), - ("8086", "bitcoin"), - ("8087", "e_dollar"), - ("8098", "streamux_block"), - ("8131", "qitmeer_testnet"), - ("8132", "qitmeer_mixnet"), - ("8133", "qitmeer_privnet"), - ("8134", "amana"), - ("8135", "flana"), - ("8136", "mizana"), - ("8181", "testnet_beone"), - ("8192", "torus"), - ("8194", "torus_testnet"), - ("8217", "klaytn_cypress"), - ("8272", "blockton_block"), - ("8285", "korthotest"), - ("8387", "dracones_financial_services"), - ("8453", "base"), - ("8654", "toki"), - ("8655", "toki_testnet"), - ("8668", "hela_official_runtime"), - ("8723", "tool_global"), - ("8724", "tool_global_testnet"), - ("8726", "storage"), - ("8727", "storage_testnet"), - ("8738", "alph"), - ("8768", "tmy"), - ("8848", "maro_block"), - ("8880", "unique"), - ("8881", "quartz_by_unique"), - ("8882", "opal_testnet_by_unique"), - ("8883", "sapphire_by_unique"), - ("8888", "xana"), - ("8889", "vyvo"), - ("8898", "mammoth"), - ("8899", "jib"), - ("8989", "giant_mammoth"), - ("8995", "bloxberg"), - ("9000", "evmos_testnet"), - ("9001", "evmos"), - ("9012", "berylbit"), - ("9024", "nexa_block"), - ("9100", "genesis_coin"), - ("9170", "rinia_testnet_old"), - ("9223", "codefin"), - ("9339", "dogcoin_testnet"), - ("9395", "evoke"), - ("9527", "rangers_protocol_testnet_robin"), - ("9528", "qeasyweb3_testnet"), - ("9559", "neonlink_testnet"), - ("9700", "oortdev"), - ("9728", "boba_bnb_testnet"), - ("9768", "mainnetz_testnet"), - ("9779", "pepenetwork"), - ("9790", "carbon_evm"), - ("9792", "carbon_evm_testnet"), - ("9818", "imperium_testnet"), - ("9819", "imperium"), - ("9888", "dogelayer"), - ("9977", "mind_testnet"), - ("9980", "combo"), - ("9990", "agung"), - ("9996", "mind"), - ("9997", "altlayer_testnet"), - ("9999", "myown_testnet"), - ("10000", "smart_bitcoin_cash"), - ("10001", "smart_bitcoin_cash_testnet"), - ("10024", "gon"), - ("10081", "japan_open_testnet"), - ("10086", "sjatsh"), - ("10101", "block_genesis"), - ("10200", "gnosis_chiado_testnet"), - ("10201", "maxx"), - ("10242", "arthera"), - ("10243", "arthera_testnet"), - ("10248", "0xtade"), - ("10395", "worldland_testnet"), - ("10507", "numbers"), - ("10508", "numbers_testnet"), - ("10823", "cryptocoinpay"), - ("10946", "quadrans_block"), - ("10947", "quadrans_block_testnet"), - ("11110", "astra"), - ("11111", "wagmi"), - ("11115", "astra_testnet"), - ("11119", "hashbit"), - ("11235", "haqq"), - ("11437", "shyft_testnet"), - ("11612", "sardis_testnet"), - ("11888", "sanr"), - ("11891", "polygon_supernet_arianee"), - ("12009", "satoshi"), - ("12051", "singularity_zero_testnet"), - ("12052", "singularity_zero"), - ("12123", "brc"), - ("12306", "fibonacci"), - ("12321", "blg_testnet"), - ("12345", "step_testnet"), - ("12611", "astar_zkevm"), - ("12715", "rikeza_testnet"), - ("12890", "quantum_testnet"), - ("13000", "sps"), - ("13337", "beam_testnet"), - ("13371", "immutable_zkevm"), - ("13381", "phoenix"), - ("13473", "immutable_zkevm_testnet"), - ("13812", "susono"), - ("14000", "sps_testnet"), - ("14853", "humanode_testnet_5_israfel"), - ("15003", "immutable_zkevm_devnet"), - ("15551", "loopnetwork"), - ("15555", "trust_evm_testnet"), - ("15557", "eos_evm_testnet"), - ("16000", "metadot"), - ("16001", "metadot_testnet"), - ("16507", "genesys"), - ("16688", "irishub_testnet"), - ("16718", "airdao"), - ("16888", "ivar_testnet"), - ("17000", "holesky"), - ("17001", "redstone_holesky_testnet"), - ("17171", "g8"), - ("17172", "eclipse_subnet"), - ("17180", "palette_testnet"), - ("17777", "eos_evm"), - ("18000", "frontier_of_dreams_testnet"), - ("18122", "smart_trades"), - ("18159", "proof_of_memes"), - ("18181", "g8_testnet"), - ("18686", "mxc_zkevm"), - ("19011", "home_verse"), - ("19527", "magnet"), - ("19845", "btcix"), - ("20001", "camelark"), - ("20729", "callisto_testnet"), - ("20736", "p12"), - ("20765", "jono11_subnet"), - ("21133", "all_about_healthy"), - ("21337", "cennznet_azalea"), - ("21816", "om"), - ("21912", "bsl"), - ("22023", "taycan"), - ("22040", "airdao_testnet"), - ("22222", "nautilus"), - ("22324", "goldx_testnet"), - ("22776", "map"), - ("23006", "antofy_testnet"), - ("23118", "opside_testnet"), - ("23294", "oasis_sapphire"), - ("23295", "oasis_sapphire_testnet"), - ("23888", "blast_testnet"), - ("24484", "web"), - ("24734", "mintme.com"), - ("25186", "liquidlayer"), - ("25888", "hammer"), - ("25925", "bitkub_testnet"), - ("26026", "ferrum_testnet"), - ("26600", "hertz"), - ("26863", "oasis"), - ("28528", "optimism_bedrock_goerli_alpha_testnet"), - ("29548", "mch_verse"), - ("30067", "piece_testnet"), - ("30103", "cerium_testnet"), - ("31102", "ethersocial"), - ("31223", "cloudtx"), - ("31224", "cloudtx_testnet"), - ("31337", "go_testnet"), - ("31414", "evoke_testnet"), - ("31415", "filecoin___wallaby_testnet"), - ("32001", "w3gamez_holesky_testnet"), - ("32520", "bitgert"), - ("32659", "fusion"), - ("32769", "zilliqa_evm"), - ("32990", "zilliqa_evm_isolated_server"), - ("33101", "zilliqa_evm_testnet"), - ("33210", "cloudverse_subnet"), - ("33333", "aves"), - ("33385", "zilliqa_evm_devnet"), - ("33469", "zilliqa_2_evm_devnet"), - ("34443", "mode"), - ("35011", "j2o_taro"), - ("35441", "q"), - ("35443", "q_testnet"), - ("38400", "connectormanager"), - ("38401", "connectormanager_robin"), - ("39797", "energi"), - ("39815", "oho"), - ("41500", "opulent_x_beta"), - ("42069", "pegglecoin"), - ("42161", "arbitrum_one"), - ("42170", "arbitrum_nova"), - ("42220", "celo"), - ("42261", "oasis_emerald_testnet"), - ("42262", "oasis_emerald"), - ("42355", "goldx"), - ("42766", "zkfair"), - ("42801", "gesoten_verse_testnet"), - ("42888", "kinto_testnet"), - ("43110", "athereum"), - ("43113", "avalanche_fuji_testnet"), - ("43114", "avalanche_c"), - ("43288", "boba_avax"), - ("43851", "zkfair_testnet"), - ("44444", "fren"), - ("44787", "celo_alfajores_testnet"), - ("45000", "autobahn"), - ("45510", "deelance"), - ("46688", "fusion_testnet"), - ("47805", "rei"), - ("49049", "wireshape_floripa_testnet"), - ("49088", "bifrost_testnet"), - ("49797", "energi_testnet"), - ("50001", "liveplex_oracleevm"), - ("50005", "yooldo_verse"), - ("50006", "yooldo_verse_testnet"), - ("50021", "gton_testnet"), - ("51178", "lumoz_testnet_alpha"), - ("51712", "sardis"), - ("52014", "electroneum"), - ("53935", "dfk"), - ("54211", "haqq_testnet"), - ("54321", "toronet_testnet"), - ("55004", "titan"), - ("55556", "rei_testnet"), - ("56288", "boba_bnb"), - ("56789", "velo_labs"), - ("57000", "rollux_testnet"), - ("58008", "sepolia_pgn_public_goods"), - ("59140", "linea_testnet"), - ("59144", "linea"), - ("59971", "genesys_code"), - ("60000", "thinkium_testnet_0"), - ("60001", "thinkium_testnet_1"), - ("60002", "thinkium_testnet_2"), - ("60103", "thinkium_testnet_103"), - ("61800", "axel_dev_net"), - ("61803", "etica"), - ("61916", "doken_super"), - ("62320", "celo_baklava_testnet"), - ("62621", "multivac"), - ("63000", "ecredits"), - ("63001", "ecredits_testnet"), - ("65450", "scolcoin"), - ("66988", "janus_testnet"), - ("67390", "siriusnet"), - ("67588", "cosmic"), - ("68770", "dm2_verse"), - ("69420", "condrieu"), - ("70000", "thinkium_0"), - ("70001", "thinkium_1"), - ("70002", "thinkium_2"), - ("70103", "thinkium_103"), - ("71111", "guapcoinx"), - ("71393", "polyjuice_testnet"), - ("71401", "godwoken_testnet_v1"), - ("71402", "godwoken"), - ("72992", "grok"), - ("73799", "energy_web_volta_testnet"), - ("73927", "mixin_virtual_machine"), - ("75000", "resincoin"), - ("77238", "foundry_testnet"), - ("77612", "vention"), - ("77777", "toronet"), - ("78110", "firenze_test"), - ("78281", "dragonfly_hexapod"), - ("78430", "amplify_subnet"), - ("78431", "bulletin_subnet"), - ("78432", "conduit_subnet"), - ("79879", "gold_testnet"), - ("80001", "mumbai"), - ("80085", "bera_artio"), - ("81041", "nordek"), - ("81341", "amana_testnet"), - ("81342", "amana_mixnet"), - ("81343", "amana_privnet"), - ("81351", "flana_testnet"), - ("81352", "flana_mixnet"), - ("81353", "flana_privnet"), - ("81361", "mizana_testnet"), - ("81362", "mizana_mixnet"), - ("81363", "mizana_privnet"), - ("81720", "quantum"), - ("82459", "smart_layer_testnet"), - ("84531", "base_goerli_testnet"), - ("84532", "base_sepolia_testnet"), - ("84886", "aerie"), - ("85449", "cybertrust"), - ("88002", "nautilus_proteus_testnet"), - ("88880", "chiliz_scoville_testnet"), - ("88888", "ivar"), - ("90210", "beverly_hills"), - ("91002", "nautilus_trition"), - ("91715", "combo_testnet"), - ("92001", "lambda_testnet"), - ("93572", "liquidlayer_testnet"), - ("96970", "mantis_testnet_hexapod"), - ("97288", "boba_bnb_old"), - ("99099", "eliberty_testnet"), - ("99998", "ubtestnet"), - ("99999", "ub"), - ("100000", "quark_root"), - ("100001", "quark_shard_0"), - ("100002", "quark_shard_1"), - ("100003", "quark_shard_2"), - ("100004", "quark_shard_3"), - ("100005", "quark_shard_4"), - ("100006", "quark_shard_5"), - ("100007", "quark_shard_6"), - ("100008", "quark_shard_7"), - ("100009", "ve"), - ("100010", "ve_testnet"), - ("101010", "soverun_testnet"), - ("103090", "crystaleum"), - ("108801", "bro"), - ("110000", "quark_devnet_root"), - ("110001", "quark_devnet_shard_0"), - ("110002", "quark_devnet_shard_1"), - ("110003", "quark_devnet_shard_2"), - ("110004", "quark_devnet_shard_3"), - ("110005", "quark_devnet_shard_4"), - ("110006", "quark_devnet_shard_5"), - ("110007", "quark_devnet_shard_6"), - ("110008", "quark_devnet_shard_7"), - ("111000", "siberium_test"), - ("111111", "siberium"), - ("112358", "meta_one"), - ("123456", "adil_devnet"), - ("128123", "etherlink_testnet"), - ("131419", "etnds"), - ("142857", "icplaza"), - ("167004", "taiko_alpha_2_testnet"), - ("167005", "taiko_grimsvotn_l2"), - ("167006", "taiko_eldfell_l3"), - ("167007", "taiko_jolnir_l2"), - ("167008", "taiko_katla_l2"), - ("188710", "bitica"), - ("188881", "condor_test"), - ("200101", "milkomeda_c1_testnet"), - ("200202", "milkomeda_a1_testnet"), - ("200625", "akroma"), - ("201018", "alaya"), - ("201030", "alaya_dev_testnet"), - ("201804", "mythical"), - ("202020", "decimal_testnet"), - ("202212", "x1_devnet"), - ("202624", "jellie"), - ("204005", "x1_network"), - ("210425", "platon"), - ("220315", "mas"), - ("221230", "reap"), - ("221231", "reap_testnet"), - ("224168", "taf_eco"), - ("224422", "conet_sebolia_testnet"), - ("224433", "conet_holesky"), - ("230315", "hashkey_testnet"), - ("234666", "haymo_testnet"), - ("246529", "artis_sigma1"), - ("246785", "artis_testnet_tau1"), - ("247253", "saakuru_testnet"), - ("256256", "cmp"), - ("266256", "gear_zero_testnet"), - ("271271", "egoncoin_testnet"), - ("281121", "social"), - ("314159", "filecoin___calibration_testnet"), - ("330844", "ttcoin"), - ("333331", "aves_testnet"), - ("333333", "nativ3_testnet"), - ("333666", "oone_testnet"), - ("333777", "oone_devnet"), - ("333888", "polis_testnet"), - ("333999", "polis"), - ("355113", "bitfinity_testnet"), - ("363636", "digit_soul_2"), - ("373737", "hap_testnet"), - ("381931", "metal_c"), - ("381932", "metal_tahoe_c"), - ("404040", "tipboxcoin"), - ("420420", "kek"), - ("420666", "kek_kektest"), - ("420692", "alterium_l2_testnet"), - ("421611", "arbitrum_rinkeby"), - ("421613", "arbitrum_goerli"), - ("421614", "arbitrum_sepolia"), - ("424242", "fastex_testnet"), - ("431140", "markr_go"), - ("432201", "dexalot_subnet_testnet"), - ("432204", "dexalot_subnet"), - ("444900", "weelink_testnet"), - ("471100", "patex_sepolia_testnet"), - ("473861", "ultra_pro"), - ("474142", "open"), - ("512512", "cmp_testnet"), - ("513100", "ethereum_fair"), - ("534351", "scroll_sepolia_testnet"), - ("534352", "scroll"), - ("534353", "scroll_alpha_testnet"), - ("534354", "scroll_pre_alpha_testnet"), - ("534849", "shinarium_beta"), - ("535037", "beaneco_smart"), - ("622277", "hypra"), - ("641230", "bear"), - ("651940", "all"), - ("666666", "vision___vpioneer_test"), - ("666888", "hela_official_runtime_testnet"), - ("751230", "bear_testnet"), - ("761412", "miexs_smart"), - ("776877", "modularium"), - ("800001", "octaspace"), - ("827431", "curve"), - ("846000", "4goodnetwork"), - ("855456", "dodao"), - ("879151", "blocx"), - ("888888", "vision"), - ("900000", "posi_shard_0"), - ("910000", "posi_testnet_shard_0"), - ("912559", "astria_evm_dusknet"), - ("920000", "posi_devnet_shard_0"), - ("920001", "posi_devnet_shard_1"), - ("923018", "fncy_testnet"), - ("955081", "jono12_subnet"), - ("955305", "eluvio_content_fabric"), - ("988207", "ecrox"), - ("1127469", "tiltyard_subnet"), - ("1261120", "zkatana"), - ("1313114", "etho_protocol"), - ("1313500", "xerom"), - ("1337702", "kintsugi"), - ("1337802", "kiln"), - ("1337803", "zhejiang"), - ("1731313", "turkey_demo_dev"), - ("2021398", "debank_testnet"), - ("2099156", "plian_main"), - ("2206132", "platon_dev_testnet2"), - ("2611555", "dpu"), - ("3141592", "filecoin___butterfly_testnet"), - ("3441005", "manta_pacific_testnet"), - ("4000003", "altlayer_zero_gas"), - ("4281033", "worlds_caldera"), - ("5167003", "mxc_wannsee_zkevm_testnet"), - ("5201420", "electroneum_testnet"), - ("5555555", "imversed"), - ("5555558", "imversed_testnet"), - ("7225878", "saakuru"), - ("7355310", "openvessel"), - ("7668378", "ql1_testnet"), - ("7762959", "musicoin"), - ("7777777", "zora"), - ("8007736", "plian_sub_1"), - ("8080808", "hokum"), - ("8794598", "hap"), - ("8888881", "quarix_testnet"), - ("8888888", "quarix"), - ("9322252", "xcap"), - ("9322253", "milvine"), - ("10067275", "plian_testnet_sub_1"), - ("10101010", "soverun"), - ("11155111", "sepolia"), - ("11155420", "op_sepolia_testnet"), - ("13371337", "pep_churchill"), - ("14288640", "andus"), - ("16658437", "plian_testnet_main"), - ("18289463", "iolite"), - ("20180430", "smartmesh"), - ("20181205", "quarkblock"), - ("20201022", "pego"), - ("20482050", "hokum_testnet"), - ("22052002", "excelon"), - ("27082017", "excoincial_volta_testnet"), - ("27082022", "excoincial"), - ("28122024", "ancient8_testnet"), - ("28945486", "auxilium"), - ("29032022", "fla"), - ("31415926", "filecoin___local_testnet"), - ("35855456", "joys_digital"), - ("43214913", "maistestsubnet"), - ("61717561", "aqua"), - ("65010000", "autonity_bakerloo_thames_testnet"), - ("65010001", "autonity_bakerloo_barada_testnet"), - ("65100000", "autonity_piccadilly_thames_testnet"), - ("65100001", "autonity_piccadilly_barada_testnet"), - ("68840142", "frame_testnet"), - ("88888888", "t.e.a.m_block"), - ("99415706", "joys_digital_testnet"), - ("168587773", "blast_sepolia_testnet"), - ("192837465", "gather"), - ("222000222", "kanazawa"), - ("245022926", "neon_evm_devnet"), - ("245022934", "neon_evm"), - ("245022940", "neon_evm_testnet"), - ("278611351", "razor_skale"), - ("311752642", "oneledger"), - ("333000333", "meld"), - ("344106930", "skale_calypso_hub_testnet"), - ("356256156", "gather_testnet"), - ("476158412", "skale_europa_hub_testnet"), - ("486217935", "gather_devnet"), - ("503129905", "skale_nebula_hub_testnet"), - ("888888888", "ancient8"), - ("999999999", "zora_sepolia_testnet"), - ("1122334455", "ipos"), - ("1146703430", "cyberdecknet"), - ("1273227453", "human_protocol"), - ("1313161554", "aurora"), - ("1313161555", "aurora_testnet"), - ("1313161556", "aurora_betanet"), - ("1350216234", "skale_titan_hub"), - ("1351057110", "chaos_skale_testnet"), - ("1380996178", "raptor"), - ("1482601649", "skale_nebula_hub"), - ("1517929550", "skale_titan_hub_testnet"), - ("1564830818", "skale_calypso_hub"), - ("1666600000", "harmony_shard_0"), - ("1666600001", "harmony_shard_1"), - ("1666600002", "harmony_shard_2"), - ("1666600003", "harmony_shard_3"), - ("1666700000", "harmony_testnet_shard_0"), - ("1666700001", "harmony_testnet_shard_1"), - ("1666900000", "harmony_devnet_shard_0"), - ("1666900001", "harmony_devnet_shard_1"), - ("2021121117", "datahopper"), - ("2046399126", "skale_europa_hub"), - ("3125659152", "pirl"), - ("4216137055", "oneledger_testnet_frankenstein"), - ("11297108099", "palm_testnet"), - ("11297108109", "palm"), - ("111222333444", "alphabet"), - ("197710212030", "ntity"), - ("197710212031", "haradev_testnet"), - ("383414847825", "zeniq"), - ("666301171999", "pdc"), - ("6022140761023", "molereum"), - ] - .into_iter() - .filter_map(|(chain_id, name)| match chain_id.try_into_chain_id() { - Ok(chain_id) => Some((chain_id, name.to_string())), - Err(_) => None, - }) - .collect() +pub fn get_network_names() -> &'static HashMap { + static CACHE: OnceLock> = OnceLock::new(); + CACHE.get_or_init(|| NETWORKS.iter().map(|&(chain_id, name)| (chain_id.into(), name)).collect()) } + +pub(crate) const NETWORKS: &[(u64, &str)] = &[ + (1, "ethereum"), + (2, "expanse"), + (3, "ropsten"), + (4, "rinkeby"), + (5, "goerli"), + (6, "kotti_testnet"), + (7, "thai"), + (8, "ubiq"), + (9, "ubiq_testnet"), + (10, "optimism"), + (11, "metadium"), + (12, "metadium_testnet"), + (13, "diode_testnet_staging"), + (14, "flare"), + (15, "diode_prenet"), + (16, "songbird_testnet_coston"), + (17, "thaifi"), + (18, "thundercore_testnet"), + (19, "songbird_canary"), + (20, "elastos"), + (21, "elastos_testnet"), + (22, "ela_did"), + (23, "ela_did_testnet"), + (24, "kardia"), + (25, "cronos"), + (26, "genesis_testnet"), + (27, "shiba"), + (28, "boba_rinkeby_testnet"), + (29, "genesis"), + (30, "rootstock"), + (31, "rootstock_testnet"), + (32, "gooddata_testnet"), + (33, "gooddata"), + (34, "secure"), + (35, "tbwg"), + (36, "dx"), + (37, "xpla"), + (38, "valorbit"), + (39, "u2u_solaris"), + (40, "telos_evm"), + (41, "telos_evm_testnet"), + (42, "lukso"), + (43, "darwinia_pangolin_testnet"), + (44, "crab"), + (45, "darwinia_pangoro_testnet"), + (46, "darwinia"), + (47, "acria_intelli"), + (48, "ennothem_proterozoic"), + (49, "ennothem_testnet_pioneer"), + (50, "xdc"), + (51, "xdc_apothem"), + (52, "coinex"), + (53, "coinex_testnet"), + (54, "openpiece"), + (55, "zyx"), + (56, "bsc"), + (57, "syscoin"), + (58, "ontology"), + (59, "eos_evm_legacy"), + (60, "go"), + (61, "ethereum_classic"), + (62, "morden_testnet"), + (63, "mordor_testnet"), + (64, "ellaism"), + (65, "okex_testnet"), + (66, "okx"), + (67, "db_testnet"), + (68, "soterone"), + (69, "optimism_kovan"), + (70, "hoo"), + (71, "conflux_espace_testnet"), + (72, "dx_testnet"), + (73, "fncy"), + (74, "id"), + (75, "decimal"), + (76, "mix"), + (77, "poa_sokol"), + (78, "primus"), + (79, "zenith"), + (80, "gene"), + (81, "japan_open"), + (82, "meter"), + (83, "meter_testnet"), + (84, "linqto_devnet"), + (85, "gate_testnet"), + (86, "gate"), + (87, "nova"), + (88, "viction"), + (89, "viction_testnet"), + (90, "garizon_stage0"), + (91, "garizon_stage1"), + (92, "garizon_stage2"), + (93, "garizon_stage3"), + (94, "swissdlt"), + (95, "camdl"), + (96, "bitkub"), + (97, "bnb_testnet"), + (98, "six_protocol"), + (99, "poa_core"), + (100, "gnosis"), + (101, "etherinc"), + (102, "web3games_testnet"), + (103, "worldland"), + (104, "kaiba_lightning_testnet"), + (105, "web3games_devnet"), + (106, "velas_evm"), + (107, "nebula_testnet"), + (108, "thundercore"), + (109, "shibarium"), + (110, "proton_testnet"), + (111, "etherlite"), + (112, "coinbit"), + (113, "dehvo"), + (114, "flare_testnet_coston2"), + (116, "debank"), + (117, "uptick"), + (118, "arcology_testnet"), + (119, "enuls"), + (120, "enuls_testnet"), + (121, "real"), + (122, "fuse"), + (123, "fuse_sparknet"), + (124, "decentralized_web"), + (125, "oy_testnet"), + (126, "oy"), + (127, "factory_127"), + (128, "huobi_eco"), + (129, "innovator"), + (131, "engram_testnet"), + (132, "namefi"), + (133, "hashkey_testnet"), + (134, "iexec"), + (135, "alyx_testnet"), + (136, "deam"), + (137, "polygon"), + (138, "defi_oracle_meta"), + (139, "woop"), + (140, "eternal"), + (141, "openpiece_testnet"), + (142, "dax"), + (144, "phi_v2"), + (145, "soraai_testnet"), + (147, "flag"), + (148, "shimmerevm"), + (150, "six_protocol_testnet"), + (151, "redbelly"), + (152, "redbelly_devnet"), + (153, "redbelly_testnet"), + (154, "redbelly_tge"), + (155, "tenet_testnet"), + (156, "oeblock_testnet"), + (157, "puppynet_shibarium"), + (158, "roburna"), + (159, "roburna_testnet"), + (160, "armonia_eva"), + (161, "armonia_eva_testnet"), + (162, "lightstreams_testnet"), + (163, "lightstreams"), + (164, "omni_omega_testnet"), + (166, "omni"), + (167, "atoshi_testnet"), + (168, "aioz"), + (169, "manta_pacific"), + (170, "hoo_testnet"), + (171, "co2e_ledger"), + (172, "latam_block_resil_testnet"), + (176, "dc"), + (178, "abey_testnet"), + (179, "abey"), + (180, "ame"), + (181, "waterfall"), + (183, "ethernity"), + (184, "dojima_testnet"), + (185, "mint"), + (186, "seele"), + (187, "dojima"), + (188, "bmc"), + (189, "bmc_testnet"), + (190, "cmdao_bbq"), + (191, "filefilego"), + (193, "crypto_emergency"), + (195, "x_layer_testnet"), + (196, "x_layer"), + (197, "neutrinos_testnet"), + (198, "bit"), + (199, "bittorrent"), + (200, "arbitrum_on_xdai"), + (201, "moac_testnet"), + (202, "edgeless_testnet"), + (204, "opbnb"), + (205, "ekaash"), + (206, "vinu_testnet"), + (207, "vinu"), + (208, "structx"), + (210, "bitnet"), + (211, "freight_trust"), + (212, "mapo_makalu"), + (213, "b2_hub"), + (214, "shinarium"), + (217, "siriusnet_v2"), + (218, "soterone_old"), + (220, "scalind_testnet"), + (221, "blockex"), + (222, "permission"), + (223, "b2"), + (224, "viridis_testnet"), + (225, "la"), + (226, "la_testnet"), + (228, "mind"), + (230, "swapdex"), + (233, "ethernity_testnet"), + (234, "protojumbo_testnet"), + (236, "deam_testnet"), + (238, "blast"), + (242, "plinga"), + (246, "energy_web"), + (248, "oasys"), + (250, "fantom_opera"), + (252, "fraxtal"), + (254, "swan"), + (255, "kroma"), + (256, "huobi_eco_testnet"), + (258, "setheum"), + (259, "neonlink"), + (261, "guru_testnet"), + (262, "sur_block"), + (266, "neura"), + (267, "neura_testnet"), + (268, "neura_devnet"), + (269, "high_performance_block"), + (271, "egoncoin"), + (278, "xfair.ai"), + (279, "bpx_block"), + (282, "cronos_zkevm_testnet"), + (288, "boba"), + (291, "orderly"), + (295, "hedera"), + (296, "hedera_testnet"), + (297, "hedera_previewnet"), + (298, "hedera_localnet"), + (300, "zksync_sepolia_testnet"), + (301, "bobaopera"), + (302, "zkcandy_sepolia_testnet"), + (303, "neuro_testnet"), + (305, "zksats"), + (307, "lovely_testnet"), + (308, "furtheon"), + (309, "wyzth_testnet"), + (311, "omax"), + (313, "neuro"), + (314, "filecoin"), + (321, "kcc"), + (322, "kcc_testnet"), + (323, "cosvm"), + (324, "zksync"), + (325, "grvt"), + (326, "grvt_sepolia_testnet"), + (333, "web3q"), + (335, "dfk_test"), + (336, "shiden"), + (338, "cronos_testnet"), + (345, "tsc"), + (360, "shape"), + (361, "theta"), + (363, "theta_sapphire_testnet"), + (364, "theta_amber_testnet"), + (365, "theta_testnet"), + (369, "pulse"), + (371, "consta_testnet"), + (380, "zkamoeba_testnet"), + (381, "zkamoeba"), + (385, "lisinski"), + (388, "cronos_zkevm"), + (395, "camdl_testnet"), + (397, "near"), + (398, "near_testnet"), + (399, "nativ3"), + (400, "hyperon_testnet"), + (401, "ozone_testnet"), + (404, "syndr_l3"), + (411, "pepe"), + (416, "sx"), + (418, "latestnet"), + (420, "optimism_goerli_testnet"), + (422, "viridis"), + (424, "pgn_public_goods"), + (427, "zeeth"), + (428, "geso_verse"), + (434, "boyaa"), + (443, "ten_testnet"), + (444, "synapse_testnet"), + (456, "arzio"), + (462, "areon_testnet"), + (463, "areon"), + (480, "world"), + (499, "rupaya"), + (500, "camino_c"), + (501, "columbus_test"), + (510, "syndicate"), + (512, "double_a"), + (513, "double_a_testnet"), + (516, "gear_zero"), + (520, "xt"), + (529, "fire"), + (530, "fxcore"), + (534, "candle"), + (537, "optrust"), + (542, "paw_testnet"), + (545, "evm_on_flow_testnet"), + (555, "vela1"), + (558, "tao"), + (568, "doge_testnet"), + (570, "rollux"), + (571, "meta"), + (579, "filenova"), + (588, "metis_stardust_testnet"), + (592, "astar"), + (595, "acala_mandala_testnet_tc9"), + (596, "karura_testnet"), + (597, "acala_testnet"), + (599, "metis_goerli_testnet"), + (600, "meshnyan_testnet"), + (601, "vine_testnet"), + (610, "darwin_devnet"), + (612, "eiob"), + (614, "graphlinq_block"), + (624, "binary"), + (625, "binary_sepolia"), + (634, "avocado"), + (646, "previewnet"), + (647, "sx_testnet"), + (648, "endurance"), + (653, "kali_testnet"), + (654, "kali"), + (662, "ultronsmart"), + (666, "pixie_testnet"), + (667, "laos_arrakis"), + (668, "junca"), + (669, "junca_testnet"), + (686, "karura"), + (690, "redstone"), + (700, "star_social_testnet"), + (701, "darwinia_koi_testnet"), + (707, "block_station"), + (708, "block_station_testnet"), + (710, "highbury"), + (711, "tucana"), + (712, "birdee_2"), + (713, "vrcscan"), + (719, "shibarium_beta"), + (721, "lycan"), + (727, "blucrates"), + (730, "lovely"), + (740, "canto_testnet"), + (741, "vention_testnet"), + (742, "script_testnet"), + (747, "evm_on_flow"), + (766, "ql1"), + (776, "open_testnet"), + (777, "cheapeth"), + (786, "maal"), + (787, "acala"), + (788, "aero_testnet"), + (789, "patex"), + (799, "rupaya_testnet"), + (800, "lucid_block"), + (803, "haic"), + (808, "portal_fantasy_test"), + (810, "haven1_testnet"), + (813, "qitmeer"), + (814, "fire_zkevm"), + (818, "beone"), + (820, "callisto"), + (822, "runic_testnet"), + (831, "checkdot_block_devnet"), + (841, "taraxa"), + (842, "taraxa_testnet"), + (852, "hongkong"), + (859, "zeeth_dev"), + (868, "fantasia"), + (876, "bandai_namco_research_verse"), + (877, "dexit"), + (880, "ambros"), + (888, "wan"), + (898, "maxi_testnet"), + (899, "maxi"), + (900, "garizon_testnet_stage0"), + (901, "garizon_testnet_stage1"), + (902, "garizon_testnet_stage2"), + (903, "garizon_testnet_stage3"), + (909, "portal_fantasy"), + (910, "decentrabone_layer1_testnet"), + (911, "taproot"), + (917, "rinia_testnet"), + (919, "mode_testnet"), + (927, "yidark"), + (940, "pulse_testnet"), + (941, "pulse_testnet_v2b"), + (942, "pulse_testnet_v3"), + (943, "pulse_testnet_v4"), + (945, "subtensor_evm_testnet"), + (956, "munode_testnet"), + (957, "lyra"), + (963, "btc20"), + (969, "ethxy"), + (970, "oort"), + (971, "oort_huygens"), + (972, "oort_ascraeus"), + (973, "palm"), + (977, "nepal_block"), + (979, "ethxy_testnet"), + (980, "top_evm"), + (985, "memo"), + (989, "top"), + (990, "eliberty"), + (995, "5ire"), + (996, "bifrost_polkadot"), + (997, "5ire_thunder_testnet"), + (998, "lucky"), + (999, "wan_testnet"), + (1000, "gton"), + (1001, "kaia_testnet_kairos"), + (1003, "tectum_emission_token"), + (1004, "t_ekta"), + (1005, "lemontestnet"), + (1006, "lemon"), + (1007, "newton_testnet"), + (1008, "eurus"), + (1009, "jumbo"), + (1010, "evrice"), + (1011, "rebus"), + (1012, "newton"), + (1022, "sakura"), + (1023, "clover_testnet"), + (1024, "clv_para"), + (1028, "bittorrent_testnet"), + (1030, "conflux_espace"), + (1031, "proxy_testnet"), + (1038, "bronos_testnet"), + (1039, "bronos"), + (1073, "shimmerevm_testnet"), + (1075, "iota_evm_testnet"), + (1079, "mintara_testnet"), + (1080, "mintara"), + (1088, "metis_andromeda"), + (1089, "humans.ai"), + (1099, "moac"), + (1100, "dymension"), + (1101, "polygon_zkevm"), + (1107, "blxq_testnet"), + (1108, "blxq"), + (1111, "wemix"), + (1112, "wemix_testnet"), + (1113, "b2_hub_testnet"), + (1115, "core_block_testnet"), + (1116, "core_block"), + (1117, "dogcoin"), + (1123, "b2_testnet"), + (1130, "defi_evm"), + (1131, "defi_evm_testnet"), + (1133, "defimeta_changi_testnet"), + (1135, "lisk"), + (1138, "amstar_testnet"), + (1139, "math"), + (1140, "math_testnet"), + (1147, "flag_testnet"), + (1149, "symplexia"), + (1170, "origin_testnet"), + (1177, "smart_host_teknoloji_testnet"), + (1188, "clubmos"), + (1197, "iora"), + (1200, "cuckoo"), + (1201, "evanesco_testnet"), + (1202, "world_trade_technical"), + (1209, "saitablocksbc"), + (1210, "cuckoo_sepolia"), + (1213, "popcateum"), + (1214, "enter"), + (1221, "cycle_testnet"), + (1223, "cycle_testnet_jellyfish"), + (1225, "hybrid_testnet"), + (1227, "bitcoin_protocol_testnet"), + (1228, "cycle_testnet_cuttlefish"), + (1229, "exzo"), + (1230, "ultron_testnet"), + (1231, "ultron"), + (1234, "step"), + (1235, "itx"), + (1243, "arc"), + (1244, "arc_testnet"), + (1246, "om_platform"), + (1248, "dogether"), + (1252, "cic_testnet"), + (1260, "metacces_testnet"), + (1280, "halo"), + (1284, "moonbeam"), + (1285, "moonriver"), + (1286, "moonrock_old"), + (1287, "moonbase_alpha"), + (1288, "moonrock"), + (1291, "swisstronik_testnet"), + (1294, "bobabeam"), + (1297, "bobabase_testnet"), + (1311, "dos_fuji_subnet"), + (1313, "jaiho"), + (1314, "alyx"), + (1319, "aia"), + (1320, "aia_testnet"), + (1328, "sei_testnet"), + (1329, "sei"), + (1337, "geth_testnet"), + (1338, "elysium_testnet"), + (1339, "elysium"), + (1343, "blitz_subnet"), + (1353, "cic"), + (1369, "zafirium"), + (1370, "ramestta"), + (1377, "pingaksha_testnet"), + (1379, "kalar"), + (1388, "amstar"), + (1392, "joseon"), + (1402, "polygon_zkevm_testnet_old"), + (1422, "polygon_zkevm_testnet_pre_audit_upgraded"), + (1433, "rikeza"), + (1440, "living_assets"), + (1442, "polygon_zkevm_testnet"), + (1452, "gil_testnet"), + (1453, "meta_istanbul"), + (1455, "ctex_scan_block"), + (1456, "zkbase"), + (1490, "vitruveo"), + (1499, "idos_games_testnet"), + (1501, "bevm_canary"), + (1506, "sherpax"), + (1507, "sherpax_testnet"), + (1513, "story_testnet"), + (1515, "beagle_messaging"), + (1559, "tenet"), + (1570, "star_testnet"), + (1578, "star"), + (1617, "ethereum_inscription"), + (1618, "catecoin"), + (1620, "atheios"), + (1625, "gravity_alpha"), + (1648, "pivotal"), + (1657, "bta"), + (1662, "liqui"), + (1663, "horizen_gobi_testnet"), + (1686, "mint_testnet"), + (1687, "mint_sepolia_testnet"), + (1688, "ludan"), + (1701, "anytype_evm"), + (1707, "tbsi"), + (1708, "tbsi_testnet"), + (1717, "doric"), + (1718, "palette"), + (1729, "reya"), + (1740, "metal_l2_testnet"), + (1750, "metal_l2"), + (1773, "party"), + (1777, "gauss"), + (1789, "zkbase_sepolia_testnet"), + (1804, "kerleano"), + (1807, "rabbit_analog_testnet"), + (1811, "lif3_testnet"), + (1818, "cube"), + (1819, "cube_testnet"), + (1821, "ruby"), + (1853, "highoctane_subnet"), + (1856, "teslafunds"), + (1875, "white"), + (1881, "gitshock_cartenz_testnet"), + (1890, "lightlink_phoenix"), + (1891, "lightlink_pegasus_testnet"), + (1898, "bon"), + (1899, "redefi_layer_2"), + (1904, "sports"), + (1907, "bitci"), + (1908, "bitci_testnet"), + (1909, "merkle_scan"), + (1911, "scalind"), + (1912, "ruby_testnet"), + (1918, "upb_crescdi_testnet"), + (1945, "onus_testnet"), + (1946, "minato"), + (1951, "d"), + (1953, "selendra_testnet"), + (1954, "dexilla_testnet"), + (1956, "aiw3_testnet"), + (1961, "selendra"), + (1967, "eleanor"), + (1969, "super_testnet"), + (1970, "super"), + (1971, "atelier"), + (1972, "redecoin"), + (1975, "onus"), + (1984, "eurus_testnet"), + (1985, "satoshie"), + (1986, "satoshie_testnet"), + (1987, "ethergem"), + (1992, "hubble_exchange"), + (1993, "b3_sepolia_testnet"), + (1994, "ekta"), + (1995, "edexa_testnet"), + (1996, "sanko"), + (1997, "kyoto"), + (1998, "kyoto_testnet"), + (2000, "doge"), + (2001, "milkomeda_c1"), + (2002, "milkomeda_a1"), + (2004, "metalink"), + (2008, "cloudwalk_testnet"), + (2009, "cloudwalk"), + (2013, "panarchy"), + (2014, "now_testnet"), + (2016, "mainnetz"), + (2017, "adiri"), + (2018, "publicmint_devnet"), + (2019, "publicmint_testnet"), + (2020, "publicmint"), + (2021, "edgeware_edgeevm"), + (2022, "beresheet_bereevm_testnet"), + (2023, "taycan_testnet"), + (2024, "swan_saturn_testnet"), + (2025, "rangers_protocol"), + (2026, "edgeless"), + (2031, "centrifuge"), + (2032, "catalyst"), + (2035, "phala"), + (2037, "kiwi_subnet"), + (2038, "shrapnel_testnet"), + (2039, "aleph_zero"), + (2040, "vanar"), + (2043, "neuroweb"), + (2044, "shrapnel_subnet"), + (2045, "aiw3"), + (2047, "stratos_testnet"), + (2048, "stratos"), + (2049, "movo"), + (2071, "metacces"), + (2077, "quokkacoin"), + (2088, "altair"), + (2089, "algol"), + (2100, "ecoball"), + (2101, "ecoball_testnet_espuma"), + (2109, "exosama"), + (2112, "u"), + (2121, "catena"), + (2122, "metaplayerone"), + (2124, "metaplayerone_dubai_testnet"), + (2136, "bigshortbets_testnet"), + (2137, "bigshortbets"), + (2138, "defi_oracle_meta_testnet"), + (2140, "oneness"), + (2141, "oneness_testnet"), + (2151, "bosagora"), + (2152, "findora"), + (2153, "findora_testnet"), + (2154, "findora_forge"), + (2162, "anime_testnet"), + (2192, "snax"), + (2199, "moonsama"), + (2202, "antofy"), + (2203, "bitcoin_evm"), + (2213, "evanesco"), + (2221, "kava_testnet"), + (2222, "kava"), + (2223, "v"), + (2241, "krest"), + (2300, "bomb"), + (2306, "ebro"), + (2309, "arevia"), + (2311, "chronicle_vesuvius_lit_protocol_testnet"), + (2323, "soma_testnet"), + (2330, "altcoin"), + (2331, "rss3_vsl_sepolia_testnet"), + (2332, "soma"), + (2340, "atleta_olympia"), + (2342, "omnia"), + (2355, "silicon_zkevm"), + (2358, "kroma_sepolia"), + (2370, "nexis_testnet"), + (2399, "bomb_testnet"), + (2400, "tcg_verse"), + (2410, "karak"), + (2415, "xodex"), + (2425, "king_of_legends"), + (2442, "polygon_zkevm_cardona_testnet"), + (2468, "hybrid"), + (2477, "6degree_of_outreach"), + (2484, "unicorn_ultra_nebulas_testnet"), + (2511, "karak_goerli"), + (2522, "fraxtal_testnet"), + (2525, "inevm"), + (2559, "kortho"), + (2569, "techpay"), + (2606, "pocrnet"), + (2611, "redlight"), + (2612, "ez_c"), + (2613, "ez_c_testnet"), + (2625, "white_testnet"), + (2648, "ailayer_testnet"), + (2649, "ailayer"), + (2662, "apex"), + (2710, "morph_testnet"), + (2718, "k_laos"), + (2730, "xr_sepolia"), + (2731, "elizabeth_testnet"), + (2748, "nanon"), + (2777, "gm"), + (2810, "morph_holesky"), + (2868, "hyperagi"), + (2882, "chips"), + (2888, "boba_goerli_testnet"), + (2889, "aarma"), + (2907, "elux"), + (2911, "hy"), + (2941, "xenon_testnet"), + (2999, "bityuan"), + (3000, "cennznet_rata"), + (3001, "cennznet_nikau"), + (3003, "canxium"), + (3011, "playa3ull_games"), + (3031, "orlando"), + (3033, "rebus_testnet"), + (3068, "bifrost"), + (3073, "movement_evm"), + (3084, "xl_testnet"), + (3100, "immu3_evm"), + (3102, "vulture_evm_beta"), + (3109, "satoshivm_alpha"), + (3110, "satoshivm_testnet"), + (3141, "filecoin_hyperspace_testnet"), + (3269, "dubxcoin"), + (3270, "dubxcoin_testnet"), + (3306, "debounce_subnet_testnet"), + (3331, "zcore_testnet"), + (3333, "ethstorage_testnet"), + (3334, "web3q_galileo"), + (3335, "ethstorage"), + (3338, "peaq"), + (3400, "paribu_net"), + (3424, "evolve"), + (3434, "secure_testnet"), + (3456, "layeredge_testnet"), + (3490, "gtcscan"), + (3500, "paribu_net_testnet"), + (3501, "jfin"), + (3601, "pandoproject"), + (3602, "pandoproject_testnet"), + (3630, "tycooncoin"), + (3636, "botanix_testnet"), + (3637, "botanix"), + (3639, "i"), + (3645, "i_testnet"), + (3666, "jouleverse"), + (3690, "bittex"), + (3693, "empire"), + (3698, "senjepowers_testnet"), + (3699, "senjepowers"), + (3701, "xpla_testnet"), + (3737, "crossbell"), + (3776, "astar_zkevm"), + (3797, "alvey"), + (3799, "tangle_testnet"), + (3885, "fire_zkevm_ghostrider"), + (3888, "kaly"), + (3889, "kaly_testnet"), + (3912, "drac"), + (3939, "dos_tesnet"), + (3966, "dyno"), + (3967, "dyno_testnet"), + (3993, "apex_testnet"), + (3999, "yuan"), + (4000, "ozone"), + (4001, "peperium_testnet"), + (4002, "fantom_testnet"), + (4003, "x1_fastnet"), + (4040, "carbonium_testnet"), + (4048, "gan_testnet"), + (4051, "bobaopera_testnet"), + (4058, "bahamut_ocean"), + (4061, "nahmii_3"), + (4062, "nahmii_3_testnet"), + (4078, "muster"), + (4080, "tobe_testnet"), + (4088, "zeroth"), + (4090, "fastex_bahamut_oasis_testnet"), + (4096, "bitindi_testnet"), + (4099, "bitindi"), + (4102, "aioz_testnet"), + (4139, "humans.ai_testnet"), + (4141, "tipboxcoin_testnet"), + (4157, "crossfi_testnet"), + (4162, "sx_rollup"), + (4181, "phi_v1"), + (4200, "merlin"), + (4201, "lukso_testnet"), + (4202, "lisk_sepolia_testnet"), + (4242, "nexi"), + (4243, "nexi_v2"), + (4269, "laika_testnet"), + (4328, "bobafuji_testnet"), + (4337, "beam"), + (4400, "credit"), + (4444, "htmlcoin"), + (4460, "orderly_sepolia_testnet"), + (4488, "hydra"), + (4544, "emoney_testnet"), + (4613, "very"), + (4653, "gold"), + (4689, "iotex"), + (4690, "iotex_testnet"), + (4759, "meverse_testnet"), + (4777, "blackfort_exchange_testnet"), + (4801, "world_sepolia_testnet"), + (4893, "globel"), + (4918, "venidium_testnet"), + (4919, "venidium"), + (4999, "blackfort_exchange"), + (5000, "mantle"), + (5001, "mantle_testnet"), + (5002, "treasurenet_alpha"), + (5003, "mantle_sepolia_testnet"), + (5005, "treasurenet_testnet"), + (5039, "onigiri_test_subnet"), + (5040, "onigiri_subnet"), + (5051, "nollie_skate_testnet"), + (5100, "syndicate_testnet"), + (5101, "syndicate_frame"), + (5102, "sic_testnet"), + (5103, "coordinape_testnet"), + (5104, "charmverse_testnet"), + (5105, "superloyalty_testnet"), + (5106, "azra_testnet"), + (5112, "ham"), + (5151, "me_testnet"), + (5165, "bahamut"), + (5169, "smart_layer"), + (5177, "tl"), + (5197, "eraswap"), + (5234, "humanode"), + (5290, "fire_old"), + (5315, "uzmi"), + (5317, "optrust_testnet"), + (5321, "itx_testnet"), + (5333, "netsbo"), + (5353, "tritanium_testnet"), + (5372, "settlus_testnet"), + (5424, "edexa"), + (5439, "ego"), + (5522, "vex_evm_testnet"), + (5545, "duck"), + (5551, "nahmii_2"), + (5553, "nahmii_2_testnet"), + (5555, "verse"), + (5611, "opbnb_testnet"), + (5615, "arcturus_testneet"), + (5616, "arcturus_testnet"), + (5656, "qie_block"), + (5675, "filenova_testnet"), + (5678, "tanssi_demo"), + (5700, "syscoin_tanenbaum_testnet"), + (5729, "hika_testnet"), + (5758, "satoshi_testnet"), + (5777, "ganache"), + (5845, "tangle"), + (5851, "ontology_testnet"), + (5858, "chang_foundation"), + (5869, "wego_rubidium"), + (6000, "bouncebit_testnet"), + (6001, "bouncebit"), + (6065, "tres_testnet"), + (6066, "tres"), + (6102, "cascadia_testnet"), + (6118, "uptn_testnet"), + (6119, "uptn"), + (6283, "laos"), + (6321, "aura_euphoria_testnet"), + (6322, "aura"), + (6363, "digit_soul"), + (6398, "connext_sepolia"), + (6502, "peerpay"), + (6550, "flamma_testnet"), + (6552, "scolcoin_wei_testnet"), + (6565, "fox_testnet"), + (6626, "pixie"), + (6660, "latest_testnet"), + (6661, "cybria"), + (6666, "cybria_testnet"), + (6667, "stor"), + (6678, "edge_matrix"), + (6688, "irishub"), + (6699, "ox"), + (6701, "paxb"), + (6779, "compverse"), + (6805, "race"), + (6806, "race_testnet"), + (6868, "pools"), + (6880, "mtt"), + (6942, "laika"), + (6969, "tomb"), + (6999, "polysmart"), + (7000, "zeta"), + (7001, "zeta_testnet"), + (7007, "bst"), + (7027, "ella_the_heart"), + (7070, "planq"), + (7077, "planq_atlas_testnet"), + (7100, "nume"), + (7118, "help_the_homeless"), + (7171, "bitrock"), + (7210, "nibiru_testnet_1"), + (7222, "nibiru_devnet_3"), + (7244, "zeus_testnet"), + (7300, "xpla_verse"), + (7331, "klyntar"), + (7332, "horizen_eon"), + (7341, "shyft"), + (7484, "raba"), + (7518, "meverse"), + (7560, "cyber"), + (7575, "adil_testnet"), + (7576, "adil_v2"), + (7668, "the_root"), + (7672, "the_root_porcini_testnet"), + (7700, "canto"), + (7701, "canto_tesnet"), + (7771, "bitrock_testnet"), + (7774, "gdcc"), + (7775, "gdcc_testnet"), + (7776, "pandasea"), + (7777, "rise_of_the_warbots_testnet"), + (7778, "orenium_protocol"), + (7798, "openex_long_testnet"), + (7860, "maal_testnet"), + (7862, "maal_v2"), + (7863, "maal_testnet_v2"), + (7878, "hazlor_testnet"), + (7887, "kinto"), + (7895, "ardenium_athena"), + (7923, "dot_blox"), + (7924, "mo"), + (7979, "dos"), + (8000, "teleport"), + (8001, "teleport_testnet"), + (8008, "polynomial"), + (8017, "isuncoin"), + (8029, "mdgl_testnet"), + (8047, "boat"), + (8054, "karak_sepolia"), + (8080, "shardeum_liberty_1.x"), + (8081, "shardeum_liberty_2.x"), + (8082, "shardeum_sphinx_1.x"), + (8086, "bitcoin"), + (8087, "e_dollar"), + (8098, "streamux_block"), + (8131, "qitmeer_testnet"), + (8132, "qitmeer_mixnet"), + (8133, "qitmeer_privnet"), + (8134, "amana"), + (8135, "flana"), + (8136, "mizana"), + (8181, "testnet_beone"), + (8192, "torus"), + (8194, "torus_testnet"), + (8217, "kaia"), + (8227, "space_subnet"), + (8272, "blockton_block"), + (8285, "korthotest"), + (8329, "lorenzo"), + (8333, "b3"), + (8387, "dracones_financial_services"), + (8428, "that"), + (8453, "base"), + (8545, "chakra_testnet"), + (8654, "toki"), + (8655, "toki_testnet"), + (8668, "hela_official_runtime"), + (8723, "tool_global"), + (8724, "tool_global_testnet"), + (8726, "storage"), + (8727, "storage_testnet"), + (8732, "bullions"), + (8738, "alph"), + (8768, "tmy"), + (8822, "iota_evm"), + (8844, "hydra_testnet"), + (8848, "maro_block"), + (8866, "superlumio"), + (8869, "lif3"), + (8880, "unique"), + (8881, "quartz_by_unique"), + (8882, "opal_testnet_by_unique"), + (8883, "sapphire_by_unique"), + (8886, "avenium_testnet"), + (8888, "xana"), + (8889, "vyvo"), + (8890, "orenium_testnet_protocol"), + (8898, "mammoth"), + (8899, "jib"), + (8911, "algen"), + (8912, "algen_testnet"), + (8921, "algen_layer2"), + (8922, "algen_layer2_testnet"), + (8989, "giant_mammoth"), + (8995, "bloxberg"), + (9000, "evmos_testnet"), + (9001, "evmos"), + (9007, "shido_testnet_block"), + (9008, "shido_block"), + (9012, "berylbit"), + (9024, "nexa_testnet_block"), + (9025, "nexa_block"), + (9069, "apex_fusion_nexus"), + (9070, "apex_fusion_nexus_testnet"), + (9100, "genesis_coin"), + (9170, "rinia_testnet_old"), + (9223, "codefin"), + (9339, "dogcoin_testnet"), + (9372, "oasys_testnet"), + (9393, "dela_sepolia_testnet"), + (9395, "evoke"), + (9496, "weavevm_testnet"), + (9527, "rangers_protocol_testnet_robin"), + (9528, "qeasyweb3_testnet"), + (9559, "neonlink_testnet"), + (9700, "oortdev"), + (9728, "boba_bnb_testnet"), + (9768, "mainnetz_testnet"), + (9779, "pepenetwork"), + (9789, "tabi_testnet"), + (9790, "carbon_evm"), + (9792, "carbon_evm_testnet"), + (9797, "optimusz7"), + (9818, "imperium_testnet"), + (9819, "imperium"), + (9876, "binary_testnet"), + (9888, "dogelayer"), + (9897, "arena_z_testnet"), + (9898, "larissa"), + (9911, "espento"), + (9966, "uxer_testnet"), + (9977, "mind_testnet"), + (9980, "combo"), + (9981, "volley"), + (9990, "agung"), + (9997, "altlayer_testnet"), + (9998, "ztc"), + (9999, "myown_testnet"), + (10000, "smart_bitcoin_cash"), + (10001, "smart_bitcoin_cash_testnet"), + (10024, "gon"), + (10081, "japan_open_testnet"), + (10086, "sjatsh"), + (10096, "metanova_verse"), + (10101, "block_genesis"), + (10200, "gnosis_chiado_testnet"), + (10201, "maxx"), + (10222, "glscan"), + (10242, "arthera"), + (10243, "arthera_testnet"), + (10248, "0xtade"), + (10321, "tao_evm"), + (10324, "tao_evm_testnet"), + (10395, "worldland_testnet"), + (10507, "numbers"), + (10508, "numbers_testnet"), + (10823, "cryptocoinpay"), + (10849, "lamina1"), + (10850, "lamina1_identity"), + (10946, "quadrans_block"), + (10947, "quadrans_block_testnet"), + (11000, "kb"), + (11011, "shape_sepolia_testnet"), + (11110, "astra"), + (11111, "wagmi"), + (11115, "astra_testnet"), + (11119, "hashbit"), + (11124, "abstract_testnet"), + (11221, "shine"), + (11227, "jiritsu_testnet_subnet"), + (11235, "haqq"), + (11437, "shyft_testnet"), + (11501, "bevm"), + (11503, "bevm_testnet"), + (11521, "sats"), + (11612, "sardis_testnet"), + (11822, "artela_testnet"), + (11891, "polygon_supernet_arianee"), + (12001, "fuse_testnet"), + (12009, "satoshi"), + (12020, "aternos"), + (12051, "singularity_zero_testnet"), + (12052, "singularity_zero"), + (12123, "brc"), + (12306, "fibonacci"), + (12321, "blg_testnet"), + (12324, "l3x_protocol"), + (12325, "l3x_protocol_testnet"), + (12345, "step_testnet"), + (12553, "rss3_vsl"), + (12715, "rikeza_testnet"), + (12781, "playdapp_testnet"), + (12890, "quantum_testnet"), + (12898, "playfair_testnet_subnet"), + (13000, "sps"), + (13337, "beam_testnet"), + (13370, "cannon_testnet"), + (13371, "immutable_zkevm"), + (13381, "phoenix"), + (13396, "masa"), + (13473, "immutable_zkevm_testnet"), + (13505, "gravity_alpha_testnet_sepolia"), + (13600, "kronobit"), + (13812, "susono"), + (14000, "sps_testnet"), + (14088, "zeroth_testnet"), + (14324, "evolve_testnet"), + (14333, "vitruveo_testnet"), + (14800, "vana_moksha_testnet"), + (14801, "vana_satori_testnet"), + (14853, "humanode_testnet_5_israfel"), + (15003, "immutable_zkevm_devnet"), + (15257, "poodl_testnet"), + (15259, "poodl"), + (15430, "kymtc"), + (15551, "loopnetwork"), + (15555, "trust_evm_testnet"), + (15557, "eos_evm_testnet"), + (16000, "metadot"), + (16001, "metadot_testnet"), + (16116, "defiverse"), + (16166, "cypherium"), + (16180, "plyr_phi"), + (16350, "incentiv_devnet"), + (16481, "pivotal_sepolia"), + (16507, "genesys"), + (16600, "0g_newton_testnet"), + (16688, "irishub_testnet"), + (16718, "airdao"), + (16888, "ivar_testnet"), + (17000, "holesky"), + (17001, "redstone_holesky_testnet"), + (17069, "garnet_holesky"), + (17071, "on_points"), + (17117, "defiverse_testnet"), + (17171, "g8"), + (17172, "eclipse_subnet"), + (17180, "palette_testnet"), + (17217, "konet"), + (17777, "eos_evm"), + (18000, "frontier_of_dreams_testnet"), + (18122, "smart_trades"), + (18159, "proof_of_memes"), + (18181, "g8_testnet"), + (18231, "unreal_old"), + (18233, "unreal"), + (18686, "mxc_zkevm_moon"), + (18888, "titan_tkx"), + (18889, "titan_tkx_testnet"), + (19011, "home_verse"), + (19077, "blockx_atlantis_testnet"), + (19191, "blockx"), + (19224, "decentraconnect_social"), + (19527, "magnet"), + (19600, "lbry"), + (19845, "btcix"), + (20001, "camelark"), + (20041, "niza"), + (20073, "niza_testnet"), + (20729, "callisto_testnet"), + (20736, "p12"), + (20765, "jono11_subnet"), + (21004, "c4ei"), + (21133, "all_about_healthy"), + (21223, "dcpay"), + (21224, "dcpay_testnet"), + (21337, "cennznet_azalea"), + (21363, "lestnet"), + (21816, "om"), + (21912, "bsl"), + (22023, "taycan"), + (22040, "airdao_testnet"), + (22222, "nautilus"), + (22324, "goldx_testnet"), + (22776, "map_protocol"), + (23006, "antofy_testnet"), + (23118, "opside_testnet"), + (23294, "oasis_sapphire"), + (23295, "oasis_sapphire_testnet"), + (23451, "dreyerx"), + (23452, "dreyerx_testnet"), + (23888, "blast_testnet"), + (24076, "kymtc_testnet"), + (24484, "web"), + (24734, "mintme.com"), + (25186, "liquidlayer"), + (25327, "everclear"), + (25839, "alvey_testnet"), + (25888, "hammer"), + (25925, "bitkub_testnet"), + (26026, "ferrum_testnet"), + (26482, "ducatusx_testnet"), + (26483, "ducatusx"), + (26600, "hertz"), + (26863, "oasis"), + (27181, "klaos_nova"), + (27483, "nanon_sepolia"), + (27827, "zeroone_subnet"), + (28516, "vizing_testnet"), + (28518, "vizing"), + (28528, "optimism_bedrock_goerli_alpha_testnet"), + (28882, "boba_sepolia"), + (29112, "hy_testnet"), + (29223, "nexa_metanet"), + (29536, "kai_testnet"), + (29548, "mch_verse"), + (30000, "q"), + (30067, "piece_testnet"), + (30088, "miyou"), + (30103, "cerium_testnet"), + (30730, "movement_evm_legacy"), + (30731, "movement_evm_devnet"), + (30732, "movement_evm_testnet"), + (31102, "ethersocial"), + (31223, "cloudtx"), + (31224, "cloudtx_testnet"), + (31337, "go_testnet"), + (31414, "evoke_testnet"), + (31415, "filecoin_wallaby_testnet"), + (31753, "x"), + (31754, "x_testnet"), + (32001, "w3gamez_holesky_testnet"), + (32382, "santiment_intelligence"), + (32520, "bitgert"), + (32659, "fusion"), + (32769, "zilliqa_evm"), + (32990, "zilliqa_evm_isolated_server"), + (33033, "entangle"), + (33101, "zilliqa_evm_testnet"), + (33103, "zilliqa_2_evm_proto_testnet"), + (33111, "curtis"), + (33133, "entangle_testnet"), + (33210, "cloudverse_subnet"), + (33333, "aves"), + (33385, "zilliqa_evm_devnet"), + (33401, "slingshot"), + (33469, "zilliqa_2_evm_devnet"), + (33979, "funki"), + (34443, "mode"), + (34504, "zeus"), + (35011, "j2o_taro"), + (35443, "q_testnet"), + (38400, "connectormanager"), + (38401, "connectormanager_robin"), + (39656, "prm"), + (39797, "energi"), + (39815, "oho"), + (40000, "div"), + (41455, "aleph_zero_evm"), + (41500, "opulent_x_beta"), + (42069, "pegglecoin"), + (42072, "agentlayer_testnet"), + (42161, "arbitrum"), + (42170, "arbitrum_nova"), + (42220, "celo"), + (42261, "oasis_emerald_testnet"), + (42262, "oasis_emerald"), + (42355, "goldx"), + (42421, "asset_testnet"), + (42766, "zkfair"), + (42793, "etherlink"), + (42801, "gesoten_verse_testnet"), + (42888, "kinto_testnet"), + (43110, "athereum"), + (43111, "hemi"), + (43113, "avalanche_fuji_testnet"), + (43114, "avalanche"), + (43288, "boba_avax"), + (43851, "zkfair_testnet"), + (44444, "fren"), + (44445, "quantum"), + (44787, "celo_alfajores_testnet"), + (45000, "autobahn"), + (45454, "swamps_l2"), + (45510, "deelance"), + (45513, "blessnet"), + (46688, "fusion_testnet"), + (47763, "neo_x"), + (47803, "redefi_layer_1"), + (47805, "rei"), + (48795, "space_subnet_testnet"), + (48899, "zircuit_testnet"), + (48900, "zircuit"), + (49049, "wireshape_floripa_testnet"), + (49088, "bifrost_testnet"), + (49321, "gunz_testnet"), + (49797, "energi_testnet"), + (50001, "liveplex_oracleevm"), + (50005, "yooldo_verse"), + (50006, "yooldo_verse_testnet"), + (50021, "gton_testnet"), + (50888, "erbie"), + (51178, "lumoz_testnet_alpha"), + (51712, "sardis"), + (52014, "electroneum"), + (53277, "doid"), + (53302, "superseed_sepolia_testnet"), + (53457, "dodo_testnet"), + (53935, "dfk"), + (54176, "overprotocol"), + (54211, "haqq_testnet"), + (54321, "toronet_testnet"), + (55004, "titan"), + (55551, "photon_aurora_testnet"), + (55556, "rei_testnet"), + (55614, "flamma"), + (56026, "lambda"), + (56288, "boba_bnb"), + (56400, "testnet_zeroone_subnet"), + (56789, "velo_labs"), + (56797, "doid_testnet"), + (57000, "rollux_testnet"), + (57451, "coinsec"), + (58008, "sepolia_pgn_public_goods"), + (58680, "lumoz_quidditch_testnet"), + (59140, "linea_goerli"), + (59141, "linea_sepolia"), + (59144, "linea"), + (59902, "metis_sepolia_testnet"), + (59971, "genesys_code"), + (60000, "thinkium_testnet_0"), + (60001, "thinkium_testnet_1"), + (60002, "thinkium_testnet_2"), + (60103, "thinkium_testnet_103"), + (60808, "bob"), + (61022, "orange"), + (61406, "kai"), + (61800, "axel_dev_net"), + (61803, "etica"), + (61916, "doken_super"), + (62049, "optopia_testnet"), + (62050, "optopia"), + (62298, "citrea_devnet"), + (62320, "celo_baklava_testnet"), + (62621, "multivac"), + (62831, "plyr_tau_testnet"), + (62850, "laos_sigma_testnet"), + (63000, "ecredits"), + (63001, "ecredits_testnet"), + (63002, "esync_testnet"), + (65349, "cratd2c_testnet"), + (65357, "vecno"), + (65450, "scolcoin"), + (65536, "automata"), + (66665, "creator_testnet"), + (66988, "janus_testnet"), + (67390, "siriusnet"), + (67588, "cosmic"), + (68770, "dm2_verse"), + (68775, "dm2_verse_testnet"), + (69420, "condrieu"), + (70000, "thinkium_0"), + (70001, "thinkium_1"), + (70002, "thinkium_2"), + (70103, "thinkium_103"), + (70700, "proof_of_play_apex"), + (71111, "guapcoinx"), + (71393, "polyjuice_testnet"), + (71401, "godwoken_testnet_v1"), + (71402, "godwoken"), + (72778, "caga_crypto_ankara_testnet"), + (72992, "grok"), + (73114, "icb_testnet"), + (73115, "icb"), + (73799, "energy_web_volta_testnet"), + (73927, "mixin_virtual_machine"), + (75000, "resincoin"), + (75512, "geek_verse"), + (75513, "geek_verse_testnet"), + (77001, "bora"), + (77238, "foundry_testnet"), + (77612, "vention"), + (77677, "cycle_sailboat"), + (77777, "toronet"), + (78110, "firenze_test"), + (78281, "dragonfly_hexapod"), + (78430, "amplify_subnet"), + (78431, "bulletin_subnet"), + (78432, "conduit_subnet"), + (78600, "vanguard"), + (79879, "gold_testnet"), + (80001, "mumbai"), + (80002, "amoy"), + (80008, "polynomia_sepolia"), + (80084, "bera_bartio"), + (80085, "bera_artio"), + (80096, "hizoco"), + (81041, "nordek"), + (81341, "amana_testnet"), + (81342, "amana_mixnet"), + (81343, "amana_privnet"), + (81351, "flana_testnet"), + (81352, "flana_mixnet"), + (81353, "flana_privnet"), + (81361, "mizana_testnet"), + (81362, "mizana_mixnet"), + (81363, "mizana_privnet"), + (82459, "smart_layer_testnet"), + (83144, "xprotocol_testnet"), + (83278, "esa"), + (83872, "zedxion"), + (84531, "base_goerli_testnet"), + (84532, "base_sepolia_testnet"), + (84886, "aerie"), + (85449, "cybertrust"), + (88002, "nautilus_proteus_testnet"), + (88559, "inoai"), + (88800, "zkasino"), + (88817, "unit_zero_testnet"), + (88819, "unit_zero_stagenet"), + (88880, "chiliz_scoville_testnet"), + (88882, "chiliz_spicy_testnet"), + (88888, "chiliz"), + (90001, "fxcore_testnet"), + (90210, "beverly_hills"), + (90354, "camp_testnet"), + (91002, "nautilus_trition"), + (91120, "metadap_enterprise"), + (91715, "combo_testnet"), + (92001, "lambda_testnet"), + (93572, "liquidlayer_testnet"), + (93747, "stratovm_testnet"), + (96970, "mantis_testnet_hexapod"), + (97053, "tetron_testnet"), + (97055, "tetron"), + (97288, "boba_bnb_old"), + (97435, "slingshot_testnet"), + (97531, "green_testnet"), + (97970, "optimusz7_testnet"), + (98881, "ebi"), + (99099, "eliberty_testnet"), + (99876, "edge_matrix_testnet"), + (99998, "ubtestnet"), + (99999, "ub"), + (100000, "quark_root"), + (100001, "quark_shard_0"), + (100002, "quark_shard_1"), + (100003, "quark_shard_2"), + (100004, "quark_shard_3"), + (100005, "quark_shard_4"), + (100006, "quark_shard_5"), + (100007, "quark_shard_6"), + (100008, "quark_shard_7"), + (100009, "ve"), + (100010, "ve_testnet"), + (100011, "quark_l2"), + (101010, "global_trust"), + (102030, "creditcoin"), + (102031, "creditcoin_testnet"), + (102032, "creditcoin_devnet"), + (103090, "crystaleum"), + (103454, "masa_testnet"), + (104566, "kaspaclassic"), + (105105, "stratis"), + (108801, "bro"), + (110000, "quark_devnet_root"), + (110001, "quark_devnet_shard_0"), + (110002, "quark_devnet_shard_1"), + (110003, "quark_devnet_shard_2"), + (110004, "quark_devnet_shard_3"), + (110005, "quark_devnet_shard_4"), + (110006, "quark_devnet_shard_5"), + (110007, "quark_devnet_shard_6"), + (110008, "quark_devnet_shard_7"), + (110011, "quark_l2_testnet"), + (110110, "mars_credit"), + (111000, "siberium_test"), + (111111, "siberium"), + (111188, "re.al"), + (112358, "meta_one"), + (119139, "metadap_enterprise_testnet"), + (123321, "gem"), + (123456, "adil_devnet"), + (128123, "etherlink_testnet"), + (131313, "odyssey_testnet"), + (131419, "etnds"), + (132902, "form_testnet"), + (141319, "magape_testnet"), + (142857, "icplaza"), + (161212, "playfi"), + (165279, "eclat"), + (167000, "taiko"), + (167004, "taiko_alpha_2_testnet"), + (167005, "taiko_grimsvotn_l2"), + (167006, "taiko_eldfell_l3"), + (167007, "taiko_jolnir_l2"), + (167008, "taiko_katla_l2"), + (167009, "taiko_hekla_l2"), + (168168, "zs"), + (171000, "fair_testnet"), + (175177, "chronicle_lit_protocol_testnet"), + (175188, "chronicle_yellowstone_lit_protocol_testnet"), + (188710, "bitica"), + (188881, "condor_test"), + (199991, "mazze_testnet"), + (200000, "xfair.ai_testnet"), + (200101, "milkomeda_c1_testnet"), + (200202, "milkomeda_a1_testnet"), + (200625, "akroma"), + (200810, "bitlayer_testnet"), + (200901, "bitlayer"), + (201018, "alaya"), + (201030, "alaya_dev_testnet"), + (201804, "mythical"), + (202020, "decimal_testnet"), + (202105, "duck_testnet"), + (202202, "bethel_sydney"), + (202212, "x1_devnet"), + (202401, "ymtech_besu_testnet"), + (202624, "jellie"), + (204005, "x1_network"), + (205205, "auroria_testnet"), + (210049, "gitagi_atlas_testnet"), + (210425, "platon"), + (212013, "litentry"), + (220315, "mas"), + (221230, "reap"), + (221231, "reap_testnet"), + (222222, "hydradx"), + (222555, "deepl"), + (222666, "deepl_testnet"), + (224168, "taf_eco"), + (224422, "conet_sebolia_testnet"), + (224433, "conet_holesky"), + (229772, "abyss_protocol"), + (230315, "hashkey_testnetdiscard"), + (234666, "haymo_testnet"), + (240515, "orange_testnet"), + (246529, "artis_sigma1"), + (246785, "artis_testnet_tau1"), + (247253, "saakuru_testnet"), + (256256, "cmp"), + (262371, "eclat_testnet"), + (266256, "gear_zero_testnet"), + (271271, "egoncoin_testnet"), + (281121, "social"), + (282828, "zillion_sepolia_testnet"), + (292003, "cipherem_testnet"), + (309075, "one_world"), + (313313, "saharaai_testnet"), + (314159, "filecoin_calibration_testnet"), + (322202, "parex"), + (323213, "bloom_genesis_testnet"), + (327126, "waba_testnet"), + (328527, "nal"), + (330844, "ttcoin"), + (333313, "bloom_genesis"), + (333331, "aves_testnet"), + (333333, "nativ3_testnet"), + (333666, "oone_testnet"), + (333777, "oone_devnet"), + (333888, "polis_testnet"), + (333999, "polis"), + (336655, "up_testnet"), + (336666, "up"), + (355110, "bitfinity"), + (355113, "bitfinity_testnet"), + (360890, "lavita"), + (363636, "digit_soul_2"), + (373737, "hap_testnet"), + (381931, "metal_c"), + (381932, "metal_tahoe_c"), + (404040, "tipboxcoin"), + (413413, "aie_testnet"), + (420420, "kek"), + (420666, "kek_kektest"), + (420692, "alterium_l2_testnet"), + (421611, "arbitrum_rinkeby"), + (421613, "arbitrum_goerli"), + (421614, "arbitrum_sepolia"), + (424242, "fastex_testnet"), + (431140, "markr_go"), + (432201, "dexalot_subnet_testnet"), + (432204, "dexalot_subnet"), + (444444, "syndr_l3_sepolia"), + (444900, "weelink_testnet"), + (471100, "patex_sepolia_testnet"), + (473861, "ultra_pro"), + (474142, "open"), + (486487, "gobbl_testnet"), + (490000, "autonomys_testnet_nova_domain"), + (504441, "playdapp"), + (512512, "cmp_testnet"), + (513100, "dis"), + (526916, "docoin_community"), + (534351, "scroll_sepolia_testnet"), + (534352, "scroll"), + (534353, "scroll_alpha_testnet"), + (534354, "scroll_pre_alpha_testnet"), + (534849, "shinarium_beta"), + (535037, "beaneco_smart"), + (541764, "overprotocol_testnet"), + (552981, "one_world_testnet"), + (555555, "pentagon_testnet"), + (555666, "eclipse_testnet"), + (555888, "dustboy_iot"), + (622277, "hypra"), + (622463, "atlas"), + (641230, "bear"), + (651940, "all"), + (656476, "open_campus_codex"), + (660279, "xai"), + (666666, "vision_vpioneer_test"), + (666888, "hela_official_runtime_testnet"), + (686868, "won"), + (696969, "galadriel_devnet"), + (710420, "tiltyard_subnet"), + (713715, "sei_devnet"), + (721529, "eram"), + (723107, "tix_testnet"), + (743111, "hemi_sepolia"), + (751230, "bear_testnet"), + (752024, "ternoa_testnet"), + (761412, "miexs_smart"), + (764984, "lamina1_testnet"), + (767368, "lamina1_identity_testnet"), + (776877, "modularium"), + (800001, "octaspace"), + (808080, "biz_testnet"), + (808813, "bob_sepolia"), + (810180, "zklink_nova"), + (810181, "zklink_nova_sepolia_testnet"), + (810182, "zklink_nova_goerli_testnet"), + (812397, "sg_verse"), + (820522, "tsc_testnet"), + (827431, "curve"), + (839320, "prm_testnet"), + (840000, "runevm_testnet"), + (846000, "4goodnetwork"), + (855456, "dodao"), + (879151, "blocx"), + (888882, "rexx"), + (888888, "vision"), + (900000, "posi_shard_0"), + (910000, "posi_testnet_shard_0"), + (912559, "astria_evm_dusknet"), + (920000, "posi_devnet_shard_0"), + (920001, "posi_devnet_shard_1"), + (923018, "fncy_testnet"), + (955081, "jono12_subnet"), + (955305, "eluvio_content_fabric"), + (978657, "treasure_ruby"), + (984122, "forma"), + (984123, "forma_sketchpad"), + (988207, "ecrox"), + (998899, "supernet_testnet"), + (999999, "am"), + (1100789, "netmind_testnet"), + (1234567, "sharecle"), + (1261120, "zkatana"), + (1313114, "etho_protocol"), + (1313500, "xerom"), + (1337702, "kintsugi"), + (1337802, "kiln"), + (1337803, "zhejiang"), + (1398243, "automata_testnet"), + (1398244, "automata_orbit_testnet"), + (1612127, "playfi_albireo_testnet"), + (1637450, "xterio_testnet"), + (1731313, "turkey_demo_dev"), + (2021398, "debank_testnet"), + (2099156, "plian_main"), + (2206132, "platon_dev_testnet2"), + (2611555, "dpu"), + (2702128, "xterio"), + (3132023, "saharaai"), + (3141592, "filecoin_butterfly_testnet"), + (3397901, "funki_sepolia_sandbox"), + (3441005, "manta_pacific_testnet"), + (3441006, "manta_pacific_sepolia_testnet"), + (4000003, "altlayer_zero_gas"), + (4281033, "worlds_caldera"), + (4444444, "altar_testnet"), + (4457845, "zero_testnet_sepolia"), + (5112023, "numblock"), + (5167003, "mxc_wannsee_zkevm_testnet"), + (5167004, "moon_geneva_testnet"), + (5201420, "electroneum_testnet"), + (5318008, "reactive_kopli"), + (5555555, "imversed"), + (5555558, "imversed_testnet"), + (6038361, "astar_zkyoto"), + (6666665, "safeanwang"), + (6666666, "safeanwang_testnet"), + (7082400, "coti_testnet"), + (7225878, "saakuru"), + (7355310, "openvessel"), + (7668378, "ql1_testnet"), + (7762959, "musicoin"), + (7777777, "zora"), + (8007736, "plian_sub_1"), + (8008135, "fhenix_helium"), + (8080808, "hokum"), + (8601152, "waterfall_8_test"), + (8794598, "hap"), + (8888881, "quarix_testnet"), + (8888888, "quarix"), + (9322252, "xcap"), + (9322253, "milvine"), + (9999999, "fluence"), + (10067275, "plian_testnet_sub_1"), + (10101010, "soverun"), + (10241024, "alienx"), + (10241025, "alienx_hal_testnet"), + (11145513, "blessnet_sepolia"), + (11155111, "sepolia"), + (11155420, "op_sepolia_testnet"), + (12052024, "memento_testnet"), + (12227331, "neox_testnet_t3"), + (12227332, "neo_x_testnet_t4"), + (13068200, "coti_devnet"), + (13371337, "pep_churchill"), + (14288640, "andus"), + (16658437, "plian_testnet_main"), + (18071918, "mande"), + (18289463, "iolite"), + (19850818, "deepbrain_testnet"), + (19880818, "deepbrain"), + (20180427, "stability_testnet"), + (20180430, "smartmesh"), + (20181205, "quarkblock"), + (20201022, "pego"), + (20230825, "vcity_testnet"), + (20240324, "debank_sepolia_testnet"), + (20240603, "dbk"), + (20241133, "swan_proxima_testnet"), + (20482050, "hokum_testnet"), + (22052002, "excelon"), + (24772477, "6degree_of_outreach_testnet"), + (27082017, "excoincial_volta_testnet"), + (27082022, "excoincial"), + (28122024, "ancient8_testnet"), + (28945486, "auxilium"), + (29032022, "fla"), + (31415926, "filecoin_local_testnet"), + (33626250, "toliman_suave_testnet"), + (35855456, "joys_digital"), + (37084624, "skale_nebula_hub_testnet"), + (39916801, "kingdom"), + (43214913, "maistestsubnet"), + (52164803, "fluence_testnet"), + (61717561, "aqua"), + (65010000, "autonity_bakerloo_thames_testnet"), + (65010001, "autonity_bakerloo_barada_testnet"), + (65010002, "autonity_bakerloo_sumida_testnet"), + (65010003, "autonity_bakerloo_yamuna_testnet"), + (65100000, "autonity_piccadilly_thames_testnet"), + (65100001, "autonity_piccadilly_barada_testnet"), + (65100002, "autonity_piccadilly_sumida_testnet"), + (65100003, "autonity_piccadilly_yamuna_testnet"), + (68840142, "frame_testnet"), + (77787778, "0xhash_testnet"), + (79479957, "sx_toronto_rollup"), + (88558801, "backstop_testnet"), + (88888888, "t.e.a.m_block"), + (94204209, "polygon_blackberry"), + (99415706, "joys_digital_testnet"), + (100000000, "ethos"), + (108160679, "orai"), + (111557560, "cyber_testnet"), + (123420111, "op_celestia_raspberry"), + (161221135, "plume_testnet"), + (168587773, "blast_sepolia_testnet"), + (192837465, "gather"), + (222000222, "kanazawa"), + (245022926, "neon_evm_devnet"), + (245022929, "neon_evm_devnet_rollup"), + (245022934, "neon_evm"), + (245022940, "neon_evm_testnet"), + (278611351, "razor_skale"), + (311752642, "oneledger"), + (328527624, "nal_sepolia_testnet"), + (333000333, "meld"), + (356256156, "gather_testnet"), + (476462898, "skopje_testnet"), + (486217935, "gather_devnet"), + (531050104, "sophon_testnet"), + (666666666, "degen"), + (728126428, "tron"), + (888888888, "ancient8"), + (889910245, "ptcescan_testnet"), + (889910246, "ptcescan"), + (974399131, "skale_calypso_hub_testnet"), + (999999999, "zora_sepolia_testnet"), + (1020352220, "skale_titan_hub_testnet"), + (1122334455, "ipos"), + (1146703430, "cyberdecknet"), + (1273227453, "human_protocol"), + (1313161554, "aurora"), + (1313161555, "aurora_testnet"), + (1313161556, "aurora_betanet"), + (1313161560, "powergold"), + (1350216234, "skale_titan_hub"), + (1351057110, "chaos_skale_testnet"), + (1380012617, "rari"), + (1380996178, "raptor"), + (1444673419, "skale_europa_hub_testnet"), + (1482601649, "skale_nebula_hub"), + (1511670449, "gpt"), + (1564830818, "skale_calypso_hub"), + (1666600000, "harmony_shard_0"), + (1666600001, "harmony_shard_1"), + (1666600002, "harmony_shard_2"), + (1666600003, "harmony_shard_3"), + (1666700000, "harmony_testnet_shard_0"), + (1666700001, "harmony_testnet_shard_1"), + (1666900000, "harmony_devnet_shard_0"), + (1666900001, "harmony_devnet_shard_1"), + (1722641160, "silicon_zkevm_sepolia_testnet"), + (1802203764, "kakarot_sepolia"), + (1903648807, "gemu_testnet"), + (1918988905, "rari_testnet"), + (2021121117, "datahopper"), + (2046399126, "skale_europa_hub"), + (3125659152, "pirl"), + (4216137055, "oneledger_testnet_frankenstein"), + (11297108099, "palm_testnet"), + (28872323069, "gitswarm_test"), + (37714555429, "xai_testnet_v2"), + (88153591557, "arbitrum_blueberry"), + (111222333444, "alphabet"), + (111551119090, "thanos_sepolia"), + (123420000220, "fluence_stage"), + (197710212030, "ntity"), + (197710212031, "haradev_testnet"), + (202402181627, "gm_testnet"), + (383414847825, "zeniq"), + (666301171999, "pdc"), + (6022140761023, "molereum"), + (2713017997578000, "d_testnet"), +]; diff --git a/rust/crates/mesc/src/overrides.rs b/rust/crates/mesc/src/overrides.rs index 835c271..9f0997b 100644 --- a/rust/crates/mesc/src/overrides.rs +++ b/rust/crates/mesc/src/overrides.rs @@ -72,8 +72,7 @@ fn get_network_defaults_override() -> Result>, M for piece in raw.split(' ') { match piece.split('=').collect::>().as_slice() { [chain_id, endpoint] => { - network_defaults - .insert((chain_id.to_string()).try_into_chain_id()?, endpoint.to_string()); + network_defaults.insert(chain_id.try_into_chain_id()?, endpoint.to_string()); } _ => { return Err(MescError::OverrideError( @@ -97,8 +96,7 @@ fn get_network_names_override() -> Result>, Mesc for piece in raw.split(' ') { match piece.split('=').collect::>().as_slice() { [name, chain_id] => { - network_names - .insert(name.to_string(), (chain_id.to_string()).try_into_chain_id()?); + network_names.insert(name.to_string(), chain_id.try_into_chain_id()?); } _ => { return Err(MescError::OverrideError( @@ -190,7 +188,7 @@ pub fn get_default_endpoint_name(url: &str, chain_id: Option) -> Option if let Some(split) = hostname.split('.').last() { split.to_string() } else { hostname }; match chain_id { - Some(chain_id) => Some(format!("{}_{}", hostname, chain_id.as_str())), + Some(chain_id) => Some(format!("{hostname}_{chain_id}")), None => Some(hostname), } } diff --git a/rust/crates/mesc/src/query.rs b/rust/crates/mesc/src/query.rs index 57c1984..8dd61f5 100644 --- a/rust/crates/mesc/src/query.rs +++ b/rust/crates/mesc/src/query.rs @@ -1,7 +1,7 @@ use crate::{ directory, types::{Endpoint, MescError, RpcConfig}, - ChainId, MultiEndpointQuery, TryIntoChainId, + MultiEndpointQuery, TryIntoChainId, }; use std::collections::HashMap; @@ -49,31 +49,12 @@ pub fn get_endpoint_by_network get_endpoint_by_name(config, name.as_str()), None => Ok(None), } } -fn get_by_chain_id( - mapping: &HashMap, - chain_id: T, -) -> Result, MescError> { - let chain_id = chain_id.try_into_chain_id()?; - if let Some(value) = mapping.get(&chain_id) { - Ok(Some(value.clone())) - } else { - let standard_chain_id = chain_id.to_hex_256()?; - let results: Result, _> = mapping - .iter() - .map(|(k, v)| k.to_hex_256().map(|hex| (hex, v.clone()))) - .collect::, _>>() // Collect into a Result, Error> - .map(|pairs| pairs.into_iter().collect::>()); - let standard_mapping = results?; - Ok(standard_mapping.get(&standard_chain_id).cloned()) - } -} - /// get endpoint by name pub fn get_endpoint_by_name(config: &RpcConfig, name: &str) -> Result, MescError> { if let Some(endpoint) = config.endpoints.get(name) { diff --git a/rust/crates/mesc/src/types/chain_ids.rs b/rust/crates/mesc/src/types/chain_ids.rs index 09bd4a5..3123068 100644 --- a/rust/crates/mesc/src/types/chain_ids.rs +++ b/rust/crates/mesc/src/types/chain_ids.rs @@ -3,100 +3,42 @@ use serde::{Deserialize, Serialize}; /// ChainId is a string representation of an integer chain id /// - TryFrom conversions allow specifying as String, &str, uint, or binary data -#[derive(Serialize, Deserialize, Debug, Clone, Eq)] -pub struct ChainId(String); +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] +#[serde(into = "ChainIdSerde", try_from = "ChainIdSerde")] +pub struct ChainId(u64); impl ChainId { + /// create new chain id + pub fn new(chain_id: u64) -> ChainId { + ChainId(chain_id) + } + + /// parse chain id from string + pub fn parse(chain_id: &str) -> Result { + chain_id.try_into_chain_id() + } + + /// get chain id value + pub fn get(&self) -> u64 { + self.0 + } + /// convert to hex representation - pub fn to_hex(&self) -> Result { + pub fn to_hex(&self) -> String { let ChainId(chain_id) = self; - if chain_id.starts_with("0x") { - Ok(chain_id.clone()) - } else { - match chain_id.parse::() { - Ok(number) => Ok(format!("0x{:x}", number)), - Err(_) => Err(MescError::IntegrityError("bad chain_id".to_string())), - } - } + format!("{chain_id:#x}") } /// convert to hex representation, zero-padded to 256 bits - pub fn to_hex_256(&self) -> Result { + pub fn to_hex_256(&self) -> String { let ChainId(chain_id) = self; - if let Some(stripped) = chain_id.strip_prefix("0x") { - Ok(format!("0x{:0>64}", stripped)) - } else { - match chain_id.parse::() { - Ok(number) => Ok(format!("0x{:064x}", number)), - Err(_) => { - Err(MescError::InvalidChainId("cannot convert chain_id to hex".to_string())) - } - } - } - } - - /// return chain_id as &str - pub fn as_str(&self) -> &str { - let ChainId(chain_id) = self; - chain_id.as_str() - } -} - -impl std::hash::Hash for ChainId { - fn hash(&self, state: &mut H) { - match self.to_hex_256() { - Ok(as_hex) => { - as_hex.hash(state); - } - _ => { - let ChainId(contents) = self; - contents.hash(state); - } - } - } -} - -impl PartialOrd for ChainId { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl PartialEq for ChainId { - fn eq(&self, other: &Self) -> bool { - let self_string: String = match self.to_hex() { - Ok(s) => s[2..].to_string(), - Err(_) => return self == other, - }; - let other_string = match other.to_hex() { - Ok(s) => s[2..].to_string(), - Err(_) => return self == other, - }; - let self_str = format!("{:0>79}", self_string); - let other_str = format!("{:0>79}", other_string); - self_str.eq(&other_str) - } -} - -impl Ord for ChainId { - fn cmp(&self, other: &Self) -> std::cmp::Ordering { - let self_string: String = match self.to_hex() { - Ok(s) => s[2..].to_string(), - Err(_) => return std::cmp::Ordering::Greater, - }; - let other_string = match other.to_hex() { - Ok(s) => s[2..].to_string(), - Err(_) => return std::cmp::Ordering::Greater, - }; - let self_str = format!("{:>079}", self_string); - let other_str = format!("{:>079}", other_string); - self_str.cmp(&other_str) + format!("0x{chain_id:064x}") } } impl std::fmt::Display for ChainId { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.0) + self.0.fmt(f) } } @@ -105,14 +47,14 @@ macro_rules! impl_from_uint_for_chainid { $( impl From<$t> for ChainId { fn from(value: $t) -> ChainId { - ChainId(value.to_string()) + ChainId(value as _) } } )* }; } -impl_from_uint_for_chainid!(u8, u16, u32, u64, u128, usize); +impl_from_uint_for_chainid!(u8, u16, u32, u64, usize); /// use custom trait instead of TryInto so that Error type is always the same pub trait TryIntoChainId { @@ -128,27 +70,22 @@ impl TryIntoChainId for ChainId { impl TryIntoChainId for String { fn try_into_chain_id(self) -> Result { - if !self.is_empty() && - (self.chars().all(|c| c.is_ascii_digit()) || - (self.starts_with("0x") && self[2..].chars().all(|c| c.is_ascii_hexdigit()))) - { - Ok(ChainId(self)) - } else { - Err(MescError::InvalidChainId(self)) - } + self.as_str().try_into_chain_id() } } impl TryIntoChainId for &str { fn try_into_chain_id(self) -> Result { - if !self.is_empty() && - (self.chars().all(|c| c.is_ascii_digit()) || - (self.starts_with("0x") && self[2..].chars().all(|c| c.is_ascii_hexdigit()))) - { - Ok(ChainId(self.to_string())) - } else { - Err(MescError::InvalidChainId(self.to_string())) + if !self.is_empty() { + let (radix, s) = match self.get(0..2) { + Some("0x") => (16, &self[2..]), + _ => (10, self), + }; + if let Ok(chain_id) = u64::from_str_radix(s, radix) { + return Ok(ChainId(chain_id)); + } } + Err(MescError::InvalidChainId(self.to_string())) } } @@ -157,17 +94,34 @@ macro_rules! impl_try_into_chain_id_for_integer { $( impl TryIntoChainId for $t { fn try_into_chain_id(self) -> Result { - Ok(ChainId(self.to_string())) + Ok(ChainId::from(self)) } } )* }; } -impl_try_into_chain_id_for_integer!(u8, u16, u32, u64, u128, usize); +impl_try_into_chain_id_for_integer!(u8, u16, u32, u64, usize); impl TryIntoChainId for &[u8] { fn try_into_chain_id(self) -> Result { Err(MescError::NotImplemented("binary chain_id".to_string())) } } + +#[derive(Serialize, Deserialize)] +struct ChainIdSerde(String); + +impl From for ChainIdSerde { + fn from(chain_id: ChainId) -> ChainIdSerde { + ChainIdSerde(chain_id.to_string()) + } +} + +impl TryFrom for ChainId { + type Error = MescError; + + fn try_from(value: ChainIdSerde) -> Result { + value.0.try_into_chain_id() + } +} diff --git a/rust/crates/mesc/src/validate.rs b/rust/crates/mesc/src/validate.rs index 52b4d19..c5dc9ec 100644 --- a/rust/crates/mesc/src/validate.rs +++ b/rust/crates/mesc/src/validate.rs @@ -1,5 +1,4 @@ use crate::{MescError, RpcConfig}; -use std::collections::HashSet; pub(crate) fn validate_config(config: &RpcConfig) -> Result<(), MescError> { // referenced endpoints exist @@ -70,29 +69,5 @@ pub(crate) fn validate_config(config: &RpcConfig) -> Result<(), MescError> { } } - // chain_id's are valid - for network in config.network_defaults.keys() { - network.to_hex()?; - } - for profile in config.profiles.values() { - for network in profile.network_defaults.keys() { - network.to_hex()?; - } - } - for endpoint in config.endpoints.values() { - if let Some(chain_id) = endpoint.chain_id.as_ref() { - chain_id.to_hex()?; - } - } - - // no duplicate default network entries using decimal vs hex - let hex_networks: Result, MescError> = - config.network_defaults.keys().map(|c| c.to_hex()).collect(); - if hex_networks?.len() != config.network_defaults.len() { - return Err(MescError::IntegrityError( - "colliding network defaults using decimal vs hex".to_string(), - )); - } - Ok(()) } diff --git a/rust/crates/mesc_cli/Cargo.toml b/rust/crates/mesc_cli/Cargo.toml index 3c25d1c..ef419b7 100644 --- a/rust/crates/mesc_cli/Cargo.toml +++ b/rust/crates/mesc_cli/Cargo.toml @@ -4,7 +4,6 @@ description = "command line interface for creating, loading, and modifying MESC version.workspace = true edition.workspace = true license.workspace = true -homepage.workspace = true repository.workspace = true [[bin]] @@ -14,13 +13,13 @@ path = "src/main.rs" [dependencies] bat = "0.24.0" clap = { version = "4.4.8", features = ["derive"] } -colored_json = "4.1.0" +colored_json = "5" edit = "0.1.4" futures = "0.3.29" -inquire = "0.6.2" +inquire = "0.7" ipgeolocate = "0.3.6" -mesc = { version = "0.2.0", path = "../mesc" } -reqwest = { version = "0.11.22", features = ["json"] } +mesc = { version = "0.3.0", path = "../mesc" } +reqwest = { version = "0.11", features = ["json"] } serde = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true } diff --git a/rust/crates/mesc_cli/src/cli/subcommands/help.rs b/rust/crates/mesc_cli/src/cli/subcommands/help.rs index f768f1e..37f1a92 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/help.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/help.rs @@ -176,34 +176,38 @@ metadata: Mapping[str, Any] = mesc.get_global_metadata(profile='xyz_tool')"#; } fn print_rust_interface() { - let interface = r#"use mesc; -use mesc::MescError; + let interface = r#"use mesc::{MescError, Endpoint}; +use std::collections::HashMap; type OptionalResult = Result, MescError>; type MultiResult = Result, MescError>; -type MetadataResult = Result, MescError> +type MetadataResult = Result, MescError>; + +// check whether mesc is enabled +let enabled: bool = mesc::is_mesc_enabled(); // get the default endpoint let endpoint: OptionalResult = mesc::get_default_endpoint(None); // get the default endpoint of a network -let endpoint: OptionalResult = mesc::get_endpoint_by_network(5, None); +let endpoint: OptionalResult = mesc::get_endpoint_by_network("5", None); // get the default network for a particular tool let chain_id: OptionalResult = mesc::get_default_endpoint(Some("xyz_tool")); // get the default endpoint of a network for a particular tool -let endpoint: OptionalResult = mesc::get_endpoint_by_network(5, Some("xyz_tool")); +let endpoint: OptionalResult = mesc::get_endpoint_by_network("5", Some("xyz_tool")); // get an endpoint by name let endpoint: OptionalResult = mesc::get_endpoint_by_name("local_goerli"); // parse a user-provided string into a matching endpoint // (first try 1. endpoint name, then 2. chain id, then 3. network name) +let user_str = "local_goerli"; let endpoint: OptionalResult = mesc::get_endpoint_by_query(user_str, Some("xyz_tool")); // find all endpoints matching given criteria -let query = mesc::MultiEndpointQuery::new().chain_id(5); +let query = mesc::MultiEndpointQuery::new().chain_id("5").unwrap(); let endpoints: MultiResult = mesc::find_endpoints(query); // get non-endpoint metadata diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/command.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/command.rs index d6a890f..20352c8 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/command.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/command.rs @@ -1,7 +1,7 @@ use crate::{MescCliError, SetupArgs}; use mesc::{MescError, RpcConfig}; -use toolstr::Colorize; use std::path::PathBuf; +use toolstr::Colorize; use super::{config_modification::*, inquire_utils::*, selectors::*, shell_config::*, writing::*}; @@ -25,7 +25,10 @@ pub(crate) async fn setup_command(args: SetupArgs) -> Result<(), MescCliError> { let result = modify_existing_config(config, Some(mode)).await; if shell_config_modified { println!(); - println!("{}", "Shell config files were modified. Restart shell to load these files.".magenta()) + println!( + "{}", + "Shell config files were modified. Restart shell to load these files.".magenta() + ) } result } @@ -122,7 +125,7 @@ fn get_write_mode() -> Result<(ConfigWriteMode, bool), MescCliError> { } (Err(_), Err(_), Err(_), false) => { println!(" MESC is disabled because no MESC env vars are set"); - println!(" To enabled MESC, set one of the MESC env vars"); + println!(" To enable MESC, set one of the MESC env vars"); let mode = select_config_mode()?; let modified_files = setup_mesc_env_vars(&mode)?; Ok((mode, !modified_files.is_empty())) diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs index 30958fe..166906a 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/endpoints.rs @@ -40,7 +40,7 @@ pub(crate) async fn add_endpoint(config: &mut RpcConfig) -> Result<(), MescCliEr let chain_id = crate::rpc::request_chain_id(client, url.clone()).await; let chain_id = match chain_id { Ok(chain_id) => { - println!(" {} {}", "Using chain_id".bold(), chain_id.as_str().green()); + println!(" {} {}", "Using chain_id".bold(), chain_id.to_string().green()); Some(chain_id) } _ => { @@ -73,7 +73,7 @@ pub(crate) async fn modify_endpoint(config: &mut RpcConfig) -> Result<(), MescCl let mut options: Vec = config.endpoints.clone().into_keys().collect(); if options.is_empty() { println!(" No endpoints to modify"); - return Ok(()) + return Ok(()); } options.sort(); let endpoint_name = match inquire::Select::new("Which endpoint to modify?", options).prompt() { diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/inquire_utils.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/inquire_utils.rs index 789dfed..9064f12 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/inquire_utils.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/inquire_utils.rs @@ -1,6 +1,6 @@ use inquire::ui::{Attributes, Color, IndexPrefix, RenderConfig, StyleSheet, Styled}; -pub(crate) fn get_render_config() -> RenderConfig { +pub(crate) fn get_render_config() -> RenderConfig<'static> { let highlight_color = Color::DarkGreen; let mut render_config = RenderConfig::default(); diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/metadata.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/metadata.rs index bd2e4f4..1c4988b 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/metadata.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/metadata.rs @@ -170,7 +170,7 @@ pub(crate) async fn modify_global_metadata(config: &mut RpcConfig) -> Result<(), } } } else { - return Ok(()) + return Ok(()); } } Ok("Modify endpoint metadata") => { @@ -179,7 +179,7 @@ pub(crate) async fn modify_global_metadata(config: &mut RpcConfig) -> Result<(), } else if let Some(endpoint) = select_endpoint(config, "Which endpoint?")? { modify_endpoint_metadata(endpoint.as_str(), config)?; } else { - return Ok(()) + return Ok(()); } } Ok("Print global metadata") => { diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/network_names.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/network_names.rs index f8c1375..e7a7dab 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/network_names.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/network_names.rs @@ -90,7 +90,7 @@ fn print_custom_network_names(config: &RpcConfig) { config.network_names.len().to_string().green().bold() ); for (network_name, chain_id) in config.network_names.iter() { - println!(" - {} = {}", network_name.bold(), chain_id.as_str().green().bold()); + println!(" - {} = {}", network_name.bold(), chain_id.to_string().green().bold()); } }; } diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/selectors.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/selectors.rs index 4cf1dfe..614be51 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/selectors.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/selectors.rs @@ -56,9 +56,7 @@ pub(crate) async fn select_chain_id_by_name() -> Result, MescCli } }; let mut pairs: Vec<(ChainId, String)> = network_list.into_iter().collect(); - pairs.sort_by_key(|(chain_id, _)| { - chain_id.to_hex_256().unwrap_or(chain_id.as_str().to_string()) - }); + pairs.sort_by(|(a, _), (b, _)| a.cmp(b)); let options: Vec<_> = pairs.iter().map(|(chain_id, name)| format!("{}) {}", chain_id, name)).collect(); @@ -100,7 +98,7 @@ pub(crate) fn select_endpoint( ) -> Result, MescCliError> { let mut options: Vec = config.endpoints.clone().into_keys().collect(); if options.is_empty() { - return Ok(None) + return Ok(None); } options.sort(); match inquire::Select::new(prompt, options).prompt() { @@ -123,7 +121,7 @@ pub(crate) fn select_endpoint_of_network( .map(|endpoint| endpoint.name.clone()) .collect(); if options.is_empty() { - return Ok(None) + return Ok(None); } options.sort(); match inquire::Select::new(prompt, options).prompt() { @@ -139,7 +137,7 @@ pub(crate) fn select_profile( ) -> Result, MescCliError> { let mut options: Vec<_> = config.profiles.keys().collect(); if options.is_empty() { - return Ok(None) + return Ok(None); } options.sort(); match inquire::Select::new(prompt, options).prompt() { @@ -153,18 +151,18 @@ pub(crate) fn select_config_chain_id( config: &RpcConfig, prompt: &str, ) -> Result, MescCliError> { - let mut chain_ids: HashSet = HashSet::new(); - for endpoint in config.endpoints.values() { - if let Some(chain_id) = endpoint.chain_id.as_ref() { - chain_ids.insert(chain_id.clone()); - } - } - let mut sorted_chain_ids: Vec = chain_ids.into_iter().collect(); - sorted_chain_ids.sort_by_key(|chain_id| chain_id.to_hex_256().unwrap_or("".to_string())); - let options: Vec = sorted_chain_ids + let mut chain_ids = config + .endpoints + .values() + .filter_map(|endpoint| endpoint.chain_id.clone()) + .collect::>() + .into_iter() + .collect::>(); + chain_ids.sort(); + let options: Vec = chain_ids .iter() .map(|chain_id| match mesc::directory::get_network_name(chain_id) { - Some(name) => format!("{}) {}", chain_id.as_str(), name), + Some(name) => format!("{chain_id}) {name}"), None => chain_id.to_string(), }) .collect(); @@ -174,7 +172,7 @@ pub(crate) fn select_config_chain_id( _ => return Err(MescCliError::InvalidInput("invalid input".to_string())), }; match options.iter().position(|x| x == &input) { - Some(index) => Ok(Some(sorted_chain_ids.remove(index))), + Some(index) => Ok(Some(chain_ids[index].clone())), None => Err(MescCliError::Error("invalid input".to_string())), } } diff --git a/rust/crates/mesc_cli/src/cli/subcommands/setup/shell_config.rs b/rust/crates/mesc_cli/src/cli/subcommands/setup/shell_config.rs index 1704455..c3de2f5 100644 --- a/rust/crates/mesc_cli/src/cli/subcommands/setup/shell_config.rs +++ b/rust/crates/mesc_cli/src/cli/subcommands/setup/shell_config.rs @@ -19,7 +19,15 @@ pub(crate) fn get_shell_config_paths() -> Result, MescCliError> { let home_dir = std::env::var("HOME").map_err(|_| MescCliError::Error("home dir not found".to_string()))?; let home_path = PathBuf::from(home_dir); - let candidates = vec![home_path.join(".bashrc"), home_path.join(".profile")]; + let mut candidates = vec![home_path.join(".bashrc"), home_path.join(".profile")]; + + // paths added only if they exist + for path in [home_path.join(".zshrc")] { + if path.exists() { + candidates.push(path) + } + } + Ok(candidates) } diff --git a/rust/crates/mesc_cli/src/network.rs b/rust/crates/mesc_cli/src/network.rs index 2118e67..9c7edc0 100644 --- a/rust/crates/mesc_cli/src/network.rs +++ b/rust/crates/mesc_cli/src/network.rs @@ -43,7 +43,7 @@ pub(crate) async fn get_node_network_info( // ip address and location let (ip_address, location) = - if fields.contains(&"ip".to_string()) | fields.contains(&"location".to_string()) { + if fields.contains(&"ip".to_string()) || fields.contains(&"location".to_string()) { match get_ip_address(url.as_str()) { Ok(ip) => { let service = ipgeolocate::Service::IpApi; diff --git a/rust/crates/mesc_cli/src/printing.rs b/rust/crates/mesc_cli/src/printing.rs index de35c33..459a763 100644 --- a/rust/crates/mesc_cli/src/printing.rs +++ b/rust/crates/mesc_cli/src/printing.rs @@ -14,7 +14,7 @@ pub(crate) fn print_endpoint_pretty(endpoint: Endpoint) { println!("- url: {}", endpoint.url); println!( "- chain_id: {}", - endpoint.chain_id.map_or("-".to_string(), |chain_id| chain_id.to_string()) + endpoint.chain_id.map_or_else(|| "-".to_string(), |chain_id| chain_id.to_string()) ); println!("- metadata: {:?}", endpoint.endpoint_metadata); } @@ -49,10 +49,20 @@ pub(crate) fn print_endpoints( let mut names = Vec::new(); let mut networks = Vec::new(); let mut urls = Vec::new(); + let mut network_names = Vec::new(); let sorted_endpoints = sort_endpoints(endpoints); + + let all_network_names = mesc::network_names::get_network_names(); for endpoint in sorted_endpoints.into_iter() { names.push(endpoint.name.clone()); networks.push(endpoint.chain_id_string()); + + let network_name = endpoint + .chain_id + .as_ref() + .and_then(|chain_id| all_network_names.get(&chain_id).map(ToString::to_string)) + .unwrap_or_else(|| endpoint.chain_id_string()); + network_names.push(network_name); if reveal { urls.push(endpoint.url.clone()); } else { @@ -71,9 +81,14 @@ pub(crate) fn print_endpoints( let mut table = toolstr::Table::default(); table.add_column("endpoint", names)?; format.add_column(ColumnFormatShorthand::new().name("endpoint").font_style(metavar_style)); - table.add_column("network", networks)?; - format - .add_column(ColumnFormatShorthand::new().name("network").font_style(description_style)); + table.add_column("network", network_names)?; + format.add_column( + ColumnFormatShorthand::new().name("network").font_style(description_style.clone()), + ); + // table.add_column("chain id", networks)?; + // format.add_column( + // ColumnFormatShorthand::new().name("chain id").font_style(description_style), + // ); table.add_column("url", urls)?; format.add_column(ColumnFormatShorthand::new().name("url").font_style(option_style)); format.print(table)?; diff --git a/tests/adapters/python b/tests/adapters/python index 3635a59..61c82ed 100755 --- a/tests/adapters/python +++ b/tests/adapters/python @@ -4,27 +4,30 @@ from __future__ import annotations import argparse import json -from typing import Sequence, cast, Union +import typing -from mesc.types import Endpoint, EndpointQuery import mesc +if typing.TYPE_CHECKING: + from typing import Sequence, Union + from mesc.types import Endpoint, EndpointQuery + def run_query(query: EndpointQuery) -> Union[Endpoint, Sequence[Endpoint], None]: if query["query_type"] == "default_endpoint": - default_fields = cast(mesc.types.DefaultEndpointQuery, query["fields"]) + default_fields: mesc.types.DefaultEndpointQuery = query["fields"] return mesc.get_default_endpoint(**default_fields) elif query["query_type"] == "endpoint_by_name": - name_fields = cast(mesc.types.EndpointNameQuery, query["fields"]) + name_fields: mesc.types.EndpointNameQuery = query["fields"] return mesc.get_endpoint_by_name(**name_fields) elif query["query_type"] == "endpoint_by_network": - network_fields = cast(mesc.types.EndpointNetworkQuery, query["fields"]) + network_fields: mesc.types.EndpointNetworkQuery = query["fields"] return mesc.get_endpoint_by_network(**network_fields) elif query["query_type"] == "user_input": - user_input_fields = cast(mesc.types.UserInputQuery, query["fields"]) + user_input_fields: mesc.types.UserInputQuery = query["fields"] return mesc.get_endpoint_by_query(**user_input_fields) elif query["query_type"] == "multi_endpoint": - multi_endpoint_fields = cast(mesc.types.MultiEndpointQuery, query["fields"]) + multi_endpoint_fields: mesc.types.MultiEndpointQuery = query["fields"] return mesc.find_endpoints(**multi_endpoint_fields) elif query["query_type"] == "global_metadata": return mesc.get_global_metadata(**query["fields"]) diff --git a/tests/generate.py b/tests/generate.py index 8bffbda..e1f07c6 100755 --- a/tests/generate.py +++ b/tests/generate.py @@ -3,11 +3,11 @@ from __future__ import annotations import copy -from typing import Any, TypeVar, Sequence, Union import typing +from typing import Any, Sequence, TypeVar, Union if typing.TYPE_CHECKING: - from mesc import RpcConfig, Profile, Endpoint + from mesc import Endpoint, Profile, RpcConfig from mesc.types import MescQuery blank_config: RpcConfig = { @@ -68,7 +68,7 @@ full_config: RpcConfig = { "llamanodes_ethereum": { "name": "llamanodes_ethereum", "url": "https://eth.llamarpc.com", - "chain_id": "0x01", + "chain_id": "1", "endpoint_metadata": {}, }, "llamanodes_optimism": { @@ -80,7 +80,7 @@ full_config: RpcConfig = { "llamanodes_base": { "name": "llamanodes_base", "url": "https://base.llamarpc.com", - "chain_id": "0x2105", + "chain_id": "8453", "endpoint_metadata": {}, }, }, @@ -1013,9 +1013,9 @@ def create_invalid_config_tests() -> list[Test]: for profile_name, profile_data in full_config["profiles"].items(): config = copy.deepcopy(full_config) config["profiles"][profile_name]["network_defaults"]["8453"] = "llamanodes_base" - config["profiles"][profile_name]["network_defaults"][ - "0x2105" - ] = "llamanodes_base" + config["profiles"][profile_name]["network_defaults"]["0x2105"] = ( + "llamanodes_base" + ) tests.append( ( "conflicting chain_ids in profile " diff --git a/typescript/.env.example b/typescript/.env.example new file mode 100644 index 0000000..e9350b1 --- /dev/null +++ b/typescript/.env.example @@ -0,0 +1,11 @@ +NODE_ENV="development" +MESC_MODE="" +MESC_PATH="" +MESC_ENV="" +MESC_NETWORK_DEFAULTS="" +MESC_NETWORK_NAMES="" +MESC_ENDPOINTS="" +MESC_PROFILES="" +MESC_GLOBAL_METADATA="" +MESC_ENDPOINT_METADATA="" +MESC_DEFAULT_ENDPOINT="" diff --git a/typescript/.gitignore b/typescript/.gitignore new file mode 100644 index 0000000..468f82a --- /dev/null +++ b/typescript/.gitignore @@ -0,0 +1,175 @@ +# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore + +# Logs + +logs +_.log +npm-debug.log_ +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Caches + +.cache + +# Diagnostic reports (https://nodejs.org/api/report.html) + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# Runtime data + +pids +_.pid +_.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover + +lib-cov + +# Coverage directory used by tools like istanbul + +coverage +*.lcov + +# nyc test coverage + +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + +.grunt + +# Bower dependency directory (https://bower.io/) + +bower_components + +# node-waf configuration + +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) + +build/Release + +# Dependency directories + +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) + +web_modules/ + +# TypeScript cache + +*.tsbuildinfo + +# Optional npm cache directory + +.npm + +# Optional eslint cache + +.eslintcache + +# Optional stylelint cache + +.stylelintcache + +# Microbundle cache + +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history + +.node_repl_history + +# Output of 'npm pack' + +*.tgz + +# Yarn Integrity file + +.yarn-integrity + +# dotenv environment variable files + +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) + +.parcel-cache + +# Next.js build output + +.next +out + +# Nuxt.js build / generate output + +.nuxt +dist + +# Gatsby files + +# Comment in the public line in if your project uses Gatsby and not Next.js + +# https://nextjs.org/blog/next-9-1#public-directory-support + +# public + +# vuepress build output + +.vuepress/dist + +# vuepress v2.x temp and cache directory + +.temp + +# Docusaurus cache and generated files + +.docusaurus + +# Serverless directories + +.serverless/ + +# FuseBox cache + +.fusebox/ + +# DynamoDB Local files + +.dynamodb/ + +# TernJS port file + +.tern-port + +# Stores VSCode versions used for testing VSCode extensions + +.vscode-test + +# yarn v2 + +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) folder config +.DS_Store diff --git a/typescript/.npmrc b/typescript/.npmrc new file mode 100644 index 0000000..62ddad7 --- /dev/null +++ b/typescript/.npmrc @@ -0,0 +1,4 @@ +engine-strict=true +auto-install-peers=true +enable-pre-post-scripts=true +strict-peer-dependencies=false diff --git a/typescript/biome.json b/typescript/biome.json new file mode 100644 index 0000000..904ac51 --- /dev/null +++ b/typescript/biome.json @@ -0,0 +1,64 @@ +{ + "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", + "organizeImports": { + "enabled": true + }, + "files": { + "ignore": ["dist", "_"] + }, + "linter": { + "enabled": true, + "rules": { + "all": true, + "style": { + "noNamespace": "off" + }, + "complexity": { + "useLiteralKeys": "off" + }, + "correctness": { + "noUnusedVariables": "off" + }, + "nursery": { + "noNodejsModules": "off" + }, + "performance": { + "noAccumulatingSpread": "off" + } + } + }, + "formatter": { + "enabled": true, + "lineWidth": 100, + "indentWidth": 2, + "indentStyle": "space", + "formatWithErrors": true + }, + "javascript": { + "globals": [ + "NodeJS", + "MESC_MODE", + "MESC_PATH", + "MESC_ENV", + "MESC_ENDPOINTS", + "MESC_DEFAULT_ENDPOINT", + "MESC_PROFILES", + "MESC_NETWORK_NAMES", + "MESC_NETWORK_DEFAULTS", + "MESC_GLOBAL_METADATA", + "MESC_ENDPOINT_METADATA" + ], + "formatter": { + "enabled": true, + "lineWidth": 100, + "indentWidth": 2, + "indentStyle": "space", + "quoteStyle": "single", + "trailingComma": "none", + "semicolons": "asNeeded", + "jsxQuoteStyle": "single", + "quoteProperties": "asNeeded", + "arrowParentheses": "asNeeded" + } + } +} diff --git a/typescript/bun.lockb b/typescript/bun.lockb new file mode 100755 index 0000000..658729a Binary files /dev/null and b/typescript/bun.lockb differ diff --git a/typescript/environment.d.ts b/typescript/environment.d.ts new file mode 100644 index 0000000..b34b4ae --- /dev/null +++ b/typescript/environment.d.ts @@ -0,0 +1,17 @@ +interface EnvironmentVariables { + readonly NODE_ENV: 'development' | 'production' | 'test' + readonly MESC_MODE: string + readonly MESC_PATH: string + readonly MESC_ENV: string + readonly MESC_ENDPOINT_METADATA: string + readonly MESC_GLOBAL_METADATA: string + readonly MESC_ENDPOINTS: string + readonly MESC_NETWORK_NAMES: string + readonly MESC_DEFAULT_ENDPOINT: string + readonly MESC_NETWORK_DEFAULTS: string + readonly MESC_PROFILES: string +} + +declare namespace NodeJS { + interface ProcessEnv extends EnvironmentVariables {} +} diff --git a/typescript/package.json b/typescript/package.json new file mode 100644 index 0000000..8607825 --- /dev/null +++ b/typescript/package.json @@ -0,0 +1,48 @@ +{ + "name": "@mesc/core", + "version": "0.0.0", + "description": "MESC is a specification for how crypto tools configure their RPC endpoints.", + "readme": "github:paradigmxyz/mesc#readme", + "type": "module", + "main": "./dist/index.js", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist", + "package.json" + ], + "scripts": { + "build": "tsup --config=tsup.config.ts", + "lint": "bunx @biomejs/biome lint . --apply", + "format": "bunx @biomejs/biome format . --write", + "typecheck": "tsc --project tsconfig.json --noEmit", + "test": "vitest --run" + }, + "dependencies": { + "valibot": "^0.28.1" + }, + "devDependencies": { + "@biomejs/biome": "1.5.3", + "@total-typescript/ts-reset": "^0.5.1", + "@types/bun": "^1.0.5", + "@types/node": "^20.11.17", + "bun": "^1.0.26", + "tsup": "^8.0.2", + "typescript": "^5.3.3", + "vitest": "^1.2.2" + }, + "repository": { + "type": "git", + "url": "https://github.com/paradigmxyz/mesc", + "directory": "typescript" + }, + "license": "MIT", + "sideEffects": false +} diff --git a/typescript/reset.d.ts b/typescript/reset.d.ts new file mode 100644 index 0000000..cede83f --- /dev/null +++ b/typescript/reset.d.ts @@ -0,0 +1,2 @@ +/* https://github.com/total-typescript/ts-reset */ +import '@total-typescript/ts-reset' diff --git a/typescript/scripts/.gitkeep b/typescript/scripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/typescript/src/errors.ts b/typescript/src/errors.ts new file mode 100644 index 0000000..a0cfa62 --- /dev/null +++ b/typescript/src/errors.ts @@ -0,0 +1,17 @@ +export class MescDisabledError extends Error { + constructor(public message = 'MESCs are disabled') { + super(message) + } +} + +export class MissingEndpointError extends Error { + constructor(public message = 'Missing endpoint') { + super(message) + } +} + +export class InvalidOverrideError extends Error { + constructor(public message = 'Invalid override') { + super(message) + } +} diff --git a/typescript/src/index.ts b/typescript/src/index.ts new file mode 100644 index 0000000..c59eeae --- /dev/null +++ b/typescript/src/index.ts @@ -0,0 +1,42 @@ +export * from '#/types.ts' +import { getRpcConfig } from '#/transform.ts' +import type { Endpoint, Maybe } from '#/types.ts' +import type { ChainId } from '#/schemas/rpc-config.ts' + +/** + * @see https://github.com/paradigmxyz/mesc/blob/main/SPECIFICATION.md#reference-implementation + */ + +interface MESC { + getDefaultEndpoint(args?: { profile: string }): Maybe + getEndpointByName({ name }: { name: string }): Endpoint + getEndpointByQuery({ query, profile }: { query: string; profile?: string }): Maybe + getEndpointByNetwork({ + chainId, + profile + }: { chainId: ChainId; profile?: string }): Maybe + findEndpoins(): Endpoint[] +} + +export const mescConfiguration = getRpcConfig(process.env) + +export const mesc = { + getDefaultEndpoint: args => { + throw new Error('Method not implemented.') + }, + + getEndpointByName: args => { + throw new Error('Method not implemented.') + }, + + getEndpointByQuery: args => { + throw new Error('Method not implemented.') + }, + + getEndpointByNetwork: args => { + throw new Error('Method not implemented.') + }, + findEndpoins: () => { + throw new Error('Method not implemented.') + } +} satisfies MESC diff --git a/typescript/src/networks.ts b/typescript/src/networks.ts new file mode 100644 index 0000000..6d4f164 --- /dev/null +++ b/typescript/src/networks.ts @@ -0,0 +1,30 @@ +import type { ChainId } from '#/schemas/rpc-config.ts' +import type { NetworkName, RpcConfig } from '#/types.ts' + +export const knownNetworks = { + ethereum: '1', + goerli: '5', + optimism: '10', + polygon: '137', + holesky: '17000', + arbitrum: '42161' +} satisfies Record + +export function networkNameToChainId({ + networkName, + config +}: { + networkName: string + config?: RpcConfig +}) { + networkName = networkName.toLowerCase() + if (!stringIsNetworkName(networkName)) { + throw new Error(`Unknown network name: ${networkName}`) + } + if (!config) return knownNetworks[networkName] + return config['network_names'][networkName] +} + +function stringIsNetworkName(input: string): input is NetworkName { + return input in knownNetworks +} diff --git a/typescript/src/parsers.ts b/typescript/src/parsers.ts new file mode 100644 index 0000000..2190b3c --- /dev/null +++ b/typescript/src/parsers.ts @@ -0,0 +1,110 @@ +import fs from 'node:fs' +import * as v from 'valibot' +import { raise, removeUndefined } from '#/utilities.ts' +import { rpcConfigSchema } from '#/schemas/rpc-config.ts' +import type { RawMESCConfig } from '#/schemas/mesc-config' + +/** @see https://github.com/paradigmxyz/mesc/blob/main/SPECIFICATION.md#environment-setup */ +export function parseMescVariables({ + MESC_MODE, + MESC_PATH, + MESC_ENV +}: Pick) { + if (MESC_MODE.length > 0 && !['PATH', 'ENV'].includes(MESC_MODE)) { + raise('MESC_MODE must be set to PATH or ENV') + } + + if (MESC_MODE === 'PATH') { + const mescFileExists = fs.existsSync(MESC_PATH) + if (!mescFileExists) raise('MESC_MODE is set to PATH but file set in MESC_PATH does not exist') + const rawRpcConfig = fs.readFileSync(MESC_PATH, { encoding: 'utf-8' }) + return v.safeParse(rpcConfigSchema, JSON.parse(rawRpcConfig), { + abortEarly: false, + abortPipeEarly: false + }) + } + if (MESC_MODE === 'ENV') { + const rawRpcConfig = MESC_ENV?.length + ? MESC_ENV + : raise('MESC_MODE is set to ENV but MESC_ENV is not set or empty') + return v.safeParse(rpcConfigSchema, JSON.parse(rawRpcConfig), { + abortEarly: false, + abortPipeEarly: false + }) + } + raise('MESC_MODE is not enabled') +} + +/** + * parse space-separated items of .[.into a mapping + * Example: "foundry.default_endpoint=local_goerli foundry.network_defaults.5=alchemy_optimism" + * returns { + * foundry: { + * default_endpoint: "local_goerli", + * network_defaults: { + * 5: "alchemy_optimism" + * } + * } + * } + */ +export function parseSpaceSeparatedProfiles(input?: string) { + if (!input) return false + const parts = input.split(' ') + const groups = {} as { + [profile: string]: { + default_endpoint?: string + network_defaults?: Record + } + } + for (const part of parts) { + if (part.includes('default_endpoint')) { + const [profile, key] = part.split('.') + if (!profile || !key) raise(`Failed to parse MESC_PROFILES profile: ${part}`) + const [key_, value] = key.split('=') + if (!key_ || !value) raise(`Failed to parse MESC_PROFILES: ${part}`) + groups[profile] = { default_endpoint: value, ...groups[profile] } + } + if (part.includes('network_defaults')) { + const [profile, key, chainIdNetworkName] = part.split('.') + if (!profile || !key || !chainIdNetworkName) raise(`Failed to parse MESC_PROFILES: ${part}`) + const [chainId, networkName] = chainIdNetworkName.split('=') + if (!chainId || !networkName) raise(`Failed to parse MESC_PROFILES: ${part}`) + groups[profile] = { ...groups[profile], network_defaults: { [chainId]: networkName } } + } + } + return groups +} + +/** + * parse space-separated items of [[:]=] into a mapping + * returns {Record} + */ +export function parseSpaceSeparatedEndpoints(input?: string) { + if (!input) return false + return removeUndefined( + input.split(' ').reduce((accumulator, item) => { + const [name, url] = item.split('=') as [string, string] + const [name_, chain_id] = name.split(':') as [string, string | undefined] + return { ...accumulator, [name_]: { url, chain_id } } + }, {}) + ) as Record +} + +/** + * parse space-separated pairs of = into a mapping + */ +export function parseSpaceSeparatedPairs(input?: string) { + if (!input) return false + return input.split(' ').reduce((accumulator, pair) => { + const [key, value] = pair.split('=') as [string, string] + return { ...accumulator, [key]: value } + }, {}) +} + +/** + * parse JSON string into a JSON object + */ +export function parseStringJSON(input?: string) { + if (!input) return false + return JSON.parse(input) as Record +} diff --git a/typescript/src/schemas/mesc-config.ts b/typescript/src/schemas/mesc-config.ts new file mode 100644 index 0000000..13f5d9f --- /dev/null +++ b/typescript/src/schemas/mesc-config.ts @@ -0,0 +1,23 @@ +import * as v from 'valibot' + +export const mescConfigSchema = v.object({ + MESC_MODE: v.union([v.literal('PATH'), v.literal('ENV'), v.literal('DISABLED')]), + MESC_PATH: v.string(), + MESC_ENV: v.optional(v.string()), + /** JSON mapping of {"endpoint_name": {}} */ + MESC_ENDPOINT_METADATA: v.optional(v.string()), + /** JSON formatted global metadata */ + MESC_GLOBAL_METADATA: v.optional(v.string()), + /** space-separated items of [[:]=] */ + MESC_ENDPOINTS: v.optional(v.string([v.regex(/(\w+(\.\w+)?(:\d+)?=[\w\d]+)+/)])), + /** space-separated pairs of = */ + MESC_NETWORK_NAMES: v.optional(v.string([v.regex(/(\w+=[\w\d]+)+/)])), + /** url, endpoint name, or network name */ + MESC_DEFAULT_ENDPOINT: v.optional(v.string()), + /** space-separated pairs of .[. */ + MESC_PROFILES: v.optional(v.string([v.regex(/(\w+\.\w+(\.\d+)?)=[\w\d]+/)])), + /** space-separated pairs of = */ + MESC_NETWORK_DEFAULTS: v.optional(v.string([v.regex(/(\d+=[\w\d]+)+/)])) +}) + +export type RawMESCConfig = v.Input diff --git a/typescript/src/schemas/rpc-config.ts b/typescript/src/schemas/rpc-config.ts new file mode 100644 index 0000000..41a5288 --- /dev/null +++ b/typescript/src/schemas/rpc-config.ts @@ -0,0 +1,34 @@ +import * as v from 'valibot' + +/** + * chain_id should be represented using either a decimal string or a hex string. + * Strings are used because chain id's can be 256 bits and most languages do not have native 256 bit integer types. + * For readability, decimal should be used for small chain id values and hex should be used for values that use the entire 256 bits. + */ +export const chainIdSchema = v.union([v.string(), v.number()]) + +export type ChainId = v.Output + +export const rpcConfigSchema = v.object({ + mesc_version: v.literal('MESC 1.0'), + default_endpoint: v.optional(v.string()), + network_defaults: v.record(v.string()), + network_names: v.record(v.string()), + endpoints: v.record( + v.object({ + name: v.string(), + url: v.string(), + chain_id: v.optional(v.string()), + endpoint_metadata: v.any() + }) + ), + profiles: v.record( + v.object({ + default_endpoint: v.optional(v.nullable(v.string())), + network_defaults: v.record(v.string()) + }) + ), + global_metadata: v.any() +}) + +export type RpcConfig = v.Output diff --git a/typescript/src/transform.ts b/typescript/src/transform.ts new file mode 100644 index 0000000..6abd062 --- /dev/null +++ b/typescript/src/transform.ts @@ -0,0 +1,97 @@ +import * as v from 'valibot' +import { + parseStringJSON, + parseMescVariables, + parseSpaceSeparatedPairs, + parseSpaceSeparatedProfiles, + parseSpaceSeparatedEndpoints +} from '#/parsers.ts' +import { raise } from '#/utilities.ts' +import { mescConfigSchema } from '#/schemas/mesc-config.ts' + +/** + * TODO: check if MESC_NETWORK_DEFAULTS is supposed to be merged with existing network_defaults or override it + * if the latter, then: + * 'Object.assign(rpcConfig.network_defaults, rpcConfig.network_defaults, mescNetworkDefaults)' + */ + +/** @see https://github.com/paradigmxyz/mesc/blob/main/SPECIFICATION.md */ +export const mescConfigurationTransform = v.transform( + mescConfigSchema, + ({ + MESC_MODE, + MESC_PATH, + MESC_ENV, + MESC_ENDPOINTS, + MESC_DEFAULT_ENDPOINT, + MESC_PROFILES, + MESC_NETWORK_NAMES, + MESC_NETWORK_DEFAULTS, + MESC_GLOBAL_METADATA, + MESC_ENDPOINT_METADATA + }) => { + // MESC is not enabled + if (MESC_MODE === 'DISABLED' || [MESC_MODE, MESC_ENV, MESC_PATH].filter(Boolean).length === 0) + return null + const { + success, + output: rpcConfig, + issues + } = parseMescVariables({ MESC_MODE, MESC_PATH, MESC_ENV }) + if (!success) + raise(`Failed to parse MESC variables: ${JSON.stringify(v.flatten(issues), undefined, 2)}`) + + if (MESC_DEFAULT_ENDPOINT?.length) { + Object.assign(rpcConfig, { default_endpoint: MESC_DEFAULT_ENDPOINT }) + } + + const mescNetworkDefaults = parseSpaceSeparatedPairs(MESC_NETWORK_DEFAULTS) + if (mescNetworkDefaults) { + Object.assign(rpcConfig, { network_defaults: mescNetworkDefaults }) + } + + const mescNetworkNames = parseSpaceSeparatedPairs(MESC_NETWORK_NAMES) + if (mescNetworkNames) { + Object.assign(rpcConfig, { network_names: mescNetworkNames }) + } + + const mescEndpoints = parseSpaceSeparatedEndpoints(MESC_ENDPOINTS) + if (mescEndpoints) { + Object.assign(rpcConfig, { endpoints: mescEndpoints }) + } + + const mescProfiles = parseSpaceSeparatedProfiles(MESC_PROFILES) + if (mescProfiles) { + Object.assign(rpcConfig, { profiles: mescProfiles }) + } + + const mescGlobalMetadata = parseStringJSON(MESC_GLOBAL_METADATA) + if (mescGlobalMetadata) { + Object.assign(rpcConfig.global_metadata, rpcConfig.global_metadata, mescGlobalMetadata) + } + + const mescEndpointMetadata = parseStringJSON(MESC_ENDPOINT_METADATA) + if (mescEndpointMetadata) { + for (const endpoint in mescEndpointMetadata) { + const metadata = mescEndpointMetadata[endpoint] + if (!rpcConfig.endpoints[endpoint]) continue + Object.assign(rpcConfig.endpoints[endpoint]?.endpoint_metadata, metadata) + } + } + + return rpcConfig + } +) + +export type MESCConfiguration = v.Output + +export function getRpcConfig(env: Record = process.env): MESCConfiguration { + const { output, success, issues } = v.safeParse(mescConfigurationTransform, env, { + abortEarly: false, + abortPipeEarly: false + }) + + if (!success) raise(`Failed to parse MESC configuration: ${JSON.stringify(issues, undefined, 2)}`) + + return output +} diff --git a/typescript/src/types.ts b/typescript/src/types.ts new file mode 100644 index 0000000..edbcb69 --- /dev/null +++ b/typescript/src/types.ts @@ -0,0 +1,46 @@ +import type { ChainId } from '#/schemas/rpc-config.ts' + +export type NetworkName = 'ethereum' | 'goerli' | 'optimism' | 'polygon' | 'holesky' | 'arbitrum' + +export interface RpcConfig { + mesc_version: string + default_endpoint?: string + endpoints: Record + network_defaults: Record + network_names: Record + profiles: Record + global_metadata: Record +} + +export interface Endpoint { + name: string + url: string + chain_id?: ChainId + endpoint_metadata: Record +} + +export interface Profile { + name: string + default_endpoint?: string + network_defaults: Record +} + +export interface Query { + default_endpoint?: string + endpoint_by_name?: string + endpoint_by_network?: string + user_input?: string + multi_endpoint?: string + global_metadata?: string +} + +export type Maybe = T | undefined + +type Json = string | number | boolean | null | Json[] | { [key: string]: Json } + +/** + * This type utility is used to unwrap complex types so you can hover over them in your editor + */ +export type Pretty = { + [K in keyof T]: T[K] +} & {} diff --git a/typescript/src/utilities.ts b/typescript/src/utilities.ts new file mode 100644 index 0000000..53e3b5c --- /dev/null +++ b/typescript/src/utilities.ts @@ -0,0 +1,11 @@ +export function raise(error: unknown): never { + throw typeof error === 'string' ? new Error(error) : error +} + +export const unixTimestamp = () => `${Math.floor(Date.now() / 1_000)}` + +// removed properties with undefined values from object +export function removeUndefined(object?: T): T { + if (!object) return {} as T + return (typeof object === 'string' ? JSON.parse(object) : JSON.parse(JSON.stringify(object))) as T +} diff --git a/typescript/test/index.test.ts b/typescript/test/index.test.ts new file mode 100644 index 0000000..afc291f --- /dev/null +++ b/typescript/test/index.test.ts @@ -0,0 +1,6 @@ +import { expect, test } from 'vitest' + +// placeholder test +test(() => { + expect(1).toBe(1) +}) diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json new file mode 100644 index 0000000..0d876f2 --- /dev/null +++ b/typescript/tsconfig.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "noEmit": true, + "paths": { + "#/*": ["./src/*"], + "~test-json": ["../tests/generated/tests.json"] + }, + "types": ["node", "bun"], + "lib": ["ESNext"], + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "Bundler", + "useDefineForClassFields": true, + "resolveJsonModule": true, + "resolvePackageJsonExports": true, + "resolvePackageJsonImports": true, + "allowImportingTsExtensions": true, + "noUncheckedIndexedAccess": true, + "noFallthroughCasesInSwitch": true, + "sourceMap": false, + "declarationMap": false, + "noPropertyAccessFromIndexSignature": true, + "alwaysStrict": true, + "strictNullChecks": true, + "verbatimModuleSyntax": true, + "strict": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + "checkJs": true + }, + "include": ["src", "test", "scripts"], + "files": ["environment.d.ts", "reset.d.ts"], + "exclude": ["_"] +} diff --git a/typescript/tsup.config.ts b/typescript/tsup.config.ts new file mode 100644 index 0000000..73bd18e --- /dev/null +++ b/typescript/tsup.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + dts: true, + shims: true, + clean: true, + bundle: true, + outDir: 'dist', + format: ['esm'], + target: ['node20'], + treeshake: 'recommended', + entry: ['./src/index.ts'] +}) diff --git a/typescript/vitest.config.ts b/typescript/vitest.config.ts new file mode 100644 index 0000000..29aebba --- /dev/null +++ b/typescript/vitest.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: {} +})