diff --git a/backend/moonstreamapi/actions.py b/backend/moonstreamapi/actions.py index c4a9d403..a946e078 100644 --- a/backend/moonstreamapi/actions.py +++ b/backend/moonstreamapi/actions.py @@ -46,9 +46,11 @@ logger = logging.getLogger(__name__) blockchain_by_subscription_id = { "ethereum_blockchain": "ethereum", "polygon_blockchain": "polygon", + "mumbai_blockchain": "mumbai", + "xdai_blockchain": "xdai", "ethereum_smartcontract": "ethereum", "polygon_smartcontract": "polygon", - "xdai_blockchain": "xdai", + "mumbai_smartcontract": "mumbai", "xdai_smartcontract": "xdai", } diff --git a/backend/moonstreamapi/admin/subscription_types.py b/backend/moonstreamapi/admin/subscription_types.py index 79dc320d..8661f4ef 100644 --- a/backend/moonstreamapi/admin/subscription_types.py +++ b/backend/moonstreamapi/admin/subscription_types.py @@ -37,6 +37,16 @@ CANONICAL_SUBSCRIPTION_TYPES = { stripe_price_id=None, active=True, ), + "mumbai_smartcontract": SubscriptionTypeResourceData( + id="mumbai_smartcontract", + name="Mumbai smartcontracts", + choices=["input:address", "tag:erc721"], + description="Contracts events and tx_calls of contract of Mumbai blockchain", + icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png", + stripe_product_id=None, + stripe_price_id=None, + active=True, + ), "xdai_smartcontract": SubscriptionTypeResourceData( id="xdai_smartcontract", name="XDai smartcontract", @@ -67,6 +77,16 @@ CANONICAL_SUBSCRIPTION_TYPES = { stripe_price_id=None, active=True, ), + "mumbai_blockchain": SubscriptionTypeResourceData( + id="mumbai_blockchain", + name="Mumbai transactions", + choices=["input:address", "tag:erc721"], + description="Transactions that have been mined into the Mumbai blockchain", + icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png", + stripe_product_id=None, + stripe_price_id=None, + active=True, + ), "xdai_blockchain": SubscriptionTypeResourceData( id="xdai_blockchain", name="XDai transactions", diff --git a/backend/moonstreamapi/providers/__init__.py b/backend/moonstreamapi/providers/__init__.py index 53c99a8f..00511966 100644 --- a/backend/moonstreamapi/providers/__init__.py +++ b/backend/moonstreamapi/providers/__init__.py @@ -49,9 +49,11 @@ 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.MumbaiMoonwormProvider.event_type: moonworm_provider.MumbaiMoonwormProvider, moonworm_provider.XDaiMoonwormProvider.event_type: moonworm_provider.XDaiMoonwormProvider, transactions.EthereumTransactions.event_type: transactions.EthereumTransactions, transactions.PolygonTransactions.event_type: transactions.PolygonTransactions, + transactions.MumbaiTransactions.event_type: transactions.MumbaiTransactions, transactions.XDaiTransactions.event_type: transactions.XDaiTransactions, bugout.polygon_whalewatch_provider.event_type: bugout.polygon_whalewatch_provider, bugout.ethereum_txpool_provider.event_type: bugout.ethereum_txpool_provider, diff --git a/backend/moonstreamapi/providers/moonworm_provider.py b/backend/moonstreamapi/providers/moonworm_provider.py index c9fc6869..b0e5b9f4 100644 --- a/backend/moonstreamapi/providers/moonworm_provider.py +++ b/backend/moonstreamapi/providers/moonworm_provider.py @@ -19,6 +19,7 @@ logger.setLevel(logging.WARN) ethereum_event_type = "ethereum_blockchain" polygon_event_type = "polygon_blockchain" +mumbai_event_type = "mumbai_blockchain" xdai_event_type = "xdai_blockchain" allowed_tags = ["tag:erc721"] @@ -393,20 +394,27 @@ class MoonwormProvider: EthereumMoonwormProvider = MoonwormProvider( event_type="ethereum_smartcontract", blockchain=AvailableBlockchainType("ethereum"), - description="Provider for resiving transactions from Ethereum tables.", + description="Provider for reviving transactions from Ethereum tables.", streamboaundary_range_limit=2 * 60 * 60, ) PolygonMoonwormProvider = MoonwormProvider( event_type="polygon_smartcontract", blockchain=AvailableBlockchainType("polygon"), - description="Provider for resiving transactions from Polygon tables.", + description="Provider for reviving transactions from Polygon tables.", + streamboaundary_range_limit=2 * 60 * 60, +) + +MumbaiMoonwormProvider = MoonwormProvider( + event_type="mumbai_smartcontract", + blockchain=AvailableBlockchainType("mumbai"), + description="Provider for reviving transactions from Mumbai tables.", streamboaundary_range_limit=2 * 60 * 60, ) XDaiMoonwormProvider = MoonwormProvider( event_type="xdai_smartcontract", blockchain=AvailableBlockchainType("xdai"), - description="Provider for resiving transactions from XDai tables.", + description="Provider for reviving transactions from XDai tables.", streamboaundary_range_limit=2 * 60 * 60, ) diff --git a/backend/moonstreamapi/providers/transactions.py b/backend/moonstreamapi/providers/transactions.py index cb43e730..a031fa85 100644 --- a/backend/moonstreamapi/providers/transactions.py +++ b/backend/moonstreamapi/providers/transactions.py @@ -462,6 +462,13 @@ PolygonTransactions = TransactionsProvider( streamboaundary_range_limit=2 * 60 * 60, ) +MumbaiTransactions = TransactionsProvider( + event_type="mumbai_blockchain", + blockchain=AvailableBlockchainType("mumbai"), + description="Provider for resiving transactions from Mumbai tables.", + streamboaundary_range_limit=2 * 60 * 60, +) + XDaiTransactions = TransactionsProvider( event_type="xdai_blockchain", blockchain=AvailableBlockchainType("xdai"),