@@ -2,6 +2,8 @@ Require Import CoqOfRust.CoqOfRust.
22Require Import CoqOfRust.links.M.
33Require Import CoqOfRust.revm.links.dependencies.
44Require Import CoqOfRust.revm.links.primitives.bytecode.eof.
5+ Require Import CoqOfRust.revm.translations.interpreter.interpreter_action.eof_create_inputs.
6+ Import Run.
57
68(*
79#[derive(Debug, Clone, PartialEq, Eq)]
@@ -113,24 +115,14 @@ Module Impl_EOFCreateInputs.
113115 }
114116 *)
115117
116- Parameter address_default : Address.t.
117- Parameter eof_decode : Bytes.t -> Eof.t.
118-
119- Definition new (caller : Address.t) (value : U256.t)
120- (gas_limit : U64.t) (kind : EOFCreateKind.t) : Self :=
121- {| EOFCreateInputs.caller := caller;
122- EOFCreateInputs.created_address :=
123- match kind with
124- | EOFCreateKind.Opcode _ _ addr => addr
125- | EOFCreateKind.Tx _ => address_default
126- end ;
127- EOFCreateInputs.value := value;
128- EOFCreateInputs.eof_init_code :=
129- match kind with
130- | EOFCreateKind.Opcode code _ _ => code
131- | EOFCreateKind.Tx data => eof_decode data
132- end ;
133- EOFCreateInputs.gas_limit := gas_limit |}.
118+ Definition run_new (caller : Address.t) (value : U256.t) (gas_limit : U64.t) (kind : EOFCreateKind.t) :
119+ {{
120+ interpreter_action.eof_create_inputs.Impl_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInputs.new
121+ [] [] [φ caller; φ value; φ gas_limit; φ kind] ⇓
122+ fun (v : Self) => inl (φ v)
123+ }}.
124+ Proof .
125+ Admitted .
134126
135127 (*
136128 pub fn new_opcode(
@@ -153,11 +145,17 @@ Module Impl_EOFCreateInputs.
153145 )
154146 }
155147 *)
156-
157- Definition new_opcode (caller : Address.t) (created_address : Address.t)
158- (value : U256.t) (eof_init_code : Eof.t)
159- (gas_limit : U64.t) (input : Bytes.t) : Self :=
160- new caller value gas_limit (EOFCreateKind.Opcode eof_init_code input created_address).
148+ (* Main run_new_opcode specification *)
149+ (* Main run_new_opcode specification *)
150+ Definition run_new_opcode (caller : Address.t) (created_address : Address.t) (value : U256.t)
151+ (eof_init_code : Eof.t) (gas_limit : U64.t) (input : Bytes.t) :
152+ {{
153+ interpreter_action.eof_create_inputs.Impl_revm_interpreter_interpreter_action_eof_create_inputs_EOFCreateInputs.new
154+ [] [] [φ caller; φ value; φ gas_limit; φ (EOFCreateKind.Opcode eof_init_code input created_address)] ⇓
155+ fun (v : EOFCreateInputs.t) => inl (φ v)
156+ }}.
157+ Proof .
158+ Admitted .
161159
162160End Impl_EOFCreateInputs.
163161
0 commit comments