Skip to content

Commit 04b09ba

Browse files
committed
more updates from feedback
1 parent 1f652aa commit 04b09ba

File tree

1 file changed

+9
-31
lines changed

1 file changed

+9
-31
lines changed

tests/frontier/opcodes/test_calldatacopy.py

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717
+ Op.MLOAD
1818
+ Op.PUSH1[0x0]
1919
+ Op.SSTORE
20-
+ Op.MSIZE
21-
+ Op.PUSH1[0x0]
22-
+ Op.RETURN
23-
+ Op.STOP
20+
+ Op.RETURN(offset=0, size=Op.MSIZE)
2421
),
2522
b"\x00",
2623
Account(
@@ -37,10 +34,7 @@
3734
+ Op.MLOAD
3835
+ Op.PUSH1[0x0]
3936
+ Op.SSTORE
40-
+ Op.MSIZE
41-
+ Op.PUSH1[0x0]
42-
+ Op.RETURN
43-
+ Op.STOP
37+
+ Op.RETURN(offset=0, size=Op.MSIZE)
4438
),
4539
b"\x01",
4640
Account(
@@ -57,10 +51,7 @@
5751
+ Op.MLOAD
5852
+ Op.PUSH1[0x0]
5953
+ Op.SSTORE
60-
+ Op.MSIZE
61-
+ Op.PUSH1[0x0]
62-
+ Op.RETURN
63-
+ Op.STOP
54+
+ Op.RETURN(offset=0, size=Op.MSIZE)
6455
),
6556
b"\x02",
6657
Account(
@@ -77,10 +68,7 @@
7768
+ Op.MLOAD
7869
+ Op.PUSH1[0x0]
7970
+ Op.SSTORE
80-
+ Op.MSIZE
81-
+ Op.PUSH1[0x0]
82-
+ Op.RETURN
83-
+ Op.STOP
71+
+ Op.RETURN(offset=0, size=Op.MSIZE)
8472
),
8573
b"\x03",
8674
Account(
@@ -101,10 +89,7 @@
10189
+ Op.MLOAD
10290
+ Op.PUSH1[0x0]
10391
+ Op.SSTORE
104-
+ Op.MSIZE
105-
+ Op.PUSH1[0x0]
106-
+ Op.RETURN
107-
+ Op.STOP
92+
+ Op.RETURN(offset=0, size=Op.MSIZE)
10893
),
10994
b"\x04",
11095
Account(storage={0x00: 0x00}),
@@ -121,10 +106,7 @@
121106
+ Op.MLOAD
122107
+ Op.PUSH1[0x0]
123108
+ Op.SSTORE
124-
+ Op.MSIZE
125-
+ Op.PUSH1[0x0]
126-
+ Op.RETURN
127-
+ Op.STOP
109+
+ Op.RETURN(offset=0, size=Op.MSIZE)
128110
),
129111
b"\x05",
130112
Account(storage={0x00: 0x00}),
@@ -153,10 +135,7 @@
153135
+ Op.PUSH1[0x42]
154136
+ Op.PUSH1[0x1F]
155137
+ Op.MSTORE8
156-
+ Op.PUSH2[0x103]
157-
+ Op.PUSH1[0x0]
158-
+ Op.PUSH1[0x1F]
159-
+ Op.CALLDATACOPY
138+
+ Op.CALLDATACOPY(dest_offset=0x1F, offset=0x0, size=0x103)
160139
+ Op.PUSH1[0x0]
161140
+ Op.MLOAD
162141
+ Op.DUP1
@@ -190,7 +169,7 @@ def test_calldatacopy(
190169
tx_data: bytes,
191170
pre: Alloc,
192171
code_address_storage: Account,
193-
to_address_storage: Account,
172+
to_address_storage: Account | None,
194173
):
195174
"""
196175
Test `CALLDATACOPY` opcode.
@@ -231,9 +210,8 @@ def test_calldatacopy(
231210

232211
tx = Transaction(
233212
data=tx_data,
234-
gas_limit=0x04C4B400,
213+
gas_limit=0x100_000,
235214
gas_price=0x0A,
236-
nonce=0x00,
237215
sender=pre.fund_eoa(),
238216
to=to,
239217
value=0x01,

0 commit comments

Comments
 (0)