kopia lustrzana https://github.com/bugout-dev/moonworm
xdai support
rodzic
b1693ecded
commit
832461985c
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
MOONWORM_VERSION = "0.2.2"
|
||||
MOONWORM_VERSION = "0.2.3"
|
||||
|
|
Ładowanie…
Reference in New Issue