feat: use Alchemy API key for Ethereum main/goerli

This commit is contained in:
Dario Gabriel Lipicar 2023-10-03 08:47:27 -03:00 committed by dlipicar
parent 6a110ca3df
commit 2bcf08f273
2 changed files with 8 additions and 0 deletions

View file

@ -138,6 +138,12 @@ func defaultNodeConfig(installationID string, request *requests.CreateAccount) (
nodeConfig.WalletConfig.InfuraAPIKeySecret = request.InfuraSecret
}
if request.AlchemyEthereumMainnetToken != "" {
nodeConfig.WalletConfig.AlchemyAPIKeys[mainnetChainID] = request.AlchemyEthereumMainnetToken
}
if request.AlchemyEthereumGoerliToken != "" {
nodeConfig.WalletConfig.AlchemyAPIKeys[goerliChainID] = request.AlchemyEthereumGoerliToken
}
if request.AlchemyArbitrumMainnetToken != "" {
nodeConfig.WalletConfig.AlchemyAPIKeys[arbitrumChainID] = request.AlchemyArbitrumMainnetToken
}

View file

@ -50,6 +50,8 @@ type WalletSecretsConfig struct {
// Testing
GanacheURL string `json:"ganacheURL"`
AlchemyEthereumMainnetToken string `json:"alchemyEthereumMainnetToken"`
AlchemyEthereumGoerliToken string `json:"alchemyEthereumGoerliToken"`
AlchemyArbitrumMainnetToken string `json:"alchemyArbitrumMainnetToken"`
AlchemyArbitrumGoerliToken string `json:"alchemyArbitrumGoerliToken"`
AlchemyOptimismMainnetToken string `json:"alchemyOptimismMainnetToken"`