pull/80/head
kompotkot 2022-05-24 09:20:56 +00:00
rodzic b1693ecded
commit 832461985c
3 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ from moonstreamdb.models import (
EthereumTransaction,
PolygonLabel,
PolygonTransaction,
XDaiTransaction,
)
from sqlalchemy.orm import Session
from sqlalchemy.sql.base import NO_ARG
@ -77,7 +78,7 @@ class MoonstreamEthereumStateProvider(EthereumStateProvider):
@staticmethod
def _transform_to_w3_tx(
tx_raw: Union[EthereumTransaction, PolygonTransaction],
tx_raw: Union[EthereumTransaction, PolygonTransaction, XDaiTransaction],
) -> Dict[str, Any]:
tx = {
"blockNumber": tx_raw.block_number,

Wyświetl plik

@ -9,12 +9,16 @@ from moonstreamdb.models import (
PolygonBlock,
PolygonLabel,
PolygonTransaction,
XDaiBlock,
XDaiLabel,
XDaiTransaction,
)
class Network(Enum):
ethereum = "ethereum"
polygon = "polygon"
xdai = "xdai"
MODELS: Dict[Network, Dict[str, Base]] = {
@ -28,4 +32,9 @@ MODELS: Dict[Network, Dict[str, Base]] = {
"labels": PolygonLabel,
"transactions": PolygonTransaction,
},
Network.xdai: {
"blocks": XDaiBlock,
"labels": XDaiLabel,
"transactions": XDaiTransaction,
},
}

Wyświetl plik

@ -1 +1 @@
MOONWORM_VERSION = "0.2.2"
MOONWORM_VERSION = "0.2.3"