Skip to content

Commit 47c6d06

Browse files
committed
cherrypick bindings changes
1 parent 771f5dc commit 47c6d06

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

flake.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bindings/ocaml/lib/consistency_test.ml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,17 @@ module Hash_from_json = struct
203203
let tx =
204204
Zkapp_command.of_json @@ Yojson.Safe.from_string @@ Js.to_string tx_json
205205
in
206+
let tx =
207+
let open Zkapp_command in
208+
{ Poly.fee_payer = tx.fee_payer
209+
; memo = tx.memo
210+
; account_updates =
211+
tx.account_updates
212+
|> Call_forest.accumulate_hashes
213+
~hash_account_update:(fun (p : Account_update.t) ->
214+
Digest.Account_update.create p )
215+
}
216+
in
206217
let account_update = List.nth_exn tx.account_updates account_update_index in
207218
object%js
208219
val accountUpdate =
@@ -283,7 +294,7 @@ module Transaction_hash = struct
283294
command |> hash_signed_command |> to_base58_check |> Js.string)
284295

285296
let hash_zkapp_command (command : Js.js_string Js.t) =
286-
let command : Zkapp_command.t =
297+
let command : Zkapp_command.Stable.Latest.t =
287298
command |> Js.to_string |> Yojson.Safe.from_string
288299
|> Zkapp_command.of_json
289300
in

src/bindings/ocaml/lib/local_ledger.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,10 @@ let protocol_state_of_json =
223223
json |> Js.to_string |> Yojson.Safe.from_string
224224
|> Fields_derivers_zkapps.of_json (Lazy.force deriver)
225225

226-
let apply_zkapp_command_transaction l (txn : Zkapp_command.t)
226+
let apply_zkapp_command_transaction l (txn : Zkapp_command.Stable.Latest.t)
227227
(account_creation_fee : string)
228228
(network_state : Mina_base.Zkapp_precondition.Protocol_state.View.t) =
229+
let txn = Zkapp_command.write_all_proofs_to_disk txn in
229230
check_account_update_signatures txn ;
230231
let ledger = l##.value in
231232
let application_result =

src/bindings/ocaml/lib/pickles_bindings.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ val pickles :
127127
Js_of_ocaml.Js.readonly_prop >
128128
Js.t
129129
Js_of_ocaml.Js.readonly_prop >
130-
Js.t
130+
Js.t

0 commit comments

Comments
 (0)