Template
add
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
from importlib.metadata import (
|
||||
version as __version,
|
||||
)
|
||||
|
||||
from .abi import (
|
||||
Decodable,
|
||||
TypeStr,
|
||||
)
|
||||
from .bls import (
|
||||
BLSPrivateKey,
|
||||
BLSPubkey,
|
||||
BLSSignature,
|
||||
)
|
||||
from .discovery import (
|
||||
NodeID,
|
||||
)
|
||||
from .encoding import (
|
||||
HexStr,
|
||||
Primitives,
|
||||
)
|
||||
from .enums import (
|
||||
ForkName,
|
||||
)
|
||||
from .ethpm import (
|
||||
URI,
|
||||
ContractName,
|
||||
Manifest,
|
||||
)
|
||||
from .evm import (
|
||||
Address,
|
||||
AnyAddress,
|
||||
BlockIdentifier,
|
||||
BlockNumber,
|
||||
ChecksumAddress,
|
||||
Hash32,
|
||||
HexAddress,
|
||||
)
|
||||
from .networks import (
|
||||
ChainId,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"Decodable",
|
||||
"TypeStr",
|
||||
"BLSPrivateKey",
|
||||
"BLSPubkey",
|
||||
"BLSSignature",
|
||||
"NodeID",
|
||||
"HexStr",
|
||||
"Primitives",
|
||||
"ForkName",
|
||||
"ChainId",
|
||||
"URI",
|
||||
"ContractName",
|
||||
"Manifest",
|
||||
"Address",
|
||||
"AnyAddress",
|
||||
"BlockIdentifier",
|
||||
"BlockNumber",
|
||||
"ChecksumAddress",
|
||||
"Hash32",
|
||||
"HexAddress",
|
||||
)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
from typing import (
|
||||
Union,
|
||||
)
|
||||
|
||||
TypeStr = str
|
||||
Decodable = Union[bytes, bytearray]
|
||||
@@ -0,0 +1,7 @@
|
||||
from typing import (
|
||||
NewType,
|
||||
)
|
||||
|
||||
BLSPubkey = NewType("BLSPubkey", bytes) # bytes48
|
||||
BLSPrivateKey = NewType("BLSPrivateKey", int)
|
||||
BLSSignature = NewType("BLSSignature", bytes) # bytes96
|
||||
@@ -0,0 +1,5 @@
|
||||
from typing import (
|
||||
NewType,
|
||||
)
|
||||
|
||||
NodeID = NewType("NodeID", bytes)
|
||||
@@ -0,0 +1,7 @@
|
||||
from typing import (
|
||||
NewType,
|
||||
Union,
|
||||
)
|
||||
|
||||
HexStr = NewType("HexStr", str)
|
||||
Primitives = Union[bytes, int, bool]
|
||||
@@ -0,0 +1,17 @@
|
||||
class ForkName:
|
||||
Frontier = "Frontier"
|
||||
Homestead = "Homestead"
|
||||
EIP150 = "EIP150"
|
||||
EIP158 = "EIP158"
|
||||
Byzantium = "Byzantium"
|
||||
Constantinople = "Constantinople"
|
||||
Metropolis = "Metropolis"
|
||||
ConstantinopleFix = "ConstantinopleFix"
|
||||
Istanbul = "Istanbul"
|
||||
Berlin = "Berlin"
|
||||
London = "London"
|
||||
ArrowGlacier = "ArrowGlacier"
|
||||
GrayGlacier = "GrayGlacier"
|
||||
Paris = "Paris"
|
||||
Shanghai = "Shanghai"
|
||||
Cancun = "Cancun"
|
||||
@@ -0,0 +1,9 @@
|
||||
from typing import (
|
||||
Any,
|
||||
Dict,
|
||||
NewType,
|
||||
)
|
||||
|
||||
ContractName = NewType("ContractName", str)
|
||||
Manifest = NewType("Manifest", Dict[str, Any])
|
||||
URI = NewType("URI", str)
|
||||
@@ -0,0 +1,20 @@
|
||||
from typing import (
|
||||
Literal,
|
||||
NewType,
|
||||
TypeVar,
|
||||
Union,
|
||||
)
|
||||
|
||||
from .encoding import (
|
||||
HexStr,
|
||||
)
|
||||
|
||||
Hash32 = NewType("Hash32", bytes)
|
||||
BlockNumber = NewType("BlockNumber", int)
|
||||
BlockParams = Literal["latest", "earliest", "pending", "safe", "finalized"]
|
||||
BlockIdentifier = Union[BlockParams, BlockNumber, Hash32, HexStr, int]
|
||||
|
||||
Address = NewType("Address", bytes)
|
||||
HexAddress = NewType("HexAddress", HexStr)
|
||||
ChecksumAddress = NewType("ChecksumAddress", HexAddress)
|
||||
AnyAddress = TypeVar("AnyAddress", Address, HexAddress, ChecksumAddress)
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user