diff --git a/types/python/moonstreamtypes/blockchain.py b/types/python/moonstreamtypes/blockchain.py index e549caf64..53e382ec6 100644 --- a/types/python/moonstreamtypes/blockchain.py +++ b/types/python/moonstreamtypes/blockchain.py @@ -81,6 +81,7 @@ from moonstreamdbv3.models import ( Game7OrbitArbitrumSepoliaLabel as Game7OrbitArbitrumSepoliaLabelV3, ) +from moonstreamdbv3.models import Game7Label as Game7LabelV3 from moonstreamdbv3.models import Game7TestnetLabel as Game7TestnetLabelV3 from moonstreamdbv3.models import ImxZkevmLabel as ImxZkevmLabelV3 from moonstreamdbv3.models import ImxZkevmSepoliaLabel as ImxZkevmSepoliaLabelV3 @@ -99,7 +100,8 @@ from moonstreamdbv3.models import ZkSyncEraSepoliaLabel as ZkSyncEraSepoliaLabelV3 from moonstreamdbv3.models import B3Label as B3LabelV3 from moonstreamdbv3.models import B3SepoliaLabel as B3SepoliaLabelV3 - +from moonstreamdbv3.models import RoninLabel as RoninLabelV3 +from moonstreamdbv3.models import RoninSaigonLabel as RoninSaigonLabelV3 class AvailableBlockchainType(Enum): ETHEREUM = "ethereum" @@ -118,6 +120,7 @@ class AvailableBlockchainType(Enum): ARBITRUM_SEPOLIA = "arbitrum_sepolia" GAME7_ORBIT_ARBITRUM_SEPOLIA = "game7_orbit_arbitrum_sepolia" GAME7_TESTNET = "game7_testnet" + GAME7 = "game7" XAI = "xai" XAI_SEPOLIA = "xai_sepolia" AVALANCHE = "avalanche" @@ -133,6 +136,8 @@ class AvailableBlockchainType(Enum): IMX_ZKEVM_SEPOLIA = "imx_zkevm_sepolia" B3 = "b3" B3_SEPOLIA = "b3_sepolia" + RONIN = "ronin" + RONIN_SAIGON = "ronin_saigon" def get_block_model( @@ -438,6 +443,8 @@ def get_label_model( label_model = Game7OrbitArbitrumSepoliaLabelV3 elif blockchain_type == AvailableBlockchainType.GAME7_TESTNET: label_model = Game7TestnetLabelV3 + elif blockchain_type == AvailableBlockchainType.GAME7: + label_model = Game7LabelV3 elif blockchain_type == AvailableBlockchainType.XAI: label_model = XaiLabelV3 elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA: @@ -468,6 +475,10 @@ def get_label_model( label_model = B3LabelV3 elif blockchain_type == AvailableBlockchainType.B3_SEPOLIA: label_model = B3SepoliaLabelV3 + elif blockchain_type == AvailableBlockchainType.RONIN: + label_model = RoninLabelV3 + elif blockchain_type == AvailableBlockchainType.RONIN_SAIGON: + label_model = RoninSaigonLabelV3 else: raise Exception("Unsupported blockchain type provided") else: diff --git a/types/python/moonstreamtypes/networks.py b/types/python/moonstreamtypes/networks.py index 4b0c71790..86d8fc30a 100644 --- a/types/python/moonstreamtypes/networks.py +++ b/types/python/moonstreamtypes/networks.py @@ -81,6 +81,7 @@ Game7OrbitArbitrumSepoliaLabel as Game7OrbitArbitrumSepoliaLabelV3, ) from moonstreamdbv3.models import Game7TestnetLabel as Game7TestnetLabelV3 +from moonstreamdbv3.models import Game7Label as Game7LabelV3 from moonstreamdbv3.models import ImxZkevmLabel as ImxZkevmLabelV3 from moonstreamdbv3.models import ImxZkevmSepoliaLabel as ImxZkevmSepoliaLabelV3 from moonstreamdbv3.models import MantleLabel as MantleLabelV3 @@ -98,6 +99,8 @@ from moonstreamdbv3.models import ZkSyncEraSepoliaLabel as ZkSyncEraSepoliaLabelV3 from moonstreamdbv3.models import B3Label as B3LabelV3 from moonstreamdbv3.models import B3SepoliaLabel as B3SepoliaLabelV3 +from moonstreamdbv3.models import RoninLabel as RoninLabelV3 +from moonstreamdbv3.models import RoninSaigonLabel as RoninSaigonLabelV3 from .blockchain import AvailableBlockchainType @@ -119,6 +122,7 @@ class Network(Enum): arbitrum_sepolia = "arbitrum_sepolia" game7_orbit_arbitrum_sepolia = "game7_orbit_arbitrum_sepolia" game7_testnet = "game7_testnet" + game7 = "game7" xai = "xai" xai_sepolia = "xai_sepolia" avalanche = "avalanche" @@ -134,6 +138,8 @@ class Network(Enum): imx_zkevm_sepolia = "imx_zkevm_sepolia" b3 = "b3" b3_sepolia = "b3_sepolia" + ronin = "ronin" + ronin_saigon = "ronin_saigon" tx_raw_types = Union[ @@ -311,6 +317,9 @@ class Network(Enum): Network.game7_testnet: { "labels": Game7TestnetLabelV3, }, + Network.game7: { + "labels": Game7LabelV3, + }, Network.xai: { "labels": XaiLabelV3, }, @@ -356,6 +365,12 @@ class Network(Enum): Network.b3_sepolia: { "labels": B3SepoliaLabelV3, }, + Network.ronin: { + "labels": RoninLabelV3, + }, + Network.ronin_saigon: { + "labels": RoninSaigonLabelV3, + }, } @@ -395,6 +410,8 @@ def blockchain_type_to_network_type( return Network.game7_orbit_arbitrum_sepolia elif blockchain_type == AvailableBlockchainType.GAME7_TESTNET: return Network.game7_testnet + elif blockchain_type == AvailableBlockchainType.GAME7: + return Network.game7 elif blockchain_type == AvailableBlockchainType.XAI: return Network.xai elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA: @@ -425,5 +442,9 @@ def blockchain_type_to_network_type( return Network.b3 elif blockchain_type == AvailableBlockchainType.B3_SEPOLIA: return Network.b3_sepolia + elif blockchain_type == AvailableBlockchainType.RONIN: + return Network.ronin + elif blockchain_type == AvailableBlockchainType.RONIN_SAIGON: + return Network.ronin_saigon else: raise ValueError(f"Unknown blockchain type: {blockchain_type}") diff --git a/types/python/moonstreamtypes/subscriptions.py b/types/python/moonstreamtypes/subscriptions.py index 6266e8d65..2be74e1ea 100644 --- a/types/python/moonstreamtypes/subscriptions.py +++ b/types/python/moonstreamtypes/subscriptions.py @@ -22,6 +22,7 @@ class SubscriptionTypes(Enum): "game7_orbit_arbitrum_sepolia_smartcontract" ) GAME7_TESTNET_BLOCKCHAIN = "game7_testnet_smartcontract" + GAME7_BLOCKCHAIN = "game7_smartcontract" XAI_BLOCKCHAIN = "xai_smartcontract" XAI_SEPOLIA_BLOCKCHAIN = "xai_sepolia_smartcontract" AVALANCHE_BLOCKCHAIN = "avalanche_smartcontract" @@ -37,7 +38,8 @@ class SubscriptionTypes(Enum): IMX_ZKEVM_SEPOLIA_BLOCKCHAIN = "imx_zkevm_sepolia_smartcontract" B3_BLOCKCHAIN = "b3_smartcontract" B3_SEPOLIA_BLOCKCHAIN = "b3_sepolia_smartcontract" - + RONIN_BLOCKCHAIN = "ronin_smartcontract" + RONIN_SAIGON_BLOCKCHAIN = "ronin_saigon_smartcontract" def blockchain_type_to_subscription_type( blockchain_type: AvailableBlockchainType, @@ -74,6 +76,8 @@ def blockchain_type_to_subscription_type( return SubscriptionTypes.GAME7_ORBIT_ARBITRUM_SEPOLIA_BLOCKCHAIN elif blockchain_type == AvailableBlockchainType.GAME7_TESTNET: return SubscriptionTypes.GAME7_TESTNET_BLOCKCHAIN + elif blockchain_type == AvailableBlockchainType.GAME7: + return SubscriptionTypes.GAME7_BLOCKCHAIN elif blockchain_type == AvailableBlockchainType.XAI: return SubscriptionTypes.XAI_BLOCKCHAIN elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA: @@ -104,6 +108,10 @@ def blockchain_type_to_subscription_type( return SubscriptionTypes.B3_BLOCKCHAIN elif blockchain_type == AvailableBlockchainType.B3_SEPOLIA: return SubscriptionTypes.B3_SEPOLIA_BLOCKCHAIN + elif blockchain_type == AvailableBlockchainType.RONIN: + return SubscriptionTypes.RONIN_BLOCKCHAIN + elif blockchain_type == AvailableBlockchainType.RONIN_SAIGON: + return SubscriptionTypes.RONIN_SAIGON_BLOCKCHAIN else: raise ValueError(f"Unknown blockchain type: {blockchain_type}") @@ -125,6 +133,7 @@ def blockchain_type_to_subscription_type( "arbitrum_sepolia": "arbitrum_sepolia_smartcontract", "game7_orbit_arbitrum_sepolia": "game7_orbit_arbitrum_sepolia_smartcontract", "game7_testnet": "game7_testnet_smartcontract", + "game7": "game7_smartcontract", "xai": "xai_smartcontract", "xai_sepolia": "xai_sepolia_smartcontract", "avalanche": "avalanche_smartcontract", @@ -140,6 +149,8 @@ def blockchain_type_to_subscription_type( "imx_zkevm_sepolia": "imx_zkevm_sepolia_smartcontract", "b3": "b3_smartcontract", "b3_sepolia": "b3_sepolia_smartcontract", + "ronin": "ronin_smartcontract", + "ronin_saigon": "ronin_saigon_smartcontract", } blockchain_by_subscription_id = { @@ -159,6 +170,7 @@ def blockchain_type_to_subscription_type( "arbitrum_sepolia_blockchain": "arbitrum_sepolia", "game7_orbit_arbitrum_sepolia_blockchain": "game7_orbit_arbitrum_sepolia", "game7_testnet_blockchain": "game7_testnet", + "game7_blockchain": "game7", "xai_blockchain": "xai", "xai_sepolia_blockchain": "xai_sepolia", "avalanche_blockchain": "avalanche", @@ -202,4 +214,6 @@ def blockchain_type_to_subscription_type( "imx_zkevm_sepolia_smartcontract": "imx_zkevm_sepolia", "b3_smartcontract": "b3", "b3_sepolia_smartcontract": "b3_sepolia", + "ronin_smartcontract": "ronin", + "ronin_saigon_smartcontract": "ronin_saigon", } diff --git a/types/python/moonstreamtypes/version.txt b/types/python/moonstreamtypes/version.txt index 5a5831ab6..d169b2f2d 100644 --- a/types/python/moonstreamtypes/version.txt +++ b/types/python/moonstreamtypes/version.txt @@ -1 +1 @@ -0.0.7 +0.0.8 diff --git a/types/python/setup.py b/types/python/setup.py index 1edae0fbd..8bfb5db7c 100644 --- a/types/python/setup.py +++ b/types/python/setup.py @@ -34,7 +34,7 @@ zip_safe=False, install_requires=[ "moonstreamdb>=0.4.5", - "moonstreamdb-v3>=0.0.18", + "moonstreamdb-v3>=0.1.2", ], extras_require={ "dev": ["black", "isort", "mypy"],