mm-eth 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mm_eth-0.2.0 → mm_eth-0.2.1}/PKG-INFO +3 -3
- mm_eth-0.2.1/pyproject.toml +75 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/abi.py +3 -3
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/account.py +1 -1
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/anvil.py +2 -2
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/erc20.py +8 -7
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/rpc.py +8 -8
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/solc.py +2 -3
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/tx.py +3 -5
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/utils.py +11 -16
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/vault.py +5 -5
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/conftest.py +5 -6
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/test_abi.py +2 -2
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/test_tx.py +3 -3
- {mm_eth-0.2.0 → mm_eth-0.2.1}/uv.lock +59 -59
- mm_eth-0.2.0/pyproject.toml +0 -66
- {mm_eth-0.2.0 → mm_eth-0.2.1}/.gitignore +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/README.txt +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/justfile +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/__init__.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/deploy.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/ens.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/ethernodes.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/py.typed +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/src/mm_eth/types.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/__init__.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/test_account.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/test_ethernodes.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/test_rpc.py +0 -0
- {mm_eth-0.2.0 → mm_eth-0.2.1}/tests/test_utils.py +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "mm-eth"
|
|
3
|
+
version = "0.2.1"
|
|
4
|
+
description = ""
|
|
5
|
+
requires-python = ">=3.12"
|
|
6
|
+
dependencies = [
|
|
7
|
+
"mm-std~=0.1.10",
|
|
8
|
+
"websocket-client~=1.8.0",
|
|
9
|
+
"web3~=7.7.0",
|
|
10
|
+
|
|
11
|
+
]
|
|
12
|
+
[build-system]
|
|
13
|
+
requires = ["hatchling"]
|
|
14
|
+
build-backend = "hatchling.build"
|
|
15
|
+
|
|
16
|
+
[tool.uv]
|
|
17
|
+
dev-dependencies = [
|
|
18
|
+
"pytest~=8.3.4",
|
|
19
|
+
"pytest-xdist~=3.6.1",
|
|
20
|
+
"ruff~=0.9.2",
|
|
21
|
+
"pip-audit~=2.7.3",
|
|
22
|
+
"bandit~=1.8.2",
|
|
23
|
+
"mypy~=1.14.1",
|
|
24
|
+
"types-PyYAML~=6.0.12.20241230",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[tool.mypy]
|
|
28
|
+
python_version = "3.13"
|
|
29
|
+
mypy_path = "stubs"
|
|
30
|
+
warn_no_return = false
|
|
31
|
+
implicit_reexport = true
|
|
32
|
+
strict = true
|
|
33
|
+
enable_error_code = ["truthy-bool", "possibly-undefined"]
|
|
34
|
+
exclude = ["^tests/", "^tmp/"]
|
|
35
|
+
[[tool.mypy.overrides]]
|
|
36
|
+
module = ["rlp", "rlp.sedes"]
|
|
37
|
+
ignore_missing_imports = true
|
|
38
|
+
|
|
39
|
+
[tool.ruff]
|
|
40
|
+
line-length = 130
|
|
41
|
+
target-version = "py313"
|
|
42
|
+
[tool.ruff.lint]
|
|
43
|
+
select = ["ALL"]
|
|
44
|
+
ignore = [
|
|
45
|
+
"A005", # flake8-builtins: stdlib-module-shadowing
|
|
46
|
+
"ERA001", # eradicate: commented-out-code
|
|
47
|
+
"PT", # flake8-pytest-style
|
|
48
|
+
"D", # pydocstyle
|
|
49
|
+
"FIX", # flake8-fixme
|
|
50
|
+
"PLR0911", # refactor: too-many-return-statements
|
|
51
|
+
"PLR0913", # pylint: too-many-arguments
|
|
52
|
+
"PLR2004", # pylint: magic-value-comparison
|
|
53
|
+
"PLC0414", # pylint: useless-import-alias
|
|
54
|
+
"FBT", # flake8-boolean-trap
|
|
55
|
+
"EM", # flake8-errmsg
|
|
56
|
+
"TRY003", # tryceratops: raise-vanilla-args
|
|
57
|
+
"C901", # mccabe: complex-structure,
|
|
58
|
+
"BLE001", # flake8-blind-except
|
|
59
|
+
"S311", # bandit: suspicious-non-cryptographic-random-usage
|
|
60
|
+
"TD002", # flake8-todos: missing-todo-author
|
|
61
|
+
"TD003", # flake8-todos: missing-todo-link
|
|
62
|
+
"COM812", # it's used in ruff formatter
|
|
63
|
+
]
|
|
64
|
+
[tool.ruff.lint.per-file-ignores]
|
|
65
|
+
"tests/*.py" = ["ANN", "S"]
|
|
66
|
+
[tool.ruff.format]
|
|
67
|
+
quote-style = "double"
|
|
68
|
+
indent-style = "space"
|
|
69
|
+
|
|
70
|
+
[tool.bandit]
|
|
71
|
+
exclude_dirs = ["tests"]
|
|
72
|
+
skips = ["B311"]
|
|
73
|
+
|
|
74
|
+
[tool.pytest.ini_options]
|
|
75
|
+
markers = ["infura"]
|
|
@@ -64,7 +64,7 @@ def decode_function_input(contract_abi: ABI, tx_input: str) -> FunctionInput:
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
def get_function_abi(contr_abi: ABI, fn_name: str) -> ABIFunction:
|
|
67
|
-
abi = pydash.find(contr_abi, lambda x: x.get("name", None) == fn_name and x.get("type", None) == "function") # type:ignore
|
|
67
|
+
abi = pydash.find(contr_abi, lambda x: x.get("name", None) == fn_name and x.get("type", None) == "function") # type: ignore[call-overload, attr-defined]
|
|
68
68
|
if not abi:
|
|
69
69
|
raise ValueError("can't find abi for function: " + fn_name)
|
|
70
70
|
return cast(ABIFunction, abi)
|
|
@@ -122,8 +122,8 @@ def parse_function_signatures(contract_abi: ABI) -> dict[str, str]:
|
|
|
122
122
|
result: dict[str, str] = {}
|
|
123
123
|
for item in contract_abi:
|
|
124
124
|
if item.get("type", None) == "function":
|
|
125
|
-
function_name = item["name"] # type: ignore
|
|
126
|
-
types = ",".join([i["type"] for i in item["inputs"]]) # type: ignore
|
|
125
|
+
function_name = item["name"] # type: ignore[typeddict-item]
|
|
126
|
+
types = ",".join([i["type"] for i in item["inputs"]]) # type: ignore[typeddict-item]
|
|
127
127
|
function_name_and_types = f"{function_name}({types})"
|
|
128
128
|
result[function_name_and_types] = encode_function_signature(function_name_and_types)
|
|
129
129
|
return result
|
|
@@ -67,6 +67,6 @@ def create_private_keys_dict(private_keys: list[str]) -> dict[str, str]: # addr
|
|
|
67
67
|
def is_private_key(private_key: str) -> bool:
|
|
68
68
|
try:
|
|
69
69
|
key_api.PrivateKey(decode_hex(private_key)).public_key.to_address()
|
|
70
|
-
return True
|
|
70
|
+
return True # noqa: TRY300
|
|
71
71
|
except Exception:
|
|
72
72
|
return False
|
|
@@ -10,7 +10,7 @@ from mm_eth import account, rpc
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Anvil:
|
|
13
|
-
def __init__(self, *, chain_id: int, port: int, mnemonic: str):
|
|
13
|
+
def __init__(self, *, chain_id: int, port: int, mnemonic: str) -> None:
|
|
14
14
|
self.chain_id = chain_id
|
|
15
15
|
self.port = port
|
|
16
16
|
self.mnemonic = mnemonic
|
|
@@ -18,7 +18,7 @@ class Anvil:
|
|
|
18
18
|
|
|
19
19
|
def start_process(self) -> None:
|
|
20
20
|
cmd = f"anvil -m '{self.mnemonic}' -p {self.port} --chain-id {self.chain_id}"
|
|
21
|
-
self.process = Popen(cmd, shell=True) # nosec
|
|
21
|
+
self.process = Popen(cmd, shell=True) # noqa: S602 # nosec
|
|
22
22
|
time.sleep(3)
|
|
23
23
|
|
|
24
24
|
def stop(self) -> None:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import string
|
|
4
|
-
from collections.abc import Sequence
|
|
5
4
|
from dataclasses import dataclass
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
7
|
import eth_abi
|
|
8
8
|
import eth_utils
|
|
@@ -11,11 +11,15 @@ from eth_utils import to_checksum_address, to_hex
|
|
|
11
11
|
from mm_std import Err, Ok, Result
|
|
12
12
|
|
|
13
13
|
from mm_eth import rpc
|
|
14
|
-
from mm_eth.rpc import Log
|
|
15
14
|
from mm_eth.tx import SignedTx, sign_legacy_tx, sign_tx
|
|
16
|
-
from mm_eth.types import Nodes, Proxies
|
|
17
15
|
from mm_eth.utils import hex_str_to_int, hex_to_bytes, log_topic_to_address
|
|
18
16
|
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from collections.abc import Sequence
|
|
19
|
+
|
|
20
|
+
from mm_eth.rpc import Log
|
|
21
|
+
from mm_eth.types import Nodes, Proxies
|
|
22
|
+
|
|
19
23
|
TRANSFER_METHOD = "0xa9059cbb"
|
|
20
24
|
TRANSFER_TOPIC = HexStr("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
|
|
21
25
|
|
|
@@ -108,10 +112,7 @@ def get_decimals(rpc_urls: Nodes, address: str, timeout: int = 10, proxies: Prox
|
|
|
108
112
|
if res.ok == "0x":
|
|
109
113
|
return Err("no_decimals", data=res.data)
|
|
110
114
|
|
|
111
|
-
if len(res.ok) > 66
|
|
112
|
-
result = eth_utils.to_int(hexstr=res.ok[0:66])
|
|
113
|
-
else:
|
|
114
|
-
result = eth_utils.to_int(hexstr=res.ok)
|
|
115
|
+
result = eth_utils.to_int(hexstr=res.ok[0:66]) if len(res.ok) > 66 else eth_utils.to_int(hexstr=res.ok)
|
|
115
116
|
return Ok(result, data=res.data)
|
|
116
117
|
|
|
117
118
|
except Exception as e:
|
|
@@ -2,16 +2,19 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
from dataclasses import dataclass
|
|
5
|
-
from typing import Any, Literal, cast
|
|
5
|
+
from typing import TYPE_CHECKING, Any, Literal, cast
|
|
6
6
|
|
|
7
7
|
import websocket
|
|
8
8
|
from mm_std import Err, Ok, Result, hr, random_choice
|
|
9
9
|
from pydantic import BaseModel
|
|
10
|
-
from web3.types import BlockIdentifier
|
|
11
10
|
|
|
12
|
-
from mm_eth.types import Nodes, Proxies
|
|
13
11
|
from mm_eth.utils import hex_str_to_int, random_node, random_proxy
|
|
14
12
|
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from web3.types import BlockIdentifier
|
|
15
|
+
|
|
16
|
+
from mm_eth.types import Nodes, Proxies
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
@dataclass
|
|
17
20
|
class TxReceipt:
|
|
@@ -85,10 +88,7 @@ def rpc_call(
|
|
|
85
88
|
res: Result[Any] = Err("not started yet")
|
|
86
89
|
for _ in range(attempts):
|
|
87
90
|
node = random_node(nodes)
|
|
88
|
-
if node.startswith("http")
|
|
89
|
-
res = _http_call(node, data, timeout, random_proxy(proxies))
|
|
90
|
-
else:
|
|
91
|
-
res = _ws_call(node, data, timeout)
|
|
91
|
+
res = _http_call(node, data, timeout, random_proxy(proxies)) if node.startswith("http") else _ws_call(node, data, timeout)
|
|
92
92
|
if isinstance(res, Ok):
|
|
93
93
|
return res
|
|
94
94
|
return res
|
|
@@ -444,7 +444,7 @@ def eth_syncing(rpc_urls: Nodes, timeout: int = 10, proxies: Proxies = None, att
|
|
|
444
444
|
result[k] = int(v, 16)
|
|
445
445
|
else:
|
|
446
446
|
result[k] = v
|
|
447
|
-
if result.get("currentBlock"
|
|
447
|
+
if result.get("currentBlock") and result.get("highestBlock"):
|
|
448
448
|
result["remaining"] = result["highestBlock"] - result["currentBlock"]
|
|
449
449
|
return Ok(result, res.data)
|
|
450
450
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import os.path
|
|
2
1
|
import random
|
|
3
2
|
import shutil
|
|
4
3
|
from dataclasses import dataclass
|
|
@@ -15,9 +14,9 @@ class SolcResult:
|
|
|
15
14
|
|
|
16
15
|
def solc(contract_name: str, contract_path: str, tmp_dir: str) -> Result[SolcResult]:
|
|
17
16
|
if tmp_dir.startswith("~"):
|
|
18
|
-
tmp_dir =
|
|
17
|
+
tmp_dir = Path(tmp_dir).expanduser().as_posix()
|
|
19
18
|
if contract_path.startswith("~"):
|
|
20
|
-
contract_path =
|
|
19
|
+
contract_path = Path(contract_path).expanduser().as_posix()
|
|
21
20
|
work_dir = f"{tmp_dir}/solc_{contract_name}_{random.randint(0, 100_000_000)}"
|
|
22
21
|
abi_path = f"{work_dir}/{contract_name}.abi"
|
|
23
22
|
bin_path = f"{work_dir}/{contract_name}.bin"
|
|
@@ -44,14 +44,12 @@ class RPLTransaction(rlp.Serializable): # type: ignore[misc]
|
|
|
44
44
|
to: str | None = None,
|
|
45
45
|
) -> RPLTransaction:
|
|
46
46
|
if to:
|
|
47
|
-
to = hex_to_bytes(to) # type:ignore
|
|
47
|
+
to = hex_to_bytes(to) # type: ignore[assignment]
|
|
48
48
|
if data:
|
|
49
|
-
data = hex_to_bytes(data) # type:ignore
|
|
49
|
+
data = hex_to_bytes(data) # type: ignore[assignment]
|
|
50
50
|
if not value:
|
|
51
51
|
value = 0
|
|
52
|
-
|
|
53
|
-
s = int(s, 16) # type:ignore
|
|
54
|
-
return RPLTransaction(nonce, gas_price, gas, to, value, data, v, r, s)
|
|
52
|
+
return RPLTransaction(nonce, gas_price, gas, to, value, data, v, int(r, 16), int(s, 16))
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
class DecodedRawTx(BaseModel):
|
|
@@ -16,23 +16,22 @@ from mm_eth.types import Nodes, Proxies
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
def parse_addresses(data: str) -> list[str]:
|
|
19
|
-
data = data.lower()
|
|
20
19
|
result = []
|
|
21
|
-
for word in data.split():
|
|
20
|
+
for word in data.lower().split():
|
|
22
21
|
if len(word) == 42 and re.match("0x[a-f0-9]{40}", word):
|
|
23
|
-
result.append(word)
|
|
22
|
+
result.append(word) # noqa: PERF401
|
|
24
23
|
return pydash.uniq(result)
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
def to_token_wei(value: str | int, decimals: int) -> int:
|
|
28
27
|
if isinstance(value, int):
|
|
29
28
|
return value
|
|
30
|
-
|
|
29
|
+
if isinstance(value, str):
|
|
31
30
|
value = value.lower().replace(" ", "").strip()
|
|
32
31
|
if value.endswith("t"):
|
|
33
32
|
value = value.replace("t", "")
|
|
34
33
|
return int(Decimal(value) * 10**decimals)
|
|
35
|
-
|
|
34
|
+
if value.isdigit():
|
|
36
35
|
return int(value)
|
|
37
36
|
|
|
38
37
|
raise ValueError("wrong value" + value)
|
|
@@ -41,11 +40,11 @@ def to_token_wei(value: str | int, decimals: int) -> int:
|
|
|
41
40
|
def to_wei(value: str | int | Decimal, decimals: int | None = None) -> Wei:
|
|
42
41
|
if isinstance(value, int):
|
|
43
42
|
return Wei(value)
|
|
44
|
-
|
|
43
|
+
if isinstance(value, Decimal):
|
|
45
44
|
if value != value.to_integral_value():
|
|
46
45
|
raise ValueError(f"value must be integral number: {value}")
|
|
47
46
|
return Wei(int(value))
|
|
48
|
-
|
|
47
|
+
if isinstance(value, str):
|
|
49
48
|
value = value.lower().replace(" ", "").strip()
|
|
50
49
|
if value.endswith("navax"): # https://snowtrace.io/unitconverter
|
|
51
50
|
value = value.replace("navax", "")
|
|
@@ -68,8 +67,7 @@ def to_wei(value: str | int | Decimal, decimals: int | None = None) -> Wei:
|
|
|
68
67
|
return Wei(int(value))
|
|
69
68
|
raise ValueError("wrong value " + value)
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
raise ValueError(f"value has a wrong type: {type(value)}")
|
|
70
|
+
raise ValueError(f"value has a wrong type: {type(value)}")
|
|
73
71
|
|
|
74
72
|
|
|
75
73
|
def from_wei(
|
|
@@ -125,11 +123,11 @@ def from_token_wei_str(value: int, decimals: int, symbol: str = "", round_ndigit
|
|
|
125
123
|
def to_wei_token(value: str | int | Decimal, symbol: str, decimals: int) -> int:
|
|
126
124
|
if isinstance(value, int):
|
|
127
125
|
return value
|
|
128
|
-
|
|
126
|
+
if isinstance(value, Decimal):
|
|
129
127
|
if value != value.to_integral_value():
|
|
130
128
|
raise ValueError(f"value must be integral number: {value}")
|
|
131
129
|
return int(value)
|
|
132
|
-
|
|
130
|
+
if isinstance(value, str):
|
|
133
131
|
value = value.lower().replace(" ", "").strip()
|
|
134
132
|
if value.isdigit():
|
|
135
133
|
return int(value)
|
|
@@ -138,7 +136,7 @@ def to_wei_token(value: str | int | Decimal, symbol: str, decimals: int) -> int:
|
|
|
138
136
|
except Exception as e:
|
|
139
137
|
raise ValueError from e
|
|
140
138
|
else:
|
|
141
|
-
raise
|
|
139
|
+
raise TypeError(f"value has a wrong type: {type(value)}")
|
|
142
140
|
|
|
143
141
|
|
|
144
142
|
def to_checksum_address(address: str) -> str:
|
|
@@ -185,10 +183,7 @@ def truncate_hex_str(hex_str: str, digits: int = 4, replace_str: str = "...") ->
|
|
|
185
183
|
|
|
186
184
|
|
|
187
185
|
def log_topic_to_address(topic: HexBytes | str) -> str:
|
|
188
|
-
if isinstance(topic, HexBytes):
|
|
189
|
-
result = topic.hex()[-40:]
|
|
190
|
-
else:
|
|
191
|
-
result = topic[-40:]
|
|
186
|
+
result = topic.hex()[-40:] if isinstance(topic, HexBytes) else topic[-40:]
|
|
192
187
|
if not result.startswith("0x"):
|
|
193
188
|
result = f"0x{result}"
|
|
194
189
|
return result
|
|
@@ -15,7 +15,8 @@ def read_keys_from_vault(keys_url: str, token: str) -> Result[dict[str, str]]:
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
def set_keys_from_vault(keys_url: str, token: str, private_keys: list[str], verify_tls: bool = True) -> Result[bool]:
|
|
18
|
-
"""It works with KV version=1 only!!!"""
|
|
18
|
+
"""It works with KV version=1 only!!!"""
|
|
19
|
+
# TODO: check that keys_url is kv1 version and error if it's kv2
|
|
19
20
|
data = None
|
|
20
21
|
try:
|
|
21
22
|
# keys_url example, https://vault.site.com:8200/v1/kv/keys1
|
|
@@ -23,16 +24,15 @@ def set_keys_from_vault(keys_url: str, token: str, private_keys: list[str], veri
|
|
|
23
24
|
for private_key in private_keys:
|
|
24
25
|
address = private_to_address(private_key)
|
|
25
26
|
if address is None:
|
|
26
|
-
|
|
27
|
+
return Err("wrong private key", data=data)
|
|
27
28
|
keys[address] = private_key
|
|
28
29
|
|
|
29
30
|
res = hr(keys_url, method="post", headers={"X-Vault-Token": token}, params=keys, verify=verify_tls)
|
|
30
31
|
data = res.json
|
|
31
32
|
if res.code == 204:
|
|
32
33
|
return Ok(res.code == 204, data=data)
|
|
33
|
-
|
|
34
|
+
if res.code == 403:
|
|
34
35
|
return Err("permission denied", data=data)
|
|
35
|
-
|
|
36
|
-
return Err(res.error or "error", data=data)
|
|
36
|
+
return Err(res.error or "error", data=data)
|
|
37
37
|
except Exception as e:
|
|
38
38
|
return Err(f"exception: {e}", data=data)
|
|
@@ -9,12 +9,12 @@ from mm_eth.anvil import Anvil
|
|
|
9
9
|
|
|
10
10
|
@pytest.fixture()
|
|
11
11
|
def mnemonic() -> str:
|
|
12
|
-
return "diet render mix evil relax apology hazard bamboo desert sign fence usage baby athlete cannon season busy ten jaguar silk rebel identify foster shrimp" # noqa
|
|
12
|
+
return "diet render mix evil relax apology hazard bamboo desert sign fence usage baby athlete cannon season busy ten jaguar silk rebel identify foster shrimp" # noqa: E501
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
@pytest.fixture()
|
|
16
16
|
def erc20_token_abi_str() -> str:
|
|
17
|
-
return r'[{"inputs":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]' # noqa
|
|
17
|
+
return r'[{"inputs":[{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"totalSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]' # noqa: E501
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
@pytest.fixture()
|
|
@@ -24,14 +24,14 @@ def erc20_abi(erc20_token_abi_str) -> ABI:
|
|
|
24
24
|
|
|
25
25
|
@pytest.fixture()
|
|
26
26
|
def erc20_token_bin() -> str:
|
|
27
|
-
return "608060405234801562000010575f80fd5b5060405162000d1338038062000d138339810160408190526200003391620001dc565b60036200004183826200033b565b5060046200005083826200033b565b506005805460ff191660121790556200006a338262000072565b505062000423565b6001600160a01b038216620000ce5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064015b60405180910390fd5b600254620000dd90826200015d565b6002556001600160a01b0382165f908152602081905260409020546200010490826200015d565b6001600160a01b0383165f81815260208181526040808320949094559251848152919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b5f806200016b838562000403565b905083811015620001bf5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401620000c5565b90505b92915050565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215620001ee575f80fd5b82516001600160401b038082111562000205575f80fd5b818501915085601f83011262000219575f80fd5b8151818111156200022e576200022e620001c8565b604051601f8201601f19908116603f01168101908382118183101715620002595762000259620001c8565b8160405282815260209350888484870101111562000275575f80fd5b5f91505b8282101562000298578482018401518183018501529083019062000279565b5f928101840192909252509401519395939450505050565b600181811c90821680620002c557607f821691505b602082108103620002e457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000158575f81815260208120601f850160051c81016020861015620003125750805b601f850160051c820191505b8181101562000333578281556001016200031e565b505050505050565b81516001600160401b03811115620003575762000357620001c8565b6200036f81620003688454620002b0565b84620002ea565b602080601f831160018114620003a5575f84156200038d5750858301515b5f19600386901b1c1916600185901b17855562000333565b5f85815260208120601f198616915b82811015620003d557888601518255948401946001909101908401620003b4565b5085821015620003f357878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620001c257634e487b7160e01b5f52601160045260245ffd5b6108e280620004315f395ff3fe608060405234801561000f575f80fd5b50600436106100a6575f3560e01c8063395093511161006e578063395093511461012557806370a082311461013857806395d89b4114610160578063a457c2d714610168578063a9059cbb1461017b578063dd62ed3e1461018e575f80fd5b806306fdde03146100aa578063095ea7b3146100c857806318160ddd146100eb57806323b872dd146100fd578063313ce56714610110575b5f80fd5b6100b26101c6565b6040516100bf91906106b6565b60405180910390f35b6100db6100d636600461071c565b610256565b60405190151581526020016100bf565b6002545b6040519081526020016100bf565b6100db61010b366004610744565b61026c565b60055460405160ff90911681526020016100bf565b6100db61013336600461071c565b6102d3565b6100ef61014636600461077d565b6001600160a01b03165f9081526020819052604090205490565b6100b2610308565b6100db61017636600461071c565b610317565b6100db61018936600461071c565b610364565b6100ef61019c366004610796565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101d5906107c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610201906107c7565b801561024c5780601f106102235761010080835404028352916020019161024c565b820191905f5260205f20905b81548152906001019060200180831161022f57829003601f168201915b5050505050905090565b5f610262338484610370565b5060015b92915050565b5f610278848484610499565b6102c984336102c485604051806060016040528060288152602001610860602891396001600160a01b038a165f9081526001602090815260408083203384529091529020549190610619565b610370565b5060019392505050565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916102629185906102c49086610651565b6060600480546101d5906107c7565b5f61026233846102c48560405180606001604052806025815260200161088860259139335f9081526001602090815260408083206001600160a01b038d1684529091529020549190610619565b5f610262338484610499565b6001600160a01b0383166103d75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b6001600160a01b0382166104385760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ce565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166104fd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ce565b6001600160a01b03821661055f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ce565b61059b8160405180606001604052806026815260200161083a602691396001600160a01b0386165f908152602081905260409020549190610619565b6001600160a01b038085165f9081526020819052604080822093909355908416815220546105c99082610651565b6001600160a01b038381165f818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161048c565b5f818484111561063c5760405162461bcd60e51b81526004016103ce91906106b6565b505f6106488486610813565b95945050505050565b5f8061065d8385610826565b9050838110156106af5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103ce565b9392505050565b5f6020808352835180828501525f5b818110156106e1578581018301518582016040015282016106c5565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610717575f80fd5b919050565b5f806040838503121561072d575f80fd5b61073683610701565b946020939093013593505050565b5f805f60608486031215610756575f80fd5b61075f84610701565b925061076d60208501610701565b9150604084013590509250925092565b5f6020828403121561078d575f80fd5b6106af82610701565b5f80604083850312156107a7575f80fd5b6107b083610701565b91506107be60208401610701565b90509250929050565b600181811c908216806107db57607f821691505b6020821081036107f957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610266576102666107ff565b80820180821115610266576102666107ff56fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fdf5850518272abc852e84db2b1c5e730e5de114aa27c25a2f3447b021fb005064736f6c63430008140033" # noqa
|
|
27
|
+
return "608060405234801562000010575f80fd5b5060405162000d1338038062000d138339810160408190526200003391620001dc565b60036200004183826200033b565b5060046200005083826200033b565b506005805460ff191660121790556200006a338262000072565b505062000423565b6001600160a01b038216620000ce5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064015b60405180910390fd5b600254620000dd90826200015d565b6002556001600160a01b0382165f908152602081905260409020546200010490826200015d565b6001600160a01b0383165f81815260208181526040808320949094559251848152919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b5f806200016b838562000403565b905083811015620001bf5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401620000c5565b90505b92915050565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215620001ee575f80fd5b82516001600160401b038082111562000205575f80fd5b818501915085601f83011262000219575f80fd5b8151818111156200022e576200022e620001c8565b604051601f8201601f19908116603f01168101908382118183101715620002595762000259620001c8565b8160405282815260209350888484870101111562000275575f80fd5b5f91505b8282101562000298578482018401518183018501529083019062000279565b5f928101840192909252509401519395939450505050565b600181811c90821680620002c557607f821691505b602082108103620002e457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000158575f81815260208120601f850160051c81016020861015620003125750805b601f850160051c820191505b8181101562000333578281556001016200031e565b505050505050565b81516001600160401b03811115620003575762000357620001c8565b6200036f81620003688454620002b0565b84620002ea565b602080601f831160018114620003a5575f84156200038d5750858301515b5f19600386901b1c1916600185901b17855562000333565b5f85815260208120601f198616915b82811015620003d557888601518255948401946001909101908401620003b4565b5085821015620003f357878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620001c257634e487b7160e01b5f52601160045260245ffd5b6108e280620004315f395ff3fe608060405234801561000f575f80fd5b50600436106100a6575f3560e01c8063395093511161006e578063395093511461012557806370a082311461013857806395d89b4114610160578063a457c2d714610168578063a9059cbb1461017b578063dd62ed3e1461018e575f80fd5b806306fdde03146100aa578063095ea7b3146100c857806318160ddd146100eb57806323b872dd146100fd578063313ce56714610110575b5f80fd5b6100b26101c6565b6040516100bf91906106b6565b60405180910390f35b6100db6100d636600461071c565b610256565b60405190151581526020016100bf565b6002545b6040519081526020016100bf565b6100db61010b366004610744565b61026c565b60055460405160ff90911681526020016100bf565b6100db61013336600461071c565b6102d3565b6100ef61014636600461077d565b6001600160a01b03165f9081526020819052604090205490565b6100b2610308565b6100db61017636600461071c565b610317565b6100db61018936600461071c565b610364565b6100ef61019c366004610796565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101d5906107c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610201906107c7565b801561024c5780601f106102235761010080835404028352916020019161024c565b820191905f5260205f20905b81548152906001019060200180831161022f57829003601f168201915b5050505050905090565b5f610262338484610370565b5060015b92915050565b5f610278848484610499565b6102c984336102c485604051806060016040528060288152602001610860602891396001600160a01b038a165f9081526001602090815260408083203384529091529020549190610619565b610370565b5060019392505050565b335f8181526001602090815260408083206001600160a01b038716845290915281205490916102629185906102c49086610651565b6060600480546101d5906107c7565b5f61026233846102c48560405180606001604052806025815260200161088860259139335f9081526001602090815260408083206001600160a01b038d1684529091529020549190610619565b5f610262338484610499565b6001600160a01b0383166103d75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b6001600160a01b0382166104385760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ce565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166104fd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ce565b6001600160a01b03821661055f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ce565b61059b8160405180606001604052806026815260200161083a602691396001600160a01b0386165f908152602081905260409020549190610619565b6001600160a01b038085165f9081526020819052604080822093909355908416815220546105c99082610651565b6001600160a01b038381165f818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161048c565b5f818484111561063c5760405162461bcd60e51b81526004016103ce91906106b6565b505f6106488486610813565b95945050505050565b5f8061065d8385610826565b9050838110156106af5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103ce565b9392505050565b5f6020808352835180828501525f5b818110156106e1578581018301518582016040015282016106c5565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610717575f80fd5b919050565b5f806040838503121561072d575f80fd5b61073683610701565b946020939093013593505050565b5f805f60608486031215610756575f80fd5b61075f84610701565b925061076d60208501610701565b9150604084013590509250925092565b5f6020828403121561078d575f80fd5b6106af82610701565b5f80604083850312156107a7575f80fd5b6107b083610701565b91506107be60208401610701565b90509250929050565b600181811c908216806107db57607f821691505b6020821081036107f957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b81810381811115610266576102666107ff565b80820180821115610266576102666107ff56fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fdf5850518272abc852e84db2b1c5e730e5de114aa27c25a2f3447b021fb005064736f6c63430008140033" # noqa: E501
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
@pytest.fixture()
|
|
31
31
|
def anvil(mnemonic):
|
|
32
32
|
res = Anvil.launch(mnemonic=mnemonic)
|
|
33
33
|
if isinstance(res, Err):
|
|
34
|
-
raise
|
|
34
|
+
raise RuntimeError(f"can't start anvil: {res.err}") # noqa: TRY004
|
|
35
35
|
a = res.ok
|
|
36
36
|
try:
|
|
37
37
|
yield a
|
|
@@ -59,8 +59,7 @@ def infura():
|
|
|
59
59
|
def _infura(network="mainnet", ws=False):
|
|
60
60
|
if ws:
|
|
61
61
|
return f"wss://{network}.infura.io/ws/v3/{infura}"
|
|
62
|
-
|
|
63
|
-
return f"https://{network}.infura.io/v3/{infura}"
|
|
62
|
+
return f"https://{network}.infura.io/v3/{infura}"
|
|
64
63
|
|
|
65
64
|
return _infura
|
|
66
65
|
|
|
@@ -13,7 +13,7 @@ def test_get_function_abi(erc20_abi):
|
|
|
13
13
|
|
|
14
14
|
def test_encode_function_input_by_abi(erc20_abi):
|
|
15
15
|
res = abi.encode_function_input_by_abi(erc20_abi, "transfer", ["0x2D88bd70Eb6c20302D4cdD69abeBEea02deEBEAE", 123456])
|
|
16
|
-
input_data = "0xa9059cbb0000000000000000000000002d88bd70eb6c20302d4cdd69abebeea02deebeae000000000000000000000000000000000000000000000000000000000001e240" # noqa
|
|
16
|
+
input_data = "0xa9059cbb0000000000000000000000002d88bd70eb6c20302d4cdd69abebeea02deebeae000000000000000000000000000000000000000000000000000000000001e240" # noqa: E501
|
|
17
17
|
assert res == input_data
|
|
18
18
|
|
|
19
19
|
|
|
@@ -22,5 +22,5 @@ def test_encode_function_input_by_signature():
|
|
|
22
22
|
"transfer(address,uint256)",
|
|
23
23
|
["0x2D88bd70Eb6c20302D4cdD69abeBEea02deEBEAE", 123456],
|
|
24
24
|
)
|
|
25
|
-
input_data = "0xa9059cbb0000000000000000000000002d88bd70eb6c20302d4cdd69abebeea02deebeae000000000000000000000000000000000000000000000000000000000001e240" # noqa
|
|
25
|
+
input_data = "0xa9059cbb0000000000000000000000002d88bd70eb6c20302d4cdd69abebeea02deebeae000000000000000000000000000000000000000000000000000000000001e240" # noqa: E501
|
|
26
26
|
assert res == input_data
|
|
@@ -2,7 +2,7 @@ from mm_eth import tx
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
def test_sign_legacy_tx(private_0, address_1):
|
|
5
|
-
raw_tx = "0xf8601f0b169458487485c3858109f5a37e42546fe87473f79a4b218312399926a00739cb05ce6b1370b4dd53745e51202c2416427d47f60dd19cedbbec1ae8d5d0a064eea36637d9bd09b6e2efa8d20a906fd0146a6798a1b4db29457b6e9539862b" # noqa
|
|
5
|
+
raw_tx = "0xf8601f0b169458487485c3858109f5a37e42546fe87473f79a4b218312399926a00739cb05ce6b1370b4dd53745e51202c2416427d47f60dd19cedbbec1ae8d5d0a064eea36637d9bd09b6e2efa8d20a906fd0146a6798a1b4db29457b6e9539862b" # noqa: E501
|
|
6
6
|
res = tx.sign_legacy_tx(
|
|
7
7
|
nonce=31,
|
|
8
8
|
gas_price=11,
|
|
@@ -18,14 +18,14 @@ def test_sign_legacy_tx(private_0, address_1):
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def test_decode_raw_tx(address_1):
|
|
21
|
-
raw_tx = "0xf8601f0b169458487485c3858109f5a37e42546fe87473f79a4b218312399926a00739cb05ce6b1370b4dd53745e51202c2416427d47f60dd19cedbbec1ae8d5d0a064eea36637d9bd09b6e2efa8d20a906fd0146a6798a1b4db29457b6e9539862b" # noqa
|
|
21
|
+
raw_tx = "0xf8601f0b169458487485c3858109f5a37e42546fe87473f79a4b218312399926a00739cb05ce6b1370b4dd53745e51202c2416427d47f60dd19cedbbec1ae8d5d0a064eea36637d9bd09b6e2efa8d20a906fd0146a6798a1b4db29457b6e9539862b" # noqa: E501
|
|
22
22
|
res = tx.decode_raw_tx(raw_tx)
|
|
23
23
|
assert res.tx_hash == "0x0400cadbd22ce24ef98ffa0ffe337997758edbde5e4faebe6cda63d8246f545c"
|
|
24
24
|
assert res.to == address_1
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def test_encode_raw_tx_with_signature():
|
|
28
|
-
raw_tx = "0xf8601f0b16949e8daea6fed7e024d9d4c802115a81e908905a8e218312399925a0bd1601a62708068a486c1b0fc793f368fbe629823cb9fd861c9c3c2a37aa7ca6a07dfc3abd01cbfa177fb77595b883ee1062d5146bc006b2c8afa6199defac1dc1" # noqa
|
|
28
|
+
raw_tx = "0xf8601f0b16949e8daea6fed7e024d9d4c802115a81e908905a8e218312399925a0bd1601a62708068a486c1b0fc793f368fbe629823cb9fd861c9c3c2a37aa7ca6a07dfc3abd01cbfa177fb77595b883ee1062d5146bc006b2c8afa6199defac1dc1" # noqa: E501
|
|
29
29
|
decoded_tx = tx.decode_raw_tx(raw_tx)
|
|
30
30
|
res = tx.encode_raw_tx_with_signature(
|
|
31
31
|
nonce=decoded_tx.nonce,
|
|
@@ -106,7 +106,7 @@ wheels = [
|
|
|
106
106
|
|
|
107
107
|
[[package]]
|
|
108
108
|
name = "bandit"
|
|
109
|
-
version = "1.8.
|
|
109
|
+
version = "1.8.2"
|
|
110
110
|
source = { registry = "https://pypi.org/simple" }
|
|
111
111
|
dependencies = [
|
|
112
112
|
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
|
@@ -114,9 +114,9 @@ dependencies = [
|
|
|
114
114
|
{ name = "rich" },
|
|
115
115
|
{ name = "stevedore" },
|
|
116
116
|
]
|
|
117
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
117
|
+
sdist = { url = "https://files.pythonhosted.org/packages/9b/e2/c229cdb4eefc124e5b77ac2557eb0a3cb5b9fc89bc465dd2b8dc1033dbb8/bandit-1.8.2.tar.gz", hash = "sha256:e00ad5a6bc676c0954669fe13818024d66b70e42cf5adb971480cf3b671e835f", size = 4228832 }
|
|
118
118
|
wheels = [
|
|
119
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
119
|
+
{ url = "https://files.pythonhosted.org/packages/1c/c1/991a7a1404626558cc7db0cc34243e13e5e336eba053bf6979e9fd6006f7/bandit-1.8.2-py3-none-any.whl", hash = "sha256:df6146ad73dd30e8cbda4e29689ddda48364e36ff655dbfc86998401fcf1721f", size = 127049 },
|
|
120
120
|
]
|
|
121
121
|
|
|
122
122
|
[[package]]
|
|
@@ -726,25 +726,25 @@ dev = [
|
|
|
726
726
|
|
|
727
727
|
[package.metadata]
|
|
728
728
|
requires-dist = [
|
|
729
|
-
{ name = "mm-std", specifier = "~=0.1.
|
|
730
|
-
{ name = "web3", specifier = "~=7.
|
|
729
|
+
{ name = "mm-std", specifier = "~=0.1.10" },
|
|
730
|
+
{ name = "web3", specifier = "~=7.7.0" },
|
|
731
731
|
{ name = "websocket-client", specifier = "~=1.8.0" },
|
|
732
732
|
]
|
|
733
733
|
|
|
734
734
|
[package.metadata.requires-dev]
|
|
735
735
|
dev = [
|
|
736
|
-
{ name = "bandit", specifier = "~=1.8.
|
|
737
|
-
{ name = "mypy", specifier = "~=1.14.
|
|
736
|
+
{ name = "bandit", specifier = "~=1.8.2" },
|
|
737
|
+
{ name = "mypy", specifier = "~=1.14.1" },
|
|
738
738
|
{ name = "pip-audit", specifier = "~=2.7.3" },
|
|
739
739
|
{ name = "pytest", specifier = "~=8.3.4" },
|
|
740
740
|
{ name = "pytest-xdist", specifier = "~=3.6.1" },
|
|
741
|
-
{ name = "ruff", specifier = "~=0.
|
|
742
|
-
{ name = "types-pyyaml", specifier = "~=6.0.12.
|
|
741
|
+
{ name = "ruff", specifier = "~=0.9.2" },
|
|
742
|
+
{ name = "types-pyyaml", specifier = "~=6.0.12.20241230" },
|
|
743
743
|
]
|
|
744
744
|
|
|
745
745
|
[[package]]
|
|
746
746
|
name = "mm-std"
|
|
747
|
-
version = "0.1.
|
|
747
|
+
version = "0.1.10"
|
|
748
748
|
source = { registry = "https://pypi.org/simple" }
|
|
749
749
|
dependencies = [
|
|
750
750
|
{ name = "cryptography" },
|
|
@@ -756,7 +756,7 @@ dependencies = [
|
|
|
756
756
|
{ name = "rich" },
|
|
757
757
|
]
|
|
758
758
|
wheels = [
|
|
759
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
759
|
+
{ url = "https://files.pythonhosted.org/packages/30/ad/0fcb4791f823b4190dd8cc0f0b1fe81b3c492067b7e8c124ea162ece732c/mm_std-0.1.10-py3-none-any.whl", hash = "sha256:5be05a5430405ea61ae44c444cdbfb17a242fccdcab720e789b3084eef9ff65c", size = 14448 },
|
|
760
760
|
]
|
|
761
761
|
|
|
762
762
|
[[package]]
|
|
@@ -830,25 +830,27 @@ wheels = [
|
|
|
830
830
|
|
|
831
831
|
[[package]]
|
|
832
832
|
name = "mypy"
|
|
833
|
-
version = "1.14.
|
|
833
|
+
version = "1.14.1"
|
|
834
834
|
source = { registry = "https://pypi.org/simple" }
|
|
835
835
|
dependencies = [
|
|
836
836
|
{ name = "mypy-extensions" },
|
|
837
837
|
{ name = "typing-extensions" },
|
|
838
838
|
]
|
|
839
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
839
|
+
sdist = { url = "https://files.pythonhosted.org/packages/b9/eb/2c92d8ea1e684440f54fa49ac5d9a5f19967b7b472a281f419e69a8d228e/mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6", size = 3216051 }
|
|
840
840
|
wheels = [
|
|
841
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
842
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
843
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
844
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
845
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
846
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
847
|
-
{ url = "https://files.pythonhosted.org/packages/15/
|
|
848
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
849
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
850
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
851
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
841
|
+
{ url = "https://files.pythonhosted.org/packages/43/1b/b38c079609bb4627905b74fc6a49849835acf68547ac33d8ceb707de5f52/mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14", size = 11266668 },
|
|
842
|
+
{ url = "https://files.pythonhosted.org/packages/6b/75/2ed0d2964c1ffc9971c729f7a544e9cd34b2cdabbe2d11afd148d7838aa2/mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9", size = 10254060 },
|
|
843
|
+
{ url = "https://files.pythonhosted.org/packages/a1/5f/7b8051552d4da3c51bbe8fcafffd76a6823779101a2b198d80886cd8f08e/mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11", size = 11933167 },
|
|
844
|
+
{ url = "https://files.pythonhosted.org/packages/04/90/f53971d3ac39d8b68bbaab9a4c6c58c8caa4d5fd3d587d16f5927eeeabe1/mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e", size = 12864341 },
|
|
845
|
+
{ url = "https://files.pythonhosted.org/packages/03/d2/8bc0aeaaf2e88c977db41583559319f1821c069e943ada2701e86d0430b7/mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89", size = 12972991 },
|
|
846
|
+
{ url = "https://files.pythonhosted.org/packages/6f/17/07815114b903b49b0f2cf7499f1c130e5aa459411596668267535fe9243c/mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b", size = 9879016 },
|
|
847
|
+
{ url = "https://files.pythonhosted.org/packages/9e/15/bb6a686901f59222275ab228453de741185f9d54fecbaacec041679496c6/mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255", size = 11252097 },
|
|
848
|
+
{ url = "https://files.pythonhosted.org/packages/f8/b3/8b0f74dfd072c802b7fa368829defdf3ee1566ba74c32a2cb2403f68024c/mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34", size = 10239728 },
|
|
849
|
+
{ url = "https://files.pythonhosted.org/packages/c5/9b/4fd95ab20c52bb5b8c03cc49169be5905d931de17edfe4d9d2986800b52e/mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a", size = 11924965 },
|
|
850
|
+
{ url = "https://files.pythonhosted.org/packages/56/9d/4a236b9c57f5d8f08ed346914b3f091a62dd7e19336b2b2a0d85485f82ff/mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9", size = 12867660 },
|
|
851
|
+
{ url = "https://files.pythonhosted.org/packages/40/88/a61a5497e2f68d9027de2bb139c7bb9abaeb1be1584649fa9d807f80a338/mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd", size = 12969198 },
|
|
852
|
+
{ url = "https://files.pythonhosted.org/packages/54/da/3d6fc5d92d324701b0c23fb413c853892bfe0e1dbe06c9138037d459756b/mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107", size = 9885276 },
|
|
853
|
+
{ url = "https://files.pythonhosted.org/packages/a0/b5/32dd67b69a16d088e533962e5044e51004176a9952419de0370cdaead0f8/mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1", size = 2752905 },
|
|
852
854
|
]
|
|
853
855
|
|
|
854
856
|
[[package]]
|
|
@@ -1040,22 +1042,20 @@ wheels = [
|
|
|
1040
1042
|
{ url = "https://files.pythonhosted.org/packages/39/1b/d0b013bf7d1af7cf0a6a4fce13f5fe5813ab225313755367b36e714a63f8/pycryptodome-3.21.0-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:18caa8cfbc676eaaf28613637a89980ad2fd96e00c564135bf90bc3f0b34dd93", size = 2254397 },
|
|
1041
1043
|
{ url = "https://files.pythonhosted.org/packages/14/71/4cbd3870d3e926c34706f705d6793159ac49d9a213e3ababcdade5864663/pycryptodome-3.21.0-cp36-abi3-win32.whl", hash = "sha256:280b67d20e33bb63171d55b1067f61fbd932e0b1ad976b3a184303a3dad22764", size = 1775641 },
|
|
1042
1044
|
{ url = "https://files.pythonhosted.org/packages/43/1d/81d59d228381576b92ecede5cd7239762c14001a828bdba30d64896e9778/pycryptodome-3.21.0-cp36-abi3-win_amd64.whl", hash = "sha256:b7aa25fc0baa5b1d95b7633af4f5f1838467f1815442b22487426f94e0d66c53", size = 1812863 },
|
|
1043
|
-
{ url = "https://files.pythonhosted.org/packages/25/b3/09ff7072e6d96c9939c24cf51d3c389d7c345bf675420355c22402f71b68/pycryptodome-3.21.0-pp27-pypy_73-manylinux2010_x86_64.whl", hash = "sha256:2cb635b67011bc147c257e61ce864879ffe6d03342dc74b6045059dfbdedafca", size = 1691593 },
|
|
1044
|
-
{ url = "https://files.pythonhosted.org/packages/a8/91/38e43628148f68ba9b68dedbc323cf409e537fd11264031961fd7c744034/pycryptodome-3.21.0-pp27-pypy_73-win32.whl", hash = "sha256:4c26a2f0dc15f81ea3afa3b0c87b87e501f235d332b7f27e2225ecb80c0b1cdd", size = 1765997 },
|
|
1045
1045
|
]
|
|
1046
1046
|
|
|
1047
1047
|
[[package]]
|
|
1048
1048
|
name = "pydantic"
|
|
1049
|
-
version = "2.10.
|
|
1049
|
+
version = "2.10.5"
|
|
1050
1050
|
source = { registry = "https://pypi.org/simple" }
|
|
1051
1051
|
dependencies = [
|
|
1052
1052
|
{ name = "annotated-types" },
|
|
1053
1053
|
{ name = "pydantic-core" },
|
|
1054
1054
|
{ name = "typing-extensions" },
|
|
1055
1055
|
]
|
|
1056
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1056
|
+
sdist = { url = "https://files.pythonhosted.org/packages/6a/c7/ca334c2ef6f2e046b1144fe4bb2a5da8a4c574e7f2ebf7e16b34a6a2fa92/pydantic-2.10.5.tar.gz", hash = "sha256:278b38dbbaec562011d659ee05f63346951b3a248a6f3642e1bc68894ea2b4ff", size = 761287 }
|
|
1057
1057
|
wheels = [
|
|
1058
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1058
|
+
{ url = "https://files.pythonhosted.org/packages/58/26/82663c79010b28eddf29dcdd0ea723439535fa917fce5905885c0e9ba562/pydantic-2.10.5-py3-none-any.whl", hash = "sha256:4dd4e322dbe55472cb7ca7e73f4b63574eecccf2835ffa2af9021ce113c83c53", size = 431426 },
|
|
1059
1059
|
]
|
|
1060
1060
|
|
|
1061
1061
|
[[package]]
|
|
@@ -1099,14 +1099,14 @@ wheels = [
|
|
|
1099
1099
|
|
|
1100
1100
|
[[package]]
|
|
1101
1101
|
name = "pydash"
|
|
1102
|
-
version = "8.0.
|
|
1102
|
+
version = "8.0.5"
|
|
1103
1103
|
source = { registry = "https://pypi.org/simple" }
|
|
1104
1104
|
dependencies = [
|
|
1105
1105
|
{ name = "typing-extensions" },
|
|
1106
1106
|
]
|
|
1107
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1107
|
+
sdist = { url = "https://files.pythonhosted.org/packages/2f/24/91c037f47e434172c2112d65c00c84d475a6715425e3315ba2cbb7a87e66/pydash-8.0.5.tar.gz", hash = "sha256:7cc44ebfe5d362f4f5f06c74c8684143c5ac481376b059ff02570705523f9e2e", size = 164861 }
|
|
1108
1108
|
wheels = [
|
|
1109
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1109
|
+
{ url = "https://files.pythonhosted.org/packages/2c/86/e74c978800131c657fc5145f2c1c63e0cea01a49b6216f729cf77a2e1edf/pydash-8.0.5-py3-none-any.whl", hash = "sha256:b2625f8981862e19911daa07f80ed47b315ce20d9b5eb57aaf97aaf570c3892f", size = 102077 },
|
|
1110
1110
|
]
|
|
1111
1111
|
|
|
1112
1112
|
[[package]]
|
|
@@ -1292,27 +1292,27 @@ wheels = [
|
|
|
1292
1292
|
|
|
1293
1293
|
[[package]]
|
|
1294
1294
|
name = "ruff"
|
|
1295
|
-
version = "0.
|
|
1296
|
-
source = { registry = "https://pypi.org/simple" }
|
|
1297
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1298
|
-
wheels = [
|
|
1299
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1300
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1301
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1302
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1303
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1304
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1305
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1306
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1307
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1308
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1309
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1310
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1311
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1312
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1313
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1314
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1315
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1295
|
+
version = "0.9.2"
|
|
1296
|
+
source = { registry = "https://pypi.org/simple" }
|
|
1297
|
+
sdist = { url = "https://files.pythonhosted.org/packages/80/63/77ecca9d21177600f551d1c58ab0e5a0b260940ea7312195bd2a4798f8a8/ruff-0.9.2.tar.gz", hash = "sha256:b5eceb334d55fae5f316f783437392642ae18e16dcf4f1858d55d3c2a0f8f5d0", size = 3553799 }
|
|
1298
|
+
wheels = [
|
|
1299
|
+
{ url = "https://files.pythonhosted.org/packages/af/b9/0e168e4e7fb3af851f739e8f07889b91d1a33a30fca8c29fa3149d6b03ec/ruff-0.9.2-py3-none-linux_armv6l.whl", hash = "sha256:80605a039ba1454d002b32139e4970becf84b5fee3a3c3bf1c2af6f61a784347", size = 11652408 },
|
|
1300
|
+
{ url = "https://files.pythonhosted.org/packages/2c/22/08ede5db17cf701372a461d1cb8fdde037da1d4fa622b69ac21960e6237e/ruff-0.9.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b9aab82bb20afd5f596527045c01e6ae25a718ff1784cb92947bff1f83068b00", size = 11587553 },
|
|
1301
|
+
{ url = "https://files.pythonhosted.org/packages/42/05/dedfc70f0bf010230229e33dec6e7b2235b2a1b8cbb2a991c710743e343f/ruff-0.9.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:fbd337bac1cfa96be615f6efcd4bc4d077edbc127ef30e2b8ba2a27e18c054d4", size = 11020755 },
|
|
1302
|
+
{ url = "https://files.pythonhosted.org/packages/df/9b/65d87ad9b2e3def67342830bd1af98803af731243da1255537ddb8f22209/ruff-0.9.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82b35259b0cbf8daa22a498018e300b9bb0174c2bbb7bcba593935158a78054d", size = 11826502 },
|
|
1303
|
+
{ url = "https://files.pythonhosted.org/packages/93/02/f2239f56786479e1a89c3da9bc9391120057fc6f4a8266a5b091314e72ce/ruff-0.9.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8b6a9701d1e371bf41dca22015c3f89769da7576884d2add7317ec1ec8cb9c3c", size = 11390562 },
|
|
1304
|
+
{ url = "https://files.pythonhosted.org/packages/c9/37/d3a854dba9931f8cb1b2a19509bfe59e00875f48ade632e95aefcb7a0aee/ruff-0.9.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9cc53e68b3c5ae41e8faf83a3b89f4a5d7b2cb666dff4b366bb86ed2a85b481f", size = 12548968 },
|
|
1305
|
+
{ url = "https://files.pythonhosted.org/packages/fa/c3/c7b812bb256c7a1d5553433e95980934ffa85396d332401f6b391d3c4569/ruff-0.9.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:8efd9da7a1ee314b910da155ca7e8953094a7c10d0c0a39bfde3fcfd2a015684", size = 13187155 },
|
|
1306
|
+
{ url = "https://files.pythonhosted.org/packages/bd/5a/3c7f9696a7875522b66aa9bba9e326e4e5894b4366bd1dc32aa6791cb1ff/ruff-0.9.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3292c5a22ea9a5f9a185e2d131dc7f98f8534a32fb6d2ee7b9944569239c648d", size = 12704674 },
|
|
1307
|
+
{ url = "https://files.pythonhosted.org/packages/be/d6/d908762257a96ce5912187ae9ae86792e677ca4f3dc973b71e7508ff6282/ruff-0.9.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1a605fdcf6e8b2d39f9436d343d1f0ff70c365a1e681546de0104bef81ce88df", size = 14529328 },
|
|
1308
|
+
{ url = "https://files.pythonhosted.org/packages/2d/c2/049f1e6755d12d9cd8823242fa105968f34ee4c669d04cac8cea51a50407/ruff-0.9.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c547f7f256aa366834829a08375c297fa63386cbe5f1459efaf174086b564247", size = 12385955 },
|
|
1309
|
+
{ url = "https://files.pythonhosted.org/packages/91/5a/a9bdb50e39810bd9627074e42743b00e6dc4009d42ae9f9351bc3dbc28e7/ruff-0.9.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d18bba3d3353ed916e882521bc3e0af403949dbada344c20c16ea78f47af965e", size = 11810149 },
|
|
1310
|
+
{ url = "https://files.pythonhosted.org/packages/e5/fd/57df1a0543182f79a1236e82a79c68ce210efb00e97c30657d5bdb12b478/ruff-0.9.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b338edc4610142355ccf6b87bd356729b62bf1bc152a2fad5b0c7dc04af77bfe", size = 11479141 },
|
|
1311
|
+
{ url = "https://files.pythonhosted.org/packages/dc/16/bc3fd1d38974f6775fc152a0554f8c210ff80f2764b43777163c3c45d61b/ruff-0.9.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:492a5e44ad9b22a0ea98cf72e40305cbdaf27fac0d927f8bc9e1df316dcc96eb", size = 12014073 },
|
|
1312
|
+
{ url = "https://files.pythonhosted.org/packages/47/6b/e4ca048a8f2047eb652e1e8c755f384d1b7944f69ed69066a37acd4118b0/ruff-0.9.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:af1e9e9fe7b1f767264d26b1075ac4ad831c7db976911fa362d09b2d0356426a", size = 12435758 },
|
|
1313
|
+
{ url = "https://files.pythonhosted.org/packages/c2/40/4d3d6c979c67ba24cf183d29f706051a53c36d78358036a9cd21421582ab/ruff-0.9.2-py3-none-win32.whl", hash = "sha256:71cbe22e178c5da20e1514e1e01029c73dc09288a8028a5d3446e6bba87a5145", size = 9796916 },
|
|
1314
|
+
{ url = "https://files.pythonhosted.org/packages/c3/ef/7f548752bdb6867e6939489c87fe4da489ab36191525fadc5cede2a6e8e2/ruff-0.9.2-py3-none-win_amd64.whl", hash = "sha256:c5e1d6abc798419cf46eed03f54f2e0c3adb1ad4b801119dedf23fcaf69b55b5", size = 10773080 },
|
|
1315
|
+
{ url = "https://files.pythonhosted.org/packages/0e/4e/33df635528292bd2d18404e4daabcd74ca8a9853b2e1df85ed3d32d24362/ruff-0.9.2-py3-none-win_arm64.whl", hash = "sha256:a1b63fa24149918f8b37cef2ee6fff81f24f0d74b6f0bdc37bc3e1f2143e41c6", size = 10001738 },
|
|
1316
1316
|
]
|
|
1317
1317
|
|
|
1318
1318
|
[[package]]
|
|
@@ -1383,11 +1383,11 @@ wheels = [
|
|
|
1383
1383
|
|
|
1384
1384
|
[[package]]
|
|
1385
1385
|
name = "types-pyyaml"
|
|
1386
|
-
version = "6.0.12.
|
|
1386
|
+
version = "6.0.12.20241230"
|
|
1387
1387
|
source = { registry = "https://pypi.org/simple" }
|
|
1388
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1388
|
+
sdist = { url = "https://files.pythonhosted.org/packages/9a/f9/4d566925bcf9396136c0a2e5dc7e230ff08d86fa011a69888dd184469d80/types_pyyaml-6.0.12.20241230.tar.gz", hash = "sha256:7f07622dbd34bb9c8b264fe860a17e0efcad00d50b5f27e93984909d9363498c", size = 17078 }
|
|
1389
1389
|
wheels = [
|
|
1390
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1390
|
+
{ url = "https://files.pythonhosted.org/packages/e8/c1/48474fbead512b70ccdb4f81ba5eb4a58f69d100ba19f17c92c0c4f50ae6/types_PyYAML-6.0.12.20241230-py3-none-any.whl", hash = "sha256:fa4d32565219b68e6dee5f67534c722e53c00d1cfc09c435ef04d7353e1e96e6", size = 20029 },
|
|
1391
1391
|
]
|
|
1392
1392
|
|
|
1393
1393
|
[[package]]
|
|
@@ -1422,7 +1422,7 @@ wheels = [
|
|
|
1422
1422
|
|
|
1423
1423
|
[[package]]
|
|
1424
1424
|
name = "web3"
|
|
1425
|
-
version = "7.
|
|
1425
|
+
version = "7.7.0"
|
|
1426
1426
|
source = { registry = "https://pypi.org/simple" }
|
|
1427
1427
|
dependencies = [
|
|
1428
1428
|
{ name = "aiohttp" },
|
|
@@ -1440,9 +1440,9 @@ dependencies = [
|
|
|
1440
1440
|
{ name = "typing-extensions" },
|
|
1441
1441
|
{ name = "websockets" },
|
|
1442
1442
|
]
|
|
1443
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
1443
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f6/87/3ddfacfdb74ac9c0e1c0bd37f1fc70aa2377befb910428fcbeb422d8158d/web3-7.7.0.tar.gz", hash = "sha256:4d0332b9a78b855e57ccebd9e1e74c8e855b95869ac7b8fe5878731593e76408", size = 2187868 }
|
|
1444
1444
|
wheels = [
|
|
1445
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
1445
|
+
{ url = "https://files.pythonhosted.org/packages/60/5e/6d1d2e64115c86c3342a22f931b21f71d303aabd65a03b353e89097b9d70/web3-7.7.0-py3-none-any.whl", hash = "sha256:2e29147c0f43cf191af788af8f004368b70994db40162f1240607f663dc68ea6", size = 1364053 },
|
|
1446
1446
|
]
|
|
1447
1447
|
|
|
1448
1448
|
[[package]]
|
mm_eth-0.2.0/pyproject.toml
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "mm-eth"
|
|
3
|
-
version = "0.2.0"
|
|
4
|
-
description = ""
|
|
5
|
-
requires-python = ">=3.12"
|
|
6
|
-
dependencies = [
|
|
7
|
-
"mm-std~=0.1.9",
|
|
8
|
-
"websocket-client~=1.8.0",
|
|
9
|
-
"web3~=7.6.1",
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
[build-system]
|
|
13
|
-
requires = ["hatchling"]
|
|
14
|
-
build-backend = "hatchling.build"
|
|
15
|
-
|
|
16
|
-
[tool.uv]
|
|
17
|
-
dev-dependencies = [
|
|
18
|
-
"pytest~=8.3.4",
|
|
19
|
-
"pytest-xdist~=3.6.1",
|
|
20
|
-
"ruff~=0.8.4",
|
|
21
|
-
"pip-audit~=2.7.3",
|
|
22
|
-
"bandit~=1.8.0",
|
|
23
|
-
"mypy~=1.14.0",
|
|
24
|
-
"types-PyYAML~=6.0.12.20241221",
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
[tool.mypy]
|
|
28
|
-
python_version = "3.13"
|
|
29
|
-
mypy_path = "stubs"
|
|
30
|
-
warn_no_return = false
|
|
31
|
-
implicit_reexport = true
|
|
32
|
-
strict = true
|
|
33
|
-
enable_error_code = ["truthy-bool", "possibly-undefined"]
|
|
34
|
-
exclude = ["^tests/", "^tmp/"]
|
|
35
|
-
[[tool.mypy.overrides]]
|
|
36
|
-
module = ["rlp", "rlp.sedes"]
|
|
37
|
-
ignore_missing_imports = true
|
|
38
|
-
|
|
39
|
-
[tool.ruff]
|
|
40
|
-
line-length = 130
|
|
41
|
-
target-version = "py313"
|
|
42
|
-
lint.select = [
|
|
43
|
-
"F", # Pyflakes
|
|
44
|
-
"E", "W", # pycodestyle
|
|
45
|
-
"UP", # pyupgrade
|
|
46
|
-
"B", # flake8-bugbear
|
|
47
|
-
"A", # flake8-builtins
|
|
48
|
-
"COM", # flake8-commas
|
|
49
|
-
"C40", # flake8-comprehensions
|
|
50
|
-
"G", # flake8-logging-format
|
|
51
|
-
"PIE", # flake8-pie
|
|
52
|
-
"T20", # flake8-print
|
|
53
|
-
"RUF", # Ruff-specific rules
|
|
54
|
-
]
|
|
55
|
-
lint.ignore = [
|
|
56
|
-
"A003", # builtin-attribute-shadowing
|
|
57
|
-
"B008", # function-call-argument-default
|
|
58
|
-
"COM812"
|
|
59
|
-
]
|
|
60
|
-
|
|
61
|
-
[tool.bandit]
|
|
62
|
-
exclude_dirs = ["tests"]
|
|
63
|
-
skips = ["B311"]
|
|
64
|
-
|
|
65
|
-
[tool.pytest.ini_options]
|
|
66
|
-
markers = ["infura"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|