You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It requires refactoring the existing Network type and excluding RPC providers to a separate table.
// RpcProviderAuthType defines the different types of authentication for RPC providers
type RpcProviderAuthType int
const (
NoAuth RpcProviderAuthType = iota // No authentication
// Example: Used for public nodes or local nodes without any authentication.
// Example: "http://localhost:8545"
BasicAuth // Authentication via Basic Auth
// Example: Uses a username and password encoded as a base64 string and passed in the request header.
// Example: Header "Authorization: Basic base64(username:password)", URL: "https://api.example.com"
URLPathAuth // Authentication via token in URL path
// Example: The token is included directly in the URL path.
// Example: "https://api.example.com/YOUR_TOKEN"
)
// RpcProvider represents an RPC provider configuration with various options
type RpcProvider struct {
ChainID uint64 `json:"chainId"` // Chain ID of the network
Name string `json:"name"` // Provider name for identification
URL string `json:"url"` // Current Provider URL (may include overrides)
OriginalURL string `json:"originalUrl"` // Original URL before any overrides
EnableRPSLimiter bool `json:"enableRpsLimiter"` // Enable RPC rate limiting for this provider
}
type Network struct {
ChainID uint64 `json:"chainId"`
ChainName string `json:"chainName"`
RpcProviders []RpcProvider `json:"rpcProviders"` // List of RPC providers, in the order in which they are accessed
BlockExplorerURL string `json:"blockExplorerUrl,omitempty"`
IconURL string `json:"iconUrl,omitempty"`
NativeCurrencyName string `json:"nativeCurrencyName,omitempty"`
NativeCurrencySymbol string `json:"nativeCurrencySymbol,omitempty"`
NativeCurrencyDecimals uint64 `json:"nativeCurrencyDecimals"`
IsTest bool `json:"isTest"`
Layer uint64 `json:"layer"`
Enabled bool `json:"enabled"`
ChainColor string `json:"chainColor"`
ShortName string `json:"shortName"`
TokenOverrides []TokenOverride `json:"tokenOverrides"`
RelatedChainID uint64 `json:"relatedChainId"`
}
It requires refactoring the existing
Network
type and excluding RPC providers to a separate table.as discussed here: #5941 (comment)
The text was updated successfully, but these errors were encountered: