File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
tests/verkle/eip6800_genesis_verkle_tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,52 @@ def test_contract_creation(
8181 post = post ,
8282 blocks = blocks ,
8383 )
84+
85+
86+ @pytest .mark .valid_from ("Verkle" )
87+ @pytest .mark .parametrize (
88+ "value" ,
89+ [0 , 1 ],
90+ )
91+ def test_contract_creation_failed_initcode (
92+ blockchain_test : BlockchainTestFiller , fork : str , value : int
93+ ):
94+ """
95+ Test that contract creation with failed initcode.
96+ """
97+ env = Environment (
98+ fee_recipient = "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" ,
99+ difficulty = 0x20000 ,
100+ gas_limit = 10000000000 ,
101+ number = 1 ,
102+ timestamp = 1000 ,
103+ )
104+ pre = {
105+ TestAddress : Account (balance = 1000000000000000000000 ),
106+ }
107+ tx = Transaction (
108+ ty = 0x0 ,
109+ chain_id = 0x01 ,
110+ nonce = 0 ,
111+ to = None ,
112+ gas_limit = 100000000 ,
113+ gas_price = 10 ,
114+ value = value ,
115+ data = Op .REVERT (0 , 0 ),
116+ )
117+ blocks = [Block (txs = [tx ])]
118+
119+ contract_address = compute_create_address (address = TestAddress , nonce = tx .nonce )
120+
121+ post = {
122+ contract_address : Account (
123+ balance = value ,
124+ ),
125+ }
126+
127+ blockchain_test (
128+ genesis_environment = env ,
129+ pre = pre ,
130+ post = post ,
131+ blocks = blocks ,
132+ )
You can’t perform that action at this time.
0 commit comments