File tree Expand file tree Collapse file tree 2 files changed +0
-535
lines changed
tests/istanbul/eip152_blake2 Expand file tree Collapse file tree 2 files changed +0
-535
lines changed Original file line number Diff line number Diff line change 24
24
REFERENCE_SPEC_VERSION = ref_spec_152 .version
25
25
26
26
27
- @pytest .fixture
28
- def blake2b_contract_bytecode ():
29
- """Contract code that performs a CALL to the BLAKE2b precompile and stores the result."""
30
- return (
31
- # Store all CALLDATA into memory (offset 0)
32
- Op .CALLDATACOPY (0 , 0 , Op .CALLDATASIZE ())
33
- # Store the returned CALL status (success = 1, fail = 0) into slot 0:
34
- + Op .SSTORE (
35
- 0 ,
36
- # Setup stack to CALL into Blake2b with the CALLDATA and CALL into it (+ pop value)
37
- Op .CALL (
38
- address = 9 ,
39
- args_offset = 0 ,
40
- args_size = Op .CALLDATASIZE (),
41
- ret_offset = 0x200 ,
42
- ret_size = 0x40 ,
43
- ),
44
- )
45
- + Op .SSTORE (1 , Op .MLOAD (0x200 ))
46
- + Op .SSTORE (2 , Op .MLOAD (0x220 ))
47
- + Op .STOP ()
48
- )
49
-
50
-
51
27
@pytest .mark .valid_from ("Istanbul" )
52
28
@pytest .mark .parametrize ("call_opcode" , [Op .CALL ])
53
29
@pytest .mark .parametrize (
You can’t perform that action at this time.
0 commit comments