Merge pull request #1055 from moonstream-to/metatx-new-blockchains

Extended blockchains list for engineapi
pull/1056/head
Sergei Sumarokov 2024-04-15 20:39:47 +03:00 zatwierdzone przez GitHub
commit f5ff9427fe
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 50 dodań i 43 usunięć

Wyświetl plik

@ -87,46 +87,42 @@ MOONSTREAM_AWS_SIGNER_INSTANCE_PORT = 17181
# Blockchain configuration
MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI = os.environ.get(
"MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI"
)
MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI = os.environ.get(
"MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI"
)
MOONSTREAM_POLYGON_WEB3_PROVIDER_URI = os.environ.get(
"MOONSTREAM_POLYGON_WEB3_PROVIDER_URI"
)
MOONSTREAM_XDAI_WEB3_PROVIDER_URI = os.environ.get("MOONSTREAM_XDAI_WEB3_PROVIDER_URI")
# TODO(kompotkot): Leave a comment here explaining templated *_WEB3_PROVIDER_URI when we set
# NODEBALANCER_ACCESS_ID
ETHEREUM_PROVIDER_URI = MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI
MUMBAI_PROVIDER_URI = MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI
POLYGON_PROVIDER_URI = MOONSTREAM_POLYGON_WEB3_PROVIDER_URI
XDAI_PROVIDER_URI = MOONSTREAM_XDAI_WEB3_PROVIDER_URI
NODEBALANCER_ACCESS_ID = os.environ.get("ENGINE_NODEBALANCER_ACCESS_ID")
if NODEBALANCER_ACCESS_ID is not None:
NODEBALANCER_URI_TEMPLATE = "{}?access_id={}&data_source=blockchain"
ETHEREUM_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
)
MUMBAI_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
)
POLYGON_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
MOONSTREAM_POLYGON_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
)
XDAI_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
MOONSTREAM_XDAI_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
)
BLOCKCHAIN_PROVIDER_URIS = {
"ethereum": ETHEREUM_PROVIDER_URI,
"mumbai": MUMBAI_PROVIDER_URI,
"polygon": POLYGON_PROVIDER_URI,
"xdai": XDAI_PROVIDER_URI,
}
BLOCKCHAIN_PROVIDER_URIS = {}
blockchain_names = [
"ethereum",
"polygon",
"mumbai",
"amoy",
"xdai",
"zksync_era",
"zksync_era_sepolia",
"arbitrum_nova",
"arbitrum",
"xai",
"xai_sepolia",
"avalanche",
"avalanche_fuji",
"blast",
"blast_sepolia",
]
for b in blockchain_names:
provider_uri = os.environ.get(f"MOONSTREAM_{b.upper()}_WEB3_PROVIDER_URI")
if provider_uri is None:
continue
if NODEBALANCER_ACCESS_ID is not None:
NODEBALANCER_URI_TEMPLATE = "{}?access_id={}&data_source=blockchain"
provider_uri = NODEBALANCER_URI_TEMPLATE.format(
provider_uri, NODEBALANCER_ACCESS_ID
)
BLOCKCHAIN_PROVIDER_URIS[b] = provider_uri
globals()[f"MOONSTREAM_{b.upper()}_WEB3_PROVIDER_URI"] = provider_uri
SUPPORTED_BLOCKCHAINS = ", ".join(BLOCKCHAIN_PROVIDER_URIS)
UNSUPPORTED_BLOCKCHAIN_ERROR_MESSAGE = f"That blockchain is not supported. The supported blockchains are: {SUPPORTED_BLOCKCHAINS}."

Wyświetl plik

@ -1 +1 @@
0.0.8
0.0.9

Wyświetl plik

@ -14,10 +14,21 @@ export ENGINE_REDIS_PASSWORD="<redis_requirepass_password>"
export ENGINE_REDIS_URL="localhost:6380"
# Web3 Provider URIs
export MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
export MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
export MOONSTREAM_POLYGON_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
export MOONSTREAM_XDAI_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
export MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_POLYGON_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_AMOY_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_XDAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_ARBITRUM_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_XAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_BLAST_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export ENGINE_NODEBALANCER_ACCESS_ID="<access_id_for_Moonstream_Node_Balancer-if_provided_it_is_interpolated_into_provider_URIs>"
# leaderboard config