feat: support alchemy sepolia api keys
This commit is contained in:
parent
b9c6f5a834
commit
14a8df8948
|
@ -11,10 +11,13 @@ import (
|
|||
const (
|
||||
mainnetChainID uint64 = 1
|
||||
goerliChainID uint64 = 5
|
||||
sepoliaChainID uint64 = 11155111
|
||||
optimismChainID uint64 = 10
|
||||
optimismGoerliChainID uint64 = 420
|
||||
optimismSepoliaChainID uint64 = 11155420
|
||||
arbitrumChainID uint64 = 42161
|
||||
arbitrumGoerliChainID uint64 = 421613
|
||||
arbitrumSepoliaChainID uint64 = 421614
|
||||
sntSymbol = "SNT"
|
||||
sttSymbol = "STT"
|
||||
)
|
||||
|
|
|
@ -173,18 +173,27 @@ func defaultNodeConfig(installationID string, request *requests.CreateAccount) (
|
|||
if request.AlchemyEthereumGoerliToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[goerliChainID] = request.AlchemyEthereumGoerliToken
|
||||
}
|
||||
if request.AlchemyEthereumSepoliaToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[sepoliaChainID] = request.AlchemyEthereumSepoliaToken
|
||||
}
|
||||
if request.AlchemyArbitrumMainnetToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[arbitrumChainID] = request.AlchemyArbitrumMainnetToken
|
||||
}
|
||||
if request.AlchemyArbitrumGoerliToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[arbitrumGoerliChainID] = request.AlchemyArbitrumGoerliToken
|
||||
}
|
||||
if request.AlchemyArbitrumSepoliaToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[arbitrumSepoliaChainID] = request.AlchemyArbitrumSepoliaToken
|
||||
}
|
||||
if request.AlchemyOptimismMainnetToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[optimismChainID] = request.AlchemyOptimismMainnetToken
|
||||
}
|
||||
if request.AlchemyOptimismGoerliToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[optimismGoerliChainID] = request.AlchemyOptimismGoerliToken
|
||||
}
|
||||
if request.AlchemyOptimismSepoliaToken != "" {
|
||||
nodeConfig.WalletConfig.AlchemyAPIKeys[optimismSepoliaChainID] = request.AlchemyOptimismSepoliaToken
|
||||
}
|
||||
|
||||
nodeConfig.LocalNotificationsConfig = params.LocalNotificationsConfig{Enabled: true}
|
||||
nodeConfig.BrowsersConfig = params.BrowsersConfig{Enabled: true}
|
||||
|
|
|
@ -52,10 +52,13 @@ type WalletSecretsConfig struct {
|
|||
GanacheURL string `json:"ganacheURL"`
|
||||
AlchemyEthereumMainnetToken string `json:"alchemyEthereumMainnetToken"`
|
||||
AlchemyEthereumGoerliToken string `json:"alchemyEthereumGoerliToken"`
|
||||
AlchemyEthereumSepoliaToken string `json:"alchemyEthereumSepoliaToken"`
|
||||
AlchemyArbitrumMainnetToken string `json:"alchemyArbitrumMainnetToken"`
|
||||
AlchemyArbitrumGoerliToken string `json:"alchemyArbitrumGoerliToken"`
|
||||
AlchemyArbitrumSepoliaToken string `json:"alchemyArbitrumSepoliaToken"`
|
||||
AlchemyOptimismMainnetToken string `json:"alchemyOptimismMainnetToken"`
|
||||
AlchemyOptimismGoerliToken string `json:"alchemyOptimismGoerliToken"`
|
||||
AlchemyOptimismSepoliaToken string `json:"alchemyOptimismSepoliaToken"`
|
||||
}
|
||||
|
||||
func (c *CreateAccount) Validate() error {
|
||||
|
|
|
@ -14,6 +14,7 @@ const (
|
|||
EthereumSepolia uint64 = 11155111
|
||||
OptimismMainnet uint64 = 10
|
||||
OptimismGoerli uint64 = 420
|
||||
OptimismSepolia uint64 = 11155420
|
||||
ArbitrumMainnet uint64 = 42161
|
||||
ArbitrumGoerli uint64 = 421613
|
||||
ArbitrumSepolia uint64 = 421614
|
||||
|
@ -30,6 +31,7 @@ func AllChainIDs() []ChainID {
|
|||
ChainID(EthereumSepolia),
|
||||
ChainID(OptimismMainnet),
|
||||
ChainID(OptimismGoerli),
|
||||
ChainID(OptimismSepolia),
|
||||
ChainID(ArbitrumMainnet),
|
||||
ChainID(ArbitrumGoerli),
|
||||
ChainID(ArbitrumSepolia),
|
||||
|
|
Loading…
Reference in New Issue