forked from kkrt-labs/kakarot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
201 lines (192 loc) · 8.53 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
[project]
name = "kakarot"
version = "0.1.0"
description = "An EVM implementation written in Cairo, a sort of ZK-EVM emulator, leveraging STARK proof system."
readme = "README.md"
requires-python = ">=3.10,<3.11"
dependencies = [
"cairo-lang>=0.13.1",
"python-dotenv>=0.21.0",
"async-lru>=2.0.4",
"toml>=0.10.2",
"starknet-py>=0.23.0",
"uvloop>=0.20.0",
]
[project.scripts]
setup = "kakarot_scripts.setup.setup:main"
compile = "kakarot_scripts.compile_kakarot:main"
declare = "kakarot_scripts.deployment.declarations:main_sync"
deploy = "kakarot_scripts.deployment.main:main_sync"
ef_tests = "kakarot_scripts.ef_tests.fetch:generate_tests"
[tool.uv.sources]
kakarot-scripts = { path = "./kakarot_scripts" }
ethereum = { git = "https://github.com/ethereum/execution-specs.git" }
py-evm = { git = "https://github.com/ethereum/py-evm", rev = "f2219d6df83ede8f9574eab48cbe4bc33197066f" }
[tool.uv]
dev-dependencies = [
"autoflake>=2.0.0",
"black>=22.10.0",
"cached-property>=1.5.2",
"case-converter>=1.1.0",
"codespell>=2.2.2",
"eth-abi>=5.1.0",
"eth-account>=0.13.0",
"eth-keys>=0.4.0",
"eth-typing==3.5.2",
"eth-utils>=2.1.0",
"ethereum",
"py-evm",
"hypothesis==6.100.1",
"ipykernel>=6.23.1",
"isort>=5.10.1",
"matplotlib>=3.8.2",
"openzeppelin-cairo-contracts>=0.6.1",
"pandas>=1.5.1",
"py-ecc>=7.0.0",
"pyperclip>=1.8.2",
"pysha3>=1.0.2",
"pytest-asyncio==0.21.1",
"pytest-env>=1.1.3",
"pytest==8.1.1",
"pytest-xdist==3.5.0",
"requests>=2.28.2",
"rlp<=3",
"scikit-learn>=1.5.1",
"seaborn>=0.13.2",
"setproctitle>=1.3.2",
"setuptools>=68.2.0",
"sympy>=1.11.1",
"tabulate>=0.9.0",
"web3>=6",
]
[tool.pytest.ini_options]
norecursedirs = "tests/ef_tests/test_data"
filterwarnings = [
"ignore:Using or importing the ABCs:DeprecationWarning", # from frozendict
"ignore:lexer_state will be removed in subsequent releases. Use lexer_thread instead.", # from lark
"ignore:abi:DeprecationWarning", # from web3
"ignore::marshmallow.warnings.RemovedInMarshmallow4Warning", # from marshmallow
]
pythonpath = [".", "tests"]
asyncio_mode = "auto"
markers = [
"ArithmeticOperations",
"ADD: Opcode Value 0x01 - Addition operation",
"MUL: Opcode Value 0x02 - Multiplication operation",
"SUB: Opcode Value 0x03 - Subtraction operation",
"DIV: Opcode Value 0x04 - Integer division operation",
"SDIV: Opcode Value 0x05 - Signed integer division operation (truncated)",
"MOD: Opcode Value 0x06 - Modulo remainder operation",
"SMOD: Opcode Value 0x07 - Signed modulo remainder operation",
"ADDMOD: Opcode Value 0x08 - Modulo addition operation",
"MULMOD: Opcode Value 0x09 - Modulo multiplication operation",
"EXP: Opcode Value 0x0a - Exponential operation",
"SIGNEXTEND: Opcode Value 0x0b - Extend length of two's complement signed integer",
"ComparisonBitwiseLogicOperations",
"LT: Opcode Value 0x10 - Less-than comparison",
"GT: Opcode Value 0x11 - Greater-than comparison",
"SLT: Opcode Value 0x12 - Signed less-than comparison",
"SGT: Opcode Value 0x13 - Signed greater-than comparison",
"EQ: Opcode Value 0x14 - Equality comparison",
"ISZERO: Opcode Value 0x15 - Simple not operator",
"AND: Opcode Value 0x16 - Bitwise AND operation",
"OR: Opcode Value 0x17 - Bitwise OR operation",
"NOT: Opcode Value 0x19 - Bitwise NOT operation",
"SHL: Opcode Value 0x1b - Shift left",
"SHR: Opcode Value 0x1c - Logical shift right",
"SAR: Opcode Value 0x1d - Arithmetic shift right",
"SHA3: Opcode Value 0x20 - Compute Keccak-256 hash",
"EnvironmentalInformation",
"ADDRESS: Opcode Value 0x30 - Get address of currently executing account",
"BALANCE: Opcode Value 0x31 - Get balance of the given account",
"ORIGIN: Opcode Value 0x32 - Get execution origination address",
"CALLER: Opcode Value 0x33 - Get caller address",
"CALLVALUE: Opcode Value 0x34 - Get deposited value by the instruction/transaction responsible for this execution",
"CALLDATALOAD: Opcode Value 0x35 - Get input data of current environment",
"CALLDATASIZE: Opcode Value 0x36 - Get size of input data in current environment",
"CALLDATACOPY: Opcode Value 0x37 - Copy input data in current environment to memory",
"CODESIZE: Opcode Value 0x38 - Get size of code running in current environment",
"CODECOPY: Opcode Value 0x39 - Copy code running in current environment to memory",
"RETURNDATASIZE: Opcode Value 0x3d - Get size of output data from the previous call from the current environment",
"BlockInformation",
"BLOCKHASH: Opcode Value 0x40 - Get the hash of one of the 256 most recent complete blocks",
"COINBASE: Opcode Value 0x41 - Get the block's beneficiary address",
"TIMESTAMP: Opcode Value 0x42 - Get the block's timestamp",
"NUMBER: Opcode Value 0x43 - Get the block's number",
"DIFFICULTY: Opcode Value 0x44 - Get the block's difficulty",
"GASLIMIT: Opcode Value 0x45 - Get the block's gas limit",
"CHAINID: Opcode Value 0x46 - Get the chain ID",
"SELFBALANCE: Opcode Value 0x47 - Get the balance of the current contract",
"BASEFEE: Opcode Value 0x48 - Get the base fee of the current block",
"BLOBHASH: Opcode Value 0x49 - Get the versioned hash at the requested index",
"BLOBBASEFEE: Opcode Value 0x4a - Get the blob base-fee of the current block",
"StackMemoryStorageFlowOperations",
"MLOAD: Opcode Value 0x51 - Load word from memory",
"MSTORE: Opcode Value 0x52 - Save word to memory",
"MSTORE8: Opcode Value 0x53 - Save byte to memory",
"SLOAD: Opcode Value 0x54 - Load word from storage",
"SSTORE: Opcode Value 0x55 - Save word to storage",
"JUMP: Opcode Value 0x56 - Alter the program counter",
"JUMPI: Opcode Value 0x57 - Conditionally alter the program counter",
"PC: Opcode Value 0x58 - Get the value of the program counter prior to the increment",
"MSIZE: Opcode Value 0x59 - Get the size of active memory in bytes",
"JUMPDEST: Opcode Value 0x5b - Mark a valid destination for jumps",
"TLOAD: Opcode Value 0x5c - Load word from transient storage",
"TSTORE: Opcode Value 0x5d - Save word to transient storage",
"MCOPY: Opcode Value 0x5e - Copy memory from one location to another",
"PushOperations",
"PUSH Opcodes 0x60 ~ 7f - Place n-byte item on stack",
"DuplicationOperations",
"DUP: Opcodes 0x80 ~ 8f - Duplicate nth stack item",
"ExchangeOperations",
"SWAP: Opcodes 0x90 ~ 9f - Exchange 1st and nth stack items",
"LoggingOperations",
"LOG: Opcodes 0xa0 ~ a4 - Append log record with n topics",
"SystemOperations",
"RETURN: Opcode Value 0xf3 - Halt execution returning output data",
"REVERT: Opcode value 0xfd - Halt execution reverting state changes",
"INVALID: Opcode Value 0xfe - Designated invalid instruction",
"Precompiles",
"EC_RECOVER: Precompile Value 0x01 - Elliptic curve digital signature algorithm (ECDSA) public key recovery function",
"SHA256: Precompile Value 0x02 - Hash function",
"RIPEMD160: Precompile Value 0x03 - Hash function",
"MOD_EXP: Precompile Value 0x05 - Modular exponentiation MVP - missing support for bigint",
"EC_ADD: Precompile Value 0x06 - Point addition (ADD) on the elliptic curve 'alt_bn128'",
"EC_MUL: Precompile Value 0x07 - Scalar multiplication (MUL) on the elliptic curve 'alt_bn128'",
"BLAKE2F: Precompile Value 0x09 - Blake2 compression function",
"Counter",
"PlainOpcodes",
"SolmateERC20",
"SolmateERC721",
"UniswapV2ERC20",
"UniswapV2Factory",
"RIP7212",
"CairoPrecompiles",
"UniswapV2Router",
"AccountContract",
"Utils",
"Safe",
"EFTests",
"SSTORE",
"SLOAD",
"NoCI",
"slow",
"EvmPrecompiles",
]
env = [
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION = python",
"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT = 3",
]
[tool.isort]
profile = "black"
[tool.autoflake]
in_place = true
remove_unused_variables = true
remove_all_unused_imports = true
[tool.bandit]
exclude_dirs = ["tests", "cairo_zero/tests"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["kakarot_scripts"]