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