Merge pull request #100 from bugout-dev/fix-mumbai-db-usage

Usage of Mumbai db models
pull/103/head v0.5.3
Sergei Sumarokov 2022-11-02 19:24:18 +03:00 zatwierdzone przez GitHub
commit 0c7f14d72d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 15 dodań i 3 usunięć

Wyświetl plik

@ -12,6 +12,8 @@ from .networks import (
MODELS,
EthereumLabel,
EthereumTransaction,
MumbaiLabel,
MumbaiTransaction,
PolygonLabel,
PolygonTransaction,
XDaiTransaction,
@ -79,7 +81,9 @@ class MoonstreamEthereumStateProvider(EthereumStateProvider):
@staticmethod
def _transform_to_w3_tx(
tx_raw: Union[EthereumTransaction, PolygonTransaction, XDaiTransaction],
tx_raw: Union[
EthereumTransaction, MumbaiTransaction, PolygonTransaction, XDaiTransaction
],
) -> Dict[str, Any]:
tx = {
"blockNumber": tx_raw.block_number,

Wyświetl plik

@ -7,6 +7,9 @@ try:
EthereumBlock,
EthereumLabel,
EthereumTransaction,
MumbaiBlock,
MumbaiLabel,
MumbaiTransaction,
PolygonBlock,
PolygonLabel,
PolygonTransaction,
@ -30,6 +33,11 @@ MODELS: Dict[Network, Dict[str, Base]] = {
"labels": EthereumLabel,
"transactions": EthereumTransaction,
},
Network.mumbai: {
"blocks": MumbaiBlock,
"labels": MumbaiLabel,
"transactions": MumbaiTransaction,
},
Network.polygon: {
"blocks": PolygonBlock,
"labels": PolygonLabel,

Wyświetl plik

@ -1 +1 @@
MOONWORM_VERSION = "0.5.2"
MOONWORM_VERSION = "0.5.3"

Wyświetl plik

@ -22,7 +22,7 @@ setup(
],
extras_require={
"dev": ["isort", "mypy", "wheel", "web3[tester] >=5.27.0"],
"moonstream": ["moonstreamdb >= 0.2.5"],
"moonstream": ["moonstreamdb >= 0.3.2"],
"distribute": ["setuptools", "twine", "wheel"],
},
description="moonworm: Generate a command line interface to any Ethereum smart contract",