|
11 | 11 | Block,
|
12 | 12 | BlockchainTestFiller,
|
13 | 13 | Initcode,
|
14 |
| - Storage, |
15 | 14 | Transaction,
|
16 | 15 | compute_create_address,
|
17 | 16 | )
|
@@ -128,89 +127,6 @@ def test_bal_balance_changes(
|
128 | 127 | )
|
129 | 128 |
|
130 | 129 |
|
131 |
| -def test_bal_storage_writes( |
132 |
| - pre: Alloc, |
133 |
| - blockchain_test: BlockchainTestFiller, |
134 |
| -): |
135 |
| - """Ensure BAL captures storage writes.""" |
136 |
| - storage = Storage({0x01: 0}) # type: ignore |
137 |
| - storage_contract = pre.deploy_contract( |
138 |
| - code=Op.SSTORE(0x01, 0x42) + Op.STOP, |
139 |
| - # pre-fill with canary value to detect writes in post-state |
140 |
| - storage=storage.canary(), |
141 |
| - ) |
142 |
| - alice = pre.fund_eoa() |
143 |
| - |
144 |
| - tx = Transaction( |
145 |
| - sender=alice, |
146 |
| - to=storage_contract, |
147 |
| - gas_limit=100000, |
148 |
| - ) |
149 |
| - |
150 |
| - block = Block( |
151 |
| - txs=[tx], |
152 |
| - expected_block_access_list=BlockAccessListExpectation( |
153 |
| - account_expectations={ |
154 |
| - storage_contract: BalAccountExpectation( |
155 |
| - storage_changes=[ |
156 |
| - BalStorageSlot( |
157 |
| - slot=0x01, |
158 |
| - slot_changes=[BalStorageChange(tx_index=1, post_value=0x42)], |
159 |
| - ) |
160 |
| - ], |
161 |
| - ), |
162 |
| - } |
163 |
| - ), |
164 |
| - ) |
165 |
| - |
166 |
| - blockchain_test( |
167 |
| - pre=pre, |
168 |
| - blocks=[block], |
169 |
| - post={ |
170 |
| - alice: Account(nonce=1), |
171 |
| - storage_contract: Account(storage={0x01: 0x42}), |
172 |
| - }, |
173 |
| - ) |
174 |
| - |
175 |
| - |
176 |
| -def test_bal_storage_reads( |
177 |
| - pre: Alloc, |
178 |
| - blockchain_test: BlockchainTestFiller, |
179 |
| -): |
180 |
| - """Ensure BAL captures storage reads.""" |
181 |
| - storage_contract = pre.deploy_contract( |
182 |
| - code=Op.SLOAD(0x01) + Op.STOP, |
183 |
| - storage={0x01: 0x42}, |
184 |
| - ) |
185 |
| - alice = pre.fund_eoa() |
186 |
| - |
187 |
| - tx = Transaction( |
188 |
| - sender=alice, |
189 |
| - to=storage_contract, |
190 |
| - gas_limit=100000, |
191 |
| - ) |
192 |
| - |
193 |
| - block = Block( |
194 |
| - txs=[tx], |
195 |
| - expected_block_access_list=BlockAccessListExpectation( |
196 |
| - account_expectations={ |
197 |
| - storage_contract: BalAccountExpectation( |
198 |
| - storage_reads=[0x01], |
199 |
| - ), |
200 |
| - } |
201 |
| - ), |
202 |
| - ) |
203 |
| - |
204 |
| - blockchain_test( |
205 |
| - pre=pre, |
206 |
| - blocks=[block], |
207 |
| - post={ |
208 |
| - alice: Account(nonce=1), |
209 |
| - storage_contract: Account(storage={0x01: 0x42}), |
210 |
| - }, |
211 |
| - ) |
212 |
| - |
213 |
| - |
214 | 130 | def test_bal_code_changes(
|
215 | 131 | pre: Alloc,
|
216 | 132 | blockchain_test: BlockchainTestFiller,
|
|
0 commit comments