kopia lustrzana https://github.com/bugout-dev/moonstream
Add crawlers and api.
rodzic
44764abdaa
commit
ce628b6e0b
|
@ -32,6 +32,7 @@ from .settings import (
|
|||
MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI,
|
||||
MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI,
|
||||
MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI,
|
||||
MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI,
|
||||
MOONSTREAM_NODE_XAI_A_EXTERNAL_URI,
|
||||
MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI,
|
||||
MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI,
|
||||
|
@ -91,6 +92,8 @@ def connect(
|
|||
web3_uri = MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI
|
||||
elif blockchain_type == AvailableBlockchainType.BLAST_SEPOLIA:
|
||||
web3_uri = MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI
|
||||
elif blockchain_type == AvailableBlockchainType.PROOFOFPLAY_APEX:
|
||||
web3_uri = MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI
|
||||
else:
|
||||
raise Exception("Wrong blockchain type provided for web3 URI")
|
||||
|
||||
|
|
|
@ -180,6 +180,15 @@ if MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI == "":
|
|||
"MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI env variable is not set"
|
||||
)
|
||||
|
||||
MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI = os.environ.get(
|
||||
"MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI", ""
|
||||
)
|
||||
if MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI == "":
|
||||
raise Exception(
|
||||
"MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI env variable is not set"
|
||||
)
|
||||
|
||||
|
||||
MOONSTREAM_CRAWL_WORKERS = 4
|
||||
MOONSTREAM_CRAWL_WORKERS_RAW = os.environ.get("MOONSTREAM_CRAWL_WORKERS")
|
||||
try:
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
Moonstream crawlers version.
|
||||
"""
|
||||
|
||||
MOONCRAWL_VERSION = "0.4.3"
|
||||
MOONCRAWL_VERSION = "0.4.4"
|
||||
|
|
|
@ -23,6 +23,7 @@ export NFT_HUMBUG_TOKEN="<Token_for_nft_crawler>"
|
|||
# Blockchain nodes environment variables
|
||||
export MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||
export MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||
export MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||
export MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||
export MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||
export MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||
|
|
|
@ -37,7 +37,7 @@ setup(
|
|||
"bugout>=0.2.13",
|
||||
"chardet",
|
||||
"fastapi",
|
||||
"moonstreamdb>=0.4.1",
|
||||
"moonstreamdb>=0.4.2",
|
||||
"moonstream>=0.1.1",
|
||||
"moonworm[moonstream]>=0.6.2",
|
||||
"humbug",
|
||||
|
|
|
@ -17,6 +17,7 @@ export MOONSTREAM_DATA_JOURNAL_ID="<bugout_journal_id_to_store_blockchain_data>"
|
|||
export HUMBUG_TXPOOL_CLIENT_ID="<Bugout_Humbug_client_id_for_txpool_transactions_in_journal>"
|
||||
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_PROOFOFPLAY_APEX_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>"
|
||||
|
|
|
@ -40,6 +40,17 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
|||
stripe_price_id=None,
|
||||
active=True,
|
||||
),
|
||||
"proofofplay_apex_smartcontract": SubscriptionTypeResourceData(
|
||||
id="proofofplay_apex_smartcontract",
|
||||
name="Proof of Play Apex smartcontracts",
|
||||
blockchain="proofofplay_apex",
|
||||
choices=["input:address", "tag:erc721"],
|
||||
description="Contracts events and tx_calls of contract of Proof of Play Apex blockchain",
|
||||
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
||||
stripe_product_id=None,
|
||||
stripe_price_id=None,
|
||||
active=True,
|
||||
),
|
||||
"mumbai_smartcontract": SubscriptionTypeResourceData(
|
||||
id="mumbai_smartcontract",
|
||||
name="Mumbai smartcontracts",
|
||||
|
@ -227,6 +238,17 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
|||
stripe_price_id=None,
|
||||
active=False,
|
||||
),
|
||||
"proofofplay_apex_blockchain": SubscriptionTypeResourceData(
|
||||
id="proofofplay_apex_blockchain",
|
||||
name="Proof of Play Apex transactions",
|
||||
blockchain="proofofplay_apex",
|
||||
choices=["input:address", "tag:erc721"],
|
||||
description="Transactions that have been mined into the Proof of Play Apex blockchain",
|
||||
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
||||
stripe_product_id=None,
|
||||
stripe_price_id=None,
|
||||
active=False,
|
||||
),
|
||||
"mumbai_blockchain": SubscriptionTypeResourceData(
|
||||
id="mumbai_blockchain",
|
||||
name="Mumbai transactions",
|
||||
|
|
|
@ -49,6 +49,7 @@ class ReceivingEventsException(Exception):
|
|||
event_providers: Dict[str, Any] = {
|
||||
moonworm_provider.EthereumMoonwormProvider.event_type: moonworm_provider.EthereumMoonwormProvider,
|
||||
moonworm_provider.PolygonMoonwormProvider.event_type: moonworm_provider.PolygonMoonwormProvider,
|
||||
moonworm_provider.ProofOfPlayApexMoonwormProvider.event_type: moonworm_provider.ProofOfPlayApexMoonwormProvider,
|
||||
moonworm_provider.MumbaiMoonwormProvider.event_type: moonworm_provider.MumbaiMoonwormProvider,
|
||||
moonworm_provider.AmoyMoonwormProvider.event_type: moonworm_provider.AmoyMoonwormProvider,
|
||||
moonworm_provider.XDaiMoonwormProvider.event_type: moonworm_provider.XDaiMoonwormProvider,
|
||||
|
@ -65,6 +66,7 @@ event_providers: Dict[str, Any] = {
|
|||
moonworm_provider.BlastSepoliaMoonwormProvider.event_type: moonworm_provider.BlastSepoliaMoonwormProvider,
|
||||
transactions.EthereumTransactions.event_type: transactions.EthereumTransactions,
|
||||
transactions.PolygonTransactions.event_type: transactions.PolygonTransactions,
|
||||
transactions.ProofOfPlayApexTransactions.event_type: transactions.ProofOfPlayApexTransactions,
|
||||
transactions.MumbaiTransactions.event_type: transactions.MumbaiTransactions,
|
||||
transactions.AmoyTransactions.event_type: transactions.AmoyTransactions,
|
||||
transactions.XDaiTransactions.event_type: transactions.XDaiTransactions,
|
||||
|
|
|
@ -19,6 +19,7 @@ logger.setLevel(logging.WARN)
|
|||
|
||||
ethereum_event_type = "ethereum_blockchain"
|
||||
polygon_event_type = "polygon_blockchain"
|
||||
proofofplay_apex_event_type = "proofofplay_apex_blockchain"
|
||||
mumbai_event_type = "mumbai_blockchain"
|
||||
amoy_event_type = "amoy_blockchain"
|
||||
xdai_event_type = "xdai_blockchain"
|
||||
|
@ -510,3 +511,10 @@ BlastSepoliaMoonwormProvider = MoonwormProvider(
|
|||
description="Provider for reviving transactions from Blast Sepolia tables.",
|
||||
streamboaundary_range_limit=2 * 60 * 60,
|
||||
)
|
||||
|
||||
ProofOfPlayApexMoonwormProvider = MoonwormProvider(
|
||||
event_type="proofofplay_apex_smartcontract",
|
||||
blockchain=AvailableBlockchainType("proofofplay_apex"),
|
||||
description="Provider for reviving transactions from Proof of Play Apex tables.",
|
||||
streamboaundary_range_limit=2 * 60 * 60,
|
||||
)
|
||||
|
|
|
@ -559,3 +559,10 @@ BlastSepoliaTransactions = TransactionsProvider(
|
|||
description="Provider for resiving transactions from Blast Sepolia tables.",
|
||||
streamboaundary_range_limit=2 * 60 * 60,
|
||||
)
|
||||
|
||||
ProofOfPlayApexTransactions = TransactionsProvider(
|
||||
event_type="proofofplay_apex_blockchain",
|
||||
blockchain=AvailableBlockchainType("proofofplay_apex"),
|
||||
description="Provider for resiving transactions from Proof of Play Apex tables.",
|
||||
streamboaundary_range_limit=2 * 60 * 60,
|
||||
)
|
||||
|
|
|
@ -214,6 +214,14 @@ if MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI == "":
|
|||
"MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI env variable is not set"
|
||||
)
|
||||
|
||||
MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI = os.environ.get(
|
||||
"MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI", ""
|
||||
)
|
||||
if MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI == "":
|
||||
raise Exception(
|
||||
"MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI env variable is not set"
|
||||
)
|
||||
|
||||
## QueryAPI
|
||||
|
||||
MOONSTREAM_S3_QUERIES_BUCKET = os.environ.get("MOONSTREAM_S3_QUERIES_BUCKET", "")
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
Moonstream library and API version.
|
||||
"""
|
||||
|
||||
MOONSTREAMAPI_VERSION = "0.4.1"
|
||||
MOONSTREAMAPI_VERSION = "0.4.2"
|
||||
|
|
|
@ -22,6 +22,7 @@ from .settings import (
|
|||
MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI,
|
||||
MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI,
|
||||
MOONSTREAM_POLYGON_WEB3_PROVIDER_URI,
|
||||
MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI,
|
||||
MOONSTREAM_WYRM_WEB3_PROVIDER_URI,
|
||||
MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI,
|
||||
MOONSTREAM_XAI_WEB3_PROVIDER_URI,
|
||||
|
@ -103,6 +104,8 @@ def connect(
|
|||
web3_uri = MOONSTREAM_BLAST_WEB3_PROVIDER_URI
|
||||
elif blockchain_type == AvailableBlockchainType.BLAST_SEPOLIA:
|
||||
web3_uri = MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI
|
||||
elif blockchain_type == AvailableBlockchainType.PROOFOFPLAY_APEX:
|
||||
web3_uri = MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI
|
||||
else:
|
||||
raise Exception("Wrong blockchain type provided for web3 URI")
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ lru-dict==1.1.8
|
|||
Mako==1.2.3
|
||||
MarkupSafe==2.1.1
|
||||
moonstream==0.1.1
|
||||
moonstreamdb==0.4.1
|
||||
moonstreamdb==0.4.2
|
||||
multiaddr==0.0.9
|
||||
multidict==6.0.2
|
||||
netaddr==0.8.0
|
||||
|
|
|
@ -16,7 +16,7 @@ setup(
|
|||
"bugout>=0.2.15",
|
||||
"fastapi",
|
||||
"moonstream",
|
||||
"moonstreamdb>=0.4.1",
|
||||
"moonstreamdb>=0.4.2",
|
||||
"humbug",
|
||||
"pydantic==1.10.2",
|
||||
"pyevmasm",
|
||||
|
|
Ładowanie…
Reference in New Issue