Add api changes.

pull/1128/head
Andrey 2024-09-11 15:58:10 +03:00
rodzic a1916cfcdc
commit 28007b9f30
7 zmienionych plików z 43 dodań i 3 usunięć

Wyświetl plik

@ -40,6 +40,8 @@ export MOONSTREAM_MANTLE_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri
export MOONSTREAM_IMX_ZKEVM_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_IMX_ZKEVM_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_GAME7_TESTNET_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_B3_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
export MOONSTREAM_QUERIES_JOURNAL_ID="<bugout_journal_id_where_store_queries_for_executing>"
export MOONSTREAM_USAGE_REPORTS_JOURNAL_ID="<bugout_journal_id_where_save_generated_reports>"

Wyświetl plik

@ -293,6 +293,28 @@ CANONICAL_SUBSCRIPTION_TYPES = {
stripe_price_id=None,
active=True,
),
"b3_smartcontract": SubscriptionTypeResourceData(
id="b3_smartcontract",
name="B3 smartcontracts",
blockchain="b3",
choices=["input:address", "tag:erc721"],
description="Contracts events and tx_calls of contract of B3 blockchain.",
icon_url="https://static.simiotics.com/moonstream/assets/b3-token-logo.png",
stripe_product_id=None,
stripe_price_id=None,
active=True,
),
"b3_sepolia_smartcontract": SubscriptionTypeResourceData(
id="b3_sepolia_smartcontract",
name="B3 Sepolia smartcontracts",
blockchain="b3_sepolia",
choices=["input:address", "tag:erc721"],
description="Contracts events and tx_calls of contract of B3 Sepolia blockchain.",
icon_url="https://static.simiotics.com/moonstream/assets/b3-token-logo.png",
stripe_product_id=None,
stripe_price_id=None,
active=True,
),
"ethereum_blockchain": SubscriptionTypeResourceData(
id="ethereum_blockchain",
name="Ethereum transactions",

Wyświetl plik

@ -275,6 +275,16 @@ if MOONSTREAM_GAME7_TESTNET_WEB3_PROVIDER_URI == "":
"MOONSTREAM_GAME7_TESTNET_WEB3_PROVIDER_URI env variable is not set"
)
MOONSTREAM_B3_WEB3_PROVIDER_URI = os.environ.get("MOONSTREAM_B3_WEB3_PROVIDER_URI", "")
if MOONSTREAM_B3_WEB3_PROVIDER_URI == "":
raise Exception("MOONSTREAM_B3_WEB3_PROVIDER_URI env variable is not set")
MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI = os.environ.get(
"MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI", ""
)
if MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI == "":
raise Exception("MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI env variable is not set")
## QueryAPI

Wyświetl plik

@ -2,4 +2,4 @@
Moonstream library and API version.
"""
MOONSTREAMAPI_VERSION = "0.4.8"
MOONSTREAMAPI_VERSION = "0.4.10"

Wyświetl plik

@ -37,6 +37,8 @@ from .settings import (
MOONSTREAM_ZKSYNC_ERA_TESTNET_WEB3_PROVIDER_URI,
MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI,
MOONSTREAM_GAME7_TESTNET_WEB3_PROVIDER_URI,
MOONSTREAM_B3_WEB3_PROVIDER_URI,
MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI,
NB_ACCESS_ID_HEADER,
multicall_contract_abi,
multicall_contracts,
@ -127,6 +129,10 @@ def connect(
web3_uri = MOONSTREAM_IMX_ZKEVM_SEPOLIA_WEB3_PROVIDER_URI
elif blockchain_type == AvailableBlockchainType.GAME7_TESTNET:
web3_uri = MOONSTREAM_GAME7_TESTNET_WEB3_PROVIDER_URI
elif blockchain_type == AvailableBlockchainType.B3:
web3_uri = MOONSTREAM_B3_WEB3_PROVIDER_URI
elif blockchain_type == AvailableBlockchainType.B3_SEPOLIA:
web3_uri = MOONSTREAM_B3_SEPOLIA_WEB3_PROVIDER_URI
else:
raise Exception("Wrong blockchain type provided for web3 URI")

Wyświetl plik

@ -38,7 +38,7 @@ Mako==1.2.3
MarkupSafe==2.1.1
moonstream==0.1.1
moonstreamdb==0.4.5
moonstreamdb-v3==0.0.16
moonstreamdb-v3==0.0.18
multiaddr==0.0.9
multidict==6.0.2
netaddr==0.8.0

Wyświetl plik

@ -17,7 +17,7 @@ setup(
"fastapi",
"moonstream",
"moonstreamdb>=0.4.5",
"moonstreamdb-v3>=0.0.16",
"moonstreamdb-v3>=0.0.18",
"humbug",
"pydantic==1.10.2",
"pyevmasm",