From 6e789c69f3e8f92889e8184e39ce903c6a35ae73 Mon Sep 17 00:00:00 2001 From: EA Date: Tue, 22 Oct 2024 15:48:02 +0600 Subject: [PATCH] Integrate api key rotation for EVM block explorers --- .github/workflows/deploy_appstore.yml | 18 ++--- .github/workflows/deploy_dev.yml | 18 ++--- .../project.pbxproj | 2 +- .../Development.template.xcconfig | 18 ++--- .../Production.template.xcconfig | 18 ++--- .../Core/Managers/EvmSyncSourceManager.swift | 22 +++--- .../Core/Providers/AppConfig.swift | 36 +++++----- .../UnstoppableWallet/Info.plist | 36 +++++----- fastlane/Fastfile | 72 +++++++++---------- 9 files changed, 120 insertions(+), 120 deletions(-) diff --git a/.github/workflows/deploy_appstore.yml b/.github/workflows/deploy_appstore.yml index 4e9749bfef..ab08d1c43c 100644 --- a/.github/workflows/deploy_appstore.yml +++ b/.github/workflows/deploy_appstore.yml @@ -52,15 +52,15 @@ jobs: APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - XCCONFIG_PROD_ETHERSCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_ETHERSCAN_API_KEY }} - XCCONFIG_PROD_ARBISCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_ARBISCAN_API_KEY }} - XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEY }} - XCCONFIG_PROD_BASESCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_BASESCAN_API_KEY }} - XCCONFIG_PROD_BSCSCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_BSCSCAN_API_KEY }} - XCCONFIG_PROD_POLYGONSCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_POLYGONSCAN_API_KEY }} - XCCONFIG_PROD_SNOWTRACE_API_KEY: ${{ secrets.XCCONFIG_PROD_SNOWTRACE_API_KEY }} - XCCONFIG_PROD_GNOSISSCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_GNOSISSCAN_API_KEY }} - XCCONFIG_PROD_FTMSCAN_API_KEY: ${{ secrets.XCCONFIG_PROD_FTMSCAN_API_KEY }} + XCCONFIG_PROD_ETHERSCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_ETHERSCAN_API_KEYS }} + XCCONFIG_PROD_ARBISCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_ARBISCAN_API_KEYS }} + XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEYS }} + XCCONFIG_PROD_BASESCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_BASESCAN_API_KEYS }} + XCCONFIG_PROD_BSCSCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_BSCSCAN_API_KEYS }} + XCCONFIG_PROD_POLYGONSCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_POLYGONSCAN_API_KEYS }} + XCCONFIG_PROD_SNOWTRACE_API_KEYS: ${{ secrets.XCCONFIG_PROD_SNOWTRACE_API_KEYS }} + XCCONFIG_PROD_GNOSISSCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_GNOSISSCAN_API_KEYS }} + XCCONFIG_PROD_FTMSCAN_API_KEYS: ${{ secrets.XCCONFIG_PROD_FTMSCAN_API_KEYS }} XCCONFIG_PROD_DEFIYIELD_API_KEY: ${{ secrets.XCCONFIG_PROD_DEFIYIELD_API_KEY }} XCCONFIG_PROD_TWITTER_BEARER_TOKEN: ${{ secrets.XCCONFIG_PROD_TWITTER_BEARER_TOKEN }} XCCONFIG_PROD_HS_PROVIDER_API_KEY: ${{ secrets.XCCONFIG_PROD_HS_PROVIDER_API_KEY }} diff --git a/.github/workflows/deploy_dev.yml b/.github/workflows/deploy_dev.yml index 3e4a5d5f6e..4363343837 100644 --- a/.github/workflows/deploy_dev.yml +++ b/.github/workflows/deploy_dev.yml @@ -53,15 +53,15 @@ jobs: APP_CENTER_API_TOKEN: ${{ secrets.APP_CENTER_API_TOKEN }} MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - XCCONFIG_DEV_ETHERSCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_ETHERSCAN_API_KEY }} - XCCONFIG_DEV_ARBISCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_ARBISCAN_API_KEY }} - XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEY }} - XCCONFIG_DEV_BASESCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_BASESCAN_API_KEY }} - XCCONFIG_DEV_BSCSCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_BSCSCAN_API_KEY }} - XCCONFIG_DEV_POLYGONSCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_POLYGONSCAN_API_KEY }} - XCCONFIG_DEV_SNOWTRACE_API_KEY: ${{ secrets.XCCONFIG_DEV_SNOWTRACE_API_KEY }} - XCCONFIG_DEV_GNOSISSCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_GNOSISSCAN_API_KEY }} - XCCONFIG_DEV_FTMSCAN_API_KEY: ${{ secrets.XCCONFIG_DEV_FTMSCAN_API_KEY }} + XCCONFIG_DEV_ETHERSCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_ETHERSCAN_API_KEYS }} + XCCONFIG_DEV_ARBISCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_ARBISCAN_API_KEYS }} + XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEYS }} + XCCONFIG_DEV_BASESCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_BASESCAN_API_KEYS }} + XCCONFIG_DEV_BSCSCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_BSCSCAN_API_KEYS }} + XCCONFIG_DEV_POLYGONSCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_POLYGONSCAN_API_KEYS }} + XCCONFIG_DEV_SNOWTRACE_API_KEYS: ${{ secrets.XCCONFIG_DEV_SNOWTRACE_API_KEYS }} + XCCONFIG_DEV_GNOSISSCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_GNOSISSCAN_API_KEYS }} + XCCONFIG_DEV_FTMSCAN_API_KEYS: ${{ secrets.XCCONFIG_DEV_FTMSCAN_API_KEYS }} XCCONFIG_DEV_DEFIYIELD_API_KEY: ${{ secrets.XCCONFIG_DEV_DEFIYIELD_API_KEY }} XCCONFIG_DEV_TWITTER_BEARER_TOKEN: ${{ secrets.XCCONFIG_DEV_TWITTER_BEARER_TOKEN }} XCCONFIG_DEV_HS_PROVIDER_API_KEY: ${{ secrets.XCCONFIG_DEV_HS_PROVIDER_API_KEY }} diff --git a/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj b/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj index b99c22bb00..f20534d653 100644 --- a/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj +++ b/UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj @@ -13011,7 +13011,7 @@ repositoryURL = "https://github.com/horizontalsystems/EvmKit.Swift"; requirement = { kind = exactVersion; - version = 2.0.21; + version = 2.1.0; }; }; D3604E4828F02A8B0066C366 /* XCRemoteSwiftPackageReference "Eip20Kit" */ = { diff --git a/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig b/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig index 8698ec6fc7..8a6156620b 100644 --- a/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig +++ b/UnstoppableWallet/UnstoppableWallet/Configuration/Development.template.xcconfig @@ -1,12 +1,12 @@ -etherscan_api_key = -arbiscan_api_key = -optimism_etherscan_api_key = -basescan_api_key = -bscscan_api_key = -polygonscan_api_key = -gnosisscan_api_key = -ftmscan_api_key = -snowtrace_api_key = +etherscan_api_keys = +arbiscan_api_keys = +optimism_etherscan_api_keys = +basescan_api_keys = +bscscan_api_keys = +polygonscan_api_keys = +gnosisscan_api_keys = +ftmscan_api_keys = +snowtrace_api_keys = defiyield_api_key = twitter_bearer_token = market_api_url = https:/$()/api-dev.blocksdecoded.com diff --git a/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig b/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig index c40f5a8ab4..aa8cbd451b 100644 --- a/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig +++ b/UnstoppableWallet/UnstoppableWallet/Configuration/Production.template.xcconfig @@ -1,12 +1,12 @@ -etherscan_api_key = -arbiscan_api_key = -optimism_etherscan_api_key = -basescan_api_key = -bscscan_api_key = -polygonscan_api_key = -gnosisscan_api_key = -ftmscan_api_key = -snowtrace_api_key = +etherscan_api_keys = +arbiscan_api_keys = +optimism_etherscan_api_keys = +basescan_api_keys = +bscscan_api_keys = +polygonscan_api_keys = +gnosisscan_api_keys = +ftmscan_api_keys = +snowtrace_api_keys = defiyield_api_key = twitter_bearer_token = market_api_url = https:/$()/api.blocksdecoded.com diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Managers/EvmSyncSourceManager.swift b/UnstoppableWallet/UnstoppableWallet/Core/Managers/EvmSyncSourceManager.swift index 8eee80015f..f0acbc6f37 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/Managers/EvmSyncSourceManager.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/Managers/EvmSyncSourceManager.swift @@ -20,15 +20,15 @@ class EvmSyncSourceManager { private func defaultTransactionSource(blockchainType: BlockchainType) -> EvmKit.TransactionSource { switch blockchainType { - case .ethereum: return .ethereumEtherscan(apiKey: AppConfig.etherscanKey) - case .binanceSmartChain: return .bscscan(apiKey: AppConfig.bscscanKey) - case .polygon: return .polygonscan(apiKey: AppConfig.polygonscanKey) - case .avalanche: return .snowtrace(apiKey: AppConfig.snowtraceKey) - case .optimism: return .optimisticEtherscan(apiKey: AppConfig.optimismEtherscanKey) - case .arbitrumOne: return .arbiscan(apiKey: AppConfig.arbiscanKey) - case .gnosis: return .gnosis(apiKey: AppConfig.gnosisscanKey) - case .fantom: return .fantom(apiKey: AppConfig.ftmscanKey) - case .base: return .basescan(apiKey: AppConfig.basescanKey) + case .ethereum: return .ethereumEtherscan(apiKeys: AppConfig.etherscanKeys) + case .binanceSmartChain: return .bscscan(apiKeys: AppConfig.bscscanKeys) + case .polygon: return .polygonscan(apiKeys: AppConfig.polygonscanKeys) + case .avalanche: return .snowtrace(apiKeys: AppConfig.snowtraceKeys) + case .optimism: return .optimisticEtherscan(apiKeys: AppConfig.optimismEtherscanKeys) + case .arbitrumOne: return .arbiscan(apiKeys: AppConfig.arbiscanKeys) + case .gnosis: return .gnosis(apiKeys: AppConfig.gnosisscanKeys) + case .fantom: return .fantom(apiKeys: AppConfig.ftmscanKeys) + case .base: return .basescan(apiKeys: AppConfig.basescanKeys) default: fatalError("Non-supported EVM blockchain") } } @@ -53,7 +53,7 @@ extension EvmSyncSourceManager { rpcSource: .http(urls: [URL(string: "\(AppConfig.marketApiUrl)/v1/ethereum-rpc/sepolia")!], auth: nil), transactionSource: EvmKit.TransactionSource( name: "sepolia.etherscan.io", - type: .etherscan(apiBaseUrl: "https://api-sepolia.etherscan.io", txBaseUrl: "https://sepiloa.etherscan.io", apiKey: AppConfig.etherscanKey) + type: .etherscan(apiBaseUrl: "https://api-sepolia.etherscan.io", txBaseUrl: "https://sepiloa.etherscan.io", apiKeys: AppConfig.etherscanKeys) ) ), ] @@ -79,7 +79,7 @@ extension EvmSyncSourceManager { rpcSource: .http(urls: [URL(string: "https://data-seed-prebsc-1-s1.binance.org:8545")!], auth: nil), transactionSource: EvmKit.TransactionSource( name: "testnet.bscscan.com", - type: .etherscan(apiBaseUrl: "https://api-testnet.bscscan.com", txBaseUrl: "https://testnet.bscscan.com", apiKey: AppConfig.bscscanKey) + type: .etherscan(apiBaseUrl: "https://api-testnet.bscscan.com", txBaseUrl: "https://testnet.bscscan.com", apiKeys: AppConfig.bscscanKeys) ) ), ] diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift b/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift index d720942cfd..c3fed935c3 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/Providers/AppConfig.swift @@ -65,40 +65,40 @@ enum AppConfig { Bundle.main.object(forInfoDictionaryKey: "OfficeMode") as? String == "true" } - static var etherscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "EtherscanApiKey") as? String) ?? "" + static var etherscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "EtherscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var arbiscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "ArbiscanApiKey") as? String) ?? "" + static var arbiscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "ArbiscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var gnosisscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "GnosisscanApiKey") as? String) ?? "" + static var gnosisscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "GnosisscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var ftmscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "FtmscanApiKey") as? String) ?? "" + static var ftmscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "FtmscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var optimismEtherscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "OptimismEtherscanApiKey") as? String) ?? "" + static var optimismEtherscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "OptimismEtherscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var basescanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "BasescanApiKey") as? String) ?? "" + static var basescanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "BasescanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var bscscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "BscscanApiKey") as? String) ?? "" + static var bscscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "BscscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var polygonscanKey: String { - (Bundle.main.object(forInfoDictionaryKey: "PolygonscanApiKey") as? String) ?? "" + static var polygonscanKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "PolygonscanApiKeys") as? String) ?? "").components(separatedBy: ",") } - static var snowtraceKey: String { - (Bundle.main.object(forInfoDictionaryKey: "SnowtraceApiKey") as? String) ?? "" + static var snowtraceKeys: [String] { + ((Bundle.main.object(forInfoDictionaryKey: "SnowtraceApiKeys") as? String) ?? "").components(separatedBy: ",") } static var twitterBearerToken: String? { diff --git a/UnstoppableWallet/UnstoppableWallet/Info.plist b/UnstoppableWallet/UnstoppableWallet/Info.plist index ca94240753..652b421002 100644 --- a/UnstoppableWallet/UnstoppableWallet/Info.plist +++ b/UnstoppableWallet/UnstoppableWallet/Info.plist @@ -2,12 +2,12 @@ - ArbiscanApiKey - ${arbiscan_api_key} - BasescanApiKey - ${basescan_api_key} - BscscanApiKey - ${bscscan_api_key} + ArbiscanApiKeys + ${arbiscan_api_keys} + BasescanApiKeys + ${basescan_api_keys} + BscscanApiKeys + ${bscscan_api_keys} CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -57,12 +57,12 @@ $(defiyield_api_key) DonateEnabled ${donate_enabled} - EtherscanApiKey - ${etherscan_api_key} - FtmscanApiKey - ${ftmscan_api_key} - GnosisscanApiKey - ${gnosisscan_api_key} + EtherscanApiKeys + ${etherscan_api_keys} + FtmscanApiKeys + ${ftmscan_api_keys} + GnosisscanApiKeys + ${gnosisscan_api_keys} HsProviderApiKey $(hs_provider_api_key) ITSAppUsesNonExemptEncryption @@ -121,10 +121,10 @@ ${one_inch_commission_address} OpenSeaApiKey ${open_sea_api_key} - OptimismEtherscanApiKey - ${optimism_etherscan_api_key} - PolygonscanApiKey - ${polygonscan_api_key} + OptimismEtherscanApiKeys + ${optimism_etherscan_api_keys} + PolygonscanApiKeys + ${polygonscan_api_keys} PrivateCloudContainerId ${private_cloud_container_id} SharedCloudContainerId @@ -133,8 +133,8 @@ ${ShowBuildNumber} ShowTestNetSwitcher ${ShowTestNetSwitcher} - SnowtraceApiKey - ${snowtrace_api_key} + SnowtraceApiKeys + ${snowtrace_api_keys} SwapEnabled ${swap_enabled} TronGridApiKey diff --git a/fastlane/Fastfile b/fastlane/Fastfile index ea12386b25..9f70347642 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -9,15 +9,15 @@ APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"] GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"] APP_CENTER_API_TOKEN = ENV["APP_CENTER_API_TOKEN"] -XCCONFIG_DEV_ETHERSCAN_API_KEY = ENV["XCCONFIG_DEV_ETHERSCAN_API_KEY"] -XCCONFIG_DEV_ARBISCAN_API_KEY = ENV["XCCONFIG_DEV_ARBISCAN_API_KEY"] -XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEY = ENV["XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEY"] -XCCONFIG_DEV_BASESCAN_API_KEY = ENV["XCCONFIG_DEV_BASESCAN_API_KEY"] -XCCONFIG_DEV_BSCSCAN_API_KEY = ENV["XCCONFIG_DEV_BSCSCAN_API_KEY"] -XCCONFIG_DEV_POLYGONSCAN_API_KEY = ENV["XCCONFIG_DEV_POLYGONSCAN_API_KEY"] -XCCONFIG_DEV_SNOWTRACE_API_KEY = ENV["XCCONFIG_DEV_SNOWTRACE_API_KEY"] -XCCONFIG_DEV_GNOSISSCAN_API_KEY = ENV["XCCONFIG_DEV_GNOSISSCAN_API_KEY"] -XCCONFIG_DEV_FTMSCAN_API_KEY = ENV["XCCONFIG_DEV_FTMSCAN_API_KEY"] +XCCONFIG_DEV_ETHERSCAN_API_KEYS = ENV["XCCONFIG_DEV_ETHERSCAN_API_KEYS"] +XCCONFIG_DEV_ARBISCAN_API_KEYS = ENV["XCCONFIG_DEV_ARBISCAN_API_KEYS"] +XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEYS = ENV["XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEYS"] +XCCONFIG_DEV_BASESCAN_API_KEYS = ENV["XCCONFIG_DEV_BASESCAN_API_KEYS"] +XCCONFIG_DEV_BSCSCAN_API_KEYS = ENV["XCCONFIG_DEV_BSCSCAN_API_KEYS"] +XCCONFIG_DEV_POLYGONSCAN_API_KEYS = ENV["XCCONFIG_DEV_POLYGONSCAN_API_KEYS"] +XCCONFIG_DEV_SNOWTRACE_API_KEYS = ENV["XCCONFIG_DEV_SNOWTRACE_API_KEYS"] +XCCONFIG_DEV_GNOSISSCAN_API_KEYS = ENV["XCCONFIG_DEV_GNOSISSCAN_API_KEYS"] +XCCONFIG_DEV_FTMSCAN_API_KEYS = ENV["XCCONFIG_DEV_FTMSCAN_API_KEYS"] XCCONFIG_DEV_DEFIYIELD_API_KEY = ENV["XCCONFIG_DEV_DEFIYIELD_API_KEY"] XCCONFIG_DEV_TWITTER_BEARER_TOKEN = ENV["XCCONFIG_DEV_TWITTER_BEARER_TOKEN"] XCCONFIG_DEV_HS_PROVIDER_API_KEY = ENV["XCCONFIG_DEV_HS_PROVIDER_API_KEY"] @@ -30,15 +30,15 @@ XCCONFIG_DEV_ONE_INCH_COMMISSION = ENV["XCCONFIG_DEV_ONE_INCH_COMMISSION"] XCCONFIG_DEV_ONE_INCH_COMMISSION_ADDRESS = ENV["XCCONFIG_DEV_ONE_INCH_COMMISSION_ADDRESS"] XCCONFIG_DEV_REFERRAL_APP_SERVER_URL = ENV["XCCONFIG_DEV_REFERRAL_APP_SERVER_URL"] -XCCONFIG_PROD_ETHERSCAN_API_KEY = ENV["XCCONFIG_PROD_ETHERSCAN_API_KEY"] -XCCONFIG_PROD_ARBISCAN_API_KEY = ENV["XCCONFIG_PROD_ARBISCAN_API_KEY"] -XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEY = ENV["XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEY"] -XCCONFIG_PROD_BASESCAN_API_KEY = ENV["XCCONFIG_PROD_BASESCAN_API_KEY"] -XCCONFIG_PROD_BSCSCAN_API_KEY = ENV["XCCONFIG_PROD_BSCSCAN_API_KEY"] -XCCONFIG_PROD_POLYGONSCAN_API_KEY = ENV["XCCONFIG_PROD_POLYGONSCAN_API_KEY"] -XCCONFIG_PROD_SNOWTRACE_API_KEY = ENV["XCCONFIG_PROD_SNOWTRACE_API_KEY"] -XCCONFIG_PROD_GNOSISSCAN_API_KEY = ENV["XCCONFIG_PROD_GNOSISSCAN_API_KEY"] -XCCONFIG_PROD_FTMSCAN_API_KEY = ENV["XCCONFIG_PROD_FTMSCAN_API_KEY"] +XCCONFIG_PROD_ETHERSCAN_API_KEYS = ENV["XCCONFIG_PROD_ETHERSCAN_API_KEYS"] +XCCONFIG_PROD_ARBISCAN_API_KEYS = ENV["XCCONFIG_PROD_ARBISCAN_API_KEYS"] +XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEYS = ENV["XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEYS"] +XCCONFIG_PROD_BASESCAN_API_KEYS = ENV["XCCONFIG_PROD_BASESCAN_API_KEYS"] +XCCONFIG_PROD_BSCSCAN_API_KEYS = ENV["XCCONFIG_PROD_BSCSCAN_API_KEYS"] +XCCONFIG_PROD_POLYGONSCAN_API_KEYS = ENV["XCCONFIG_PROD_POLYGONSCAN_API_KEYS"] +XCCONFIG_PROD_SNOWTRACE_API_KEYS = ENV["XCCONFIG_PROD_SNOWTRACE_API_KEYS"] +XCCONFIG_PROD_GNOSISSCAN_API_KEYS = ENV["XCCONFIG_PROD_GNOSISSCAN_API_KEYS"] +XCCONFIG_PROD_FTMSCAN_API_KEYS = ENV["XCCONFIG_PROD_FTMSCAN_API_KEYS"] XCCONFIG_PROD_DEFIYIELD_API_KEY = ENV["XCCONFIG_PROD_DEFIYIELD_API_KEY"] XCCONFIG_PROD_TWITTER_BEARER_TOKEN = ENV["XCCONFIG_PROD_TWITTER_BEARER_TOKEN"] XCCONFIG_PROD_HS_PROVIDER_API_KEY = ENV["XCCONFIG_PROD_HS_PROVIDER_API_KEY"] @@ -113,15 +113,15 @@ def prepare_environment(for_testers) end def apply_dev_xcconfig - update_dev_xcconfig('etherscan_api_key', XCCONFIG_DEV_ETHERSCAN_API_KEY) - update_dev_xcconfig('optimism_etherscan_api_key', XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEY) - update_dev_xcconfig('basescan_api_key', XCCONFIG_DEV_BASESCAN_API_KEY) - update_dev_xcconfig('arbiscan_api_key', XCCONFIG_DEV_ARBISCAN_API_KEY) - update_dev_xcconfig('bscscan_api_key', XCCONFIG_DEV_BSCSCAN_API_KEY) - update_dev_xcconfig('polygonscan_api_key', XCCONFIG_DEV_POLYGONSCAN_API_KEY) - update_dev_xcconfig('snowtrace_api_key', XCCONFIG_DEV_SNOWTRACE_API_KEY) - update_dev_xcconfig('gnosisscan_api_key', XCCONFIG_DEV_GNOSISSCAN_API_KEY) - update_dev_xcconfig('ftmscan_api_key', XCCONFIG_DEV_FTMSCAN_API_KEY) + update_dev_xcconfig('etherscan_api_keys', XCCONFIG_DEV_ETHERSCAN_API_KEYS) + update_dev_xcconfig('optimism_etherscan_api_keys', XCCONFIG_DEV_OPTIMISM_ETHERSCAN_API_KEYS) + update_dev_xcconfig('basescan_api_keys', XCCONFIG_DEV_BASESCAN_API_KEYS) + update_dev_xcconfig('arbiscan_api_keys', XCCONFIG_DEV_ARBISCAN_API_KEYS) + update_dev_xcconfig('bscscan_api_keys', XCCONFIG_DEV_BSCSCAN_API_KEYS) + update_dev_xcconfig('polygonscan_api_keys', XCCONFIG_DEV_POLYGONSCAN_API_KEYS) + update_dev_xcconfig('snowtrace_api_keys', XCCONFIG_DEV_SNOWTRACE_API_KEYS) + update_dev_xcconfig('gnosisscan_api_keys', XCCONFIG_DEV_GNOSISSCAN_API_KEYS) + update_dev_xcconfig('ftmscan_api_keys', XCCONFIG_DEV_FTMSCAN_API_KEYS) update_dev_xcconfig('defiyield_api_key', XCCONFIG_DEV_DEFIYIELD_API_KEY) update_dev_xcconfig('twitter_bearer_token', XCCONFIG_DEV_TWITTER_BEARER_TOKEN) update_dev_xcconfig('hs_provider_api_key', XCCONFIG_DEV_HS_PROVIDER_API_KEY) @@ -138,15 +138,15 @@ end def apply_prod_xcconfig(swap_enabled, donate_enabled) update_prod_xcconfig('swap_enabled', swap_enabled) update_prod_xcconfig('donate_enabled', donate_enabled) - update_prod_xcconfig('etherscan_api_key', XCCONFIG_PROD_ETHERSCAN_API_KEY) - update_prod_xcconfig('arbiscan_api_key', XCCONFIG_PROD_ARBISCAN_API_KEY) - update_prod_xcconfig('optimism_etherscan_api_key', XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEY) - update_prod_xcconfig('basescan_api_key', XCCONFIG_PROD_BASESCAN_API_KEY) - update_prod_xcconfig('bscscan_api_key', XCCONFIG_PROD_BSCSCAN_API_KEY) - update_prod_xcconfig('polygonscan_api_key', XCCONFIG_PROD_POLYGONSCAN_API_KEY) - update_prod_xcconfig('snowtrace_api_key', XCCONFIG_PROD_SNOWTRACE_API_KEY) - update_prod_xcconfig('gnosisscan_api_key', XCCONFIG_PROD_GNOSISSCAN_API_KEY) - update_prod_xcconfig('ftmscan_api_key', XCCONFIG_PROD_FTMSCAN_API_KEY) + update_prod_xcconfig('etherscan_api_keys', XCCONFIG_PROD_ETHERSCAN_API_KEYS) + update_prod_xcconfig('arbiscan_api_keys', XCCONFIG_PROD_ARBISCAN_API_KEYS) + update_prod_xcconfig('optimism_etherscan_api_keys', XCCONFIG_PROD_OPTIMISM_ETHERSCAN_API_KEYS) + update_prod_xcconfig('basescan_api_keys', XCCONFIG_PROD_BASESCAN_API_KEYS) + update_prod_xcconfig('bscscan_api_keys', XCCONFIG_PROD_BSCSCAN_API_KEYS) + update_prod_xcconfig('polygonscan_api_keys', XCCONFIG_PROD_POLYGONSCAN_API_KEYS) + update_prod_xcconfig('snowtrace_api_keys', XCCONFIG_PROD_SNOWTRACE_API_KEYS) + update_prod_xcconfig('gnosisscan_api_keys', XCCONFIG_PROD_GNOSISSCAN_API_KEYS) + update_prod_xcconfig('ftmscan_api_keys', XCCONFIG_PROD_FTMSCAN_API_KEYS) update_prod_xcconfig('defiyield_api_key', XCCONFIG_PROD_DEFIYIELD_API_KEY) update_prod_xcconfig('twitter_bearer_token', XCCONFIG_PROD_TWITTER_BEARER_TOKEN) update_prod_xcconfig('hs_provider_api_key', XCCONFIG_PROD_HS_PROVIDER_API_KEY)