Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move zkapp_uri to Zkapp_account #12008

Merged
merged 10 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions src/app/archive/lib/load_data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,8 @@ let get_account_accessed ~pool (account : Processor.Accounts_accessed.t) :
; zkapp_version
; sequence_state_id
; last_sequence_slot
; proved_state (* TODO : we'll have this at some point *)
; zkapp_uri_id = _
; proved_state
; zkapp_uri_id
}
->
let%bind { element0
Expand Down Expand Up @@ -838,7 +838,7 @@ let get_account_accessed ~pool (account : Processor.Accounts_accessed.t) :
Processor.Zkapp_sequence_states.load db sequence_state_id )
in
let elements = [ element0; element1; element2; element3; element4 ] in
let%map sequence_state =
let%bind sequence_state =
let%map field_strs =
Deferred.List.map elements ~f:(fun id ->
query_db ~f:(fun db -> Processor.Zkapp_state_data.load db id) )
Expand All @@ -850,22 +850,20 @@ let get_account_accessed ~pool (account : Processor.Accounts_accessed.t) :
last_sequence_slot |> Unsigned.UInt32.of_int64
|> Mina_numbers.Global_slot.of_uint32
in
let%map zkapp_uri =
query_db ~f:(fun db -> Processor.Zkapp_uri.load db zkapp_uri_id)
in
Some
( { app_state
; verification_key
; zkapp_version
; sequence_state
; last_sequence_slot
; proved_state
; zkapp_uri
}
: Mina_base.Zkapp_account.t ) )
in
(* TODO: the URI will be moved to the zkApp, no longer in the account *)
let%bind zkapp_uri =
Option.value_map zkapp_db ~default:(return "https://dummy.com")
~f:(fun zkapp ->
query_db ~f:(fun db -> Processor.Zkapp_uri.load db zkapp.zkapp_uri_id) )
in
(* TODO: token permissions is going away *)
let account =
( { public_key
Expand All @@ -881,7 +879,6 @@ let get_account_accessed ~pool (account : Processor.Accounts_accessed.t) :
; timing
; permissions
; zkapp
; zkapp_uri
}
: Mina_base.Account.t )
in
Expand Down
7 changes: 3 additions & 4 deletions src/app/archive/lib/processor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2455,15 +2455,15 @@ module Zkapp_account = struct

let table_name = "zkapp_accounts"

(* TODO: when zkapp_uri moved to Zkapp.Account in OCaml, no need to pass it in separately *)
let add_if_doesn't_exist (module Conn : CONNECTION) zkapp_uri zkapp_account =
let add_if_doesn't_exist (module Conn : CONNECTION) zkapp_account =
let open Deferred.Result.Let_syntax in
let ({ app_state
; verification_key
; zkapp_version
; sequence_state
; last_sequence_slot
; proved_state
; zkapp_uri
}
: Mina_base.Zkapp_account.t ) =
zkapp_account
Expand Down Expand Up @@ -2599,9 +2599,8 @@ module Accounts_accessed = struct
account.permissions
in
let%bind zkapp_id =
(* TODO: when zkapp_uri part of Zkapp.Account.t, don't pass it separately here *)
Mina_caqti.add_if_some
(Zkapp_account.add_if_doesn't_exist (module Conn) account.zkapp_uri)
(Zkapp_account.add_if_doesn't_exist (module Conn))
account.zkapp
in
let account_accessed : t =
Expand Down
20 changes: 10 additions & 10 deletions src/app/replayer/test/archive_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2074,11 +2074,11 @@ COPY public.accounts_created (block_id, account_identifier_id, creation_fee) FRO
--

COPY public.blocks (id, state_hash, parent_id, parent_hash, creator_id, block_winner_id, snarked_ledger_hash_id, staking_epoch_data_id, next_epoch_data_id, min_window_density, total_currency, ledger_hash, height, global_slot_since_hard_fork, global_slot_since_genesis, "timestamp", chain_status) FROM stdin;
1 3NLt1r77r7z7VEX4tACzHc9qC9Rz5GqYSXtufFhpE85tWVoYrx8z \N 3NLeQxhRU3qHv34vHNUwD2ht9gzW3ioAGqBmVwXjYhsSDHPuBDQn 1 1 1 1 2 77 3100000000000000000 jwS4u5UYaySzEDNDhCT4HnWBcUvARBYjWLGKArheFrzRbvhr8Pd 1 0 0 1659993000000 canonical
2 3NLPC2srDPVxrf4TqpsznL7CTeT6B8pPZYwNCHyizxaSznu6XoUA 1 3NLt1r77r7z7VEX4tACzHc9qC9Rz5GqYSXtufFhpE85tWVoYrx8z 3 3 1 1 3 77 3100000000000000000 jxoAHY24uyTC9qSVBwSh9vtFcJkRroXpQjtvQJr4p3D1T8xRrV6 2 22 22 1659993660000 pending
3 3NLxg96L88SBKKVgWgxcDLpTbCFfftbzCMepbhTBrHxLAcTiv4An 2 3NLPC2srDPVxrf4TqpsznL7CTeT6B8pPZYwNCHyizxaSznu6XoUA 3 3 1 1 4 77 3100000000000000000 jwR1YaaEjgdegXHuX9mAiFPcAUJD8aWPDbZJcyV2WTEkCHJ3G2W 3 24 24 1659993720000 pending
4 3NKAwzwaGhdXYs2iEJPj7cnfgfcRkHmRo9kFfB2DRdUM4NsmNnk8 3 3NLxg96L88SBKKVgWgxcDLpTbCFfftbzCMepbhTBrHxLAcTiv4An 3 3 1 1 5 77 3100000000000000000 jwVvbHXxwuBXNVzwoz8YJoo9DvEoRJCsYS1f5tosoJyvkWxjEAM 4 26 26 1659993780000 pending
5 3NKPsYafv3sqCRymAw3hyYbdnpR1rkz5uESW46gA1pme1isBQ8z9 4 3NKAwzwaGhdXYs2iEJPj7cnfgfcRkHmRo9kFfB2DRdUM4NsmNnk8 3 3 1 1 6 77 3100000000000000000 jxWhYJGQ1jzvyUJ2h5X6y8r1avFiEnPyeCr7qAdGxEGjCJDuWug 5 28 28 1659993840000 pending
1 3NLt1r77r7z7VEX4tACzHc9qC9Rz5GqYSXtufFhpE85tWVoYrx8z \N 3NLeQxhRU3qHv34vHNUwD2ht9gzW3ioAGqBmVwXjYhsSDHPuBDQn 1 1 1 1 2 77 3100000000000000000 jxH2eGKbuJ1TZApcnBjxQnz86Bm3GzBqLmsb1NQ7qGvbc54nrwR 1 0 0 1659993000000 canonical
2 3NLPC2srDPVxrf4TqpsznL7CTeT6B8pPZYwNCHyizxaSznu6XoUA 1 3NLt1r77r7z7VEX4tACzHc9qC9Rz5GqYSXtufFhpE85tWVoYrx8z 3 3 1 1 3 77 3100000000000000000 jwHPh9uRv5yj7jCvNAoqfA4vAt4WjvcJsiofnuucd8qtfxS1gky 2 22 22 1659993660000 pending
3 3NLxg96L88SBKKVgWgxcDLpTbCFfftbzCMepbhTBrHxLAcTiv4An 2 3NLPC2srDPVxrf4TqpsznL7CTeT6B8pPZYwNCHyizxaSznu6XoUA 3 3 1 1 4 77 3100000000000000000 jxTXkxTG8B8Y2N46T3GJLrT7cKVBdKZFt1FHdtqTtmwkQpuzBqb 3 24 24 1659993720000 pending
4 3NKAwzwaGhdXYs2iEJPj7cnfgfcRkHmRo9kFfB2DRdUM4NsmNnk8 3 3NLxg96L88SBKKVgWgxcDLpTbCFfftbzCMepbhTBrHxLAcTiv4An 3 3 1 1 5 77 3100000000000000000 jxrx7tmPvsTeopt1rnnFykEfTVvxH1vTX2iz5gCnD9gcnnSE4yY 4 26 26 1659993780000 pending
5 3NKPsYafv3sqCRymAw3hyYbdnpR1rkz5uESW46gA1pme1isBQ8z9 4 3NKAwzwaGhdXYs2iEJPj7cnfgfcRkHmRo9kFfB2DRdUM4NsmNnk8 3 3 1 1 6 77 3100000000000000000 jy2yDdVb7kcD3axFLRBoT62wQyj66fAW2ufAsTWZZBQtvKT4XVh 5 28 28 1659993840000 pending
6 3NLr8y5CxQST5f5QK7LdfL9J1Bnuu5c5iZJ4YPTCfDyWmCKbEX4b 5 3NKPsYafv3sqCRymAw3hyYbdnpR1rkz5uESW46gA1pme1isBQ8z9 3 3 1 1 7 77 3100000000000000000 jwWs7Mg1i63LEAYRUnkjzsqJvnUMmtWW9SC88jcM55k3PZ4A7c7 6 31 31 1659993930000 pending
7 3NKvv85heSwz5rwAbT7KFxrHZoGGnmwZHhBW952t5Waq1yM3YtS5 6 3NLr8y5CxQST5f5QK7LdfL9J1Bnuu5c5iZJ4YPTCfDyWmCKbEX4b 3 3 1 1 8 77 3100000000000000000 jwWs7Mg1i63LEAYRUnkjzsqJvnUMmtWW9SC88jcM55k3PZ4A7c7 7 33 33 1659993990000 pending
8 3NLAtWGLyAsD9biM2tx6djxKGaUR8FwWm3VCFSmSZNxej2mWu4ck 7 3NKvv85heSwz5rwAbT7KFxrHZoGGnmwZHhBW952t5Waq1yM3YtS5 3 3 1 1 9 77 3100000000000000000 jwWs7Mg1i63LEAYRUnkjzsqJvnUMmtWW9SC88jcM55k3PZ4A7c7 8 36 36 1659994080000 pending
Expand All @@ -2090,11 +2090,11 @@ COPY public.blocks (id, state_hash, parent_id, parent_hash, creator_id, block_wi
14 3NKUXRQ1G7XeZ9itcp766STsZD9EjDcf3mpYT3X7AsMrgArSq4s8 13 3NKvChb8G72hQBHzr7nn7AHrafGopf4xkzNk3bzZPjd1cDgS1LF6 3 3 1 1 15 77 3100000000000000000 jwWs7Mg1i63LEAYRUnkjzsqJvnUMmtWW9SC88jcM55k3PZ4A7c7 14 48 48 1659994440000 pending
15 3NLVZy6T83Jn1pfdcwz6GSmirP8SQYSV6Fwv2gCuKpLDcyQP13mH 14 3NKUXRQ1G7XeZ9itcp766STsZD9EjDcf3mpYT3X7AsMrgArSq4s8 3 3 1 1 16 77 3100000000000000000 jwWs7Mg1i63LEAYRUnkjzsqJvnUMmtWW9SC88jcM55k3PZ4A7c7 15 49 49 1659994470000 pending
16 3NLCqsJpwVxSC7gKUVEkCb3PmCvf3CcX52CtSG3xjhcSzopg5NZJ 15 3NLVZy6T83Jn1pfdcwz6GSmirP8SQYSV6Fwv2gCuKpLDcyQP13mH 3 3 1 1 17 77 3100000000000000000 jwWs7Mg1i63LEAYRUnkjzsqJvnUMmtWW9SC88jcM55k3PZ4A7c7 16 50 50 1659994500000 pending
17 3NLjjx7dm6Bc3D5bc2cNAecuPyhYum9PoX7DYUHGYvS3qc551j1M 16 3NLCqsJpwVxSC7gKUVEkCb3PmCvf3CcX52CtSG3xjhcSzopg5NZJ 3 3 1 1 18 77 3100000000000000000 jxtPUm7BGbv2Px4ZRdBzwQx2Hoc3dFyxzpKPKMtnYGwoUtvvRKz 17 56 56 1659994680000 pending
18 3NKmDH5RAujPGiX76vwhV6HFsAjN2vvkHjkQcveExvDywyykLeaL 17 3NLjjx7dm6Bc3D5bc2cNAecuPyhYum9PoX7DYUHGYvS3qc551j1M 3 3 1 1 19 77 3100000000000000000 jwtjm22NpfhLDDgFUKKabn9PrVbTgRLzNh3JZxK6b1AM9v5G5ur 18 57 57 1659994710000 pending
19 3NLJ3QfoaRBs2sMj2dpx1dYAgQoe9tLAFNb19ijBnyzAWafF1KBm 18 3NKmDH5RAujPGiX76vwhV6HFsAjN2vvkHjkQcveExvDywyykLeaL 3 3 1 1 20 77 3100000000000000000 jwtjm22NpfhLDDgFUKKabn9PrVbTgRLzNh3JZxK6b1AM9v5G5ur 19 60 60 1659994800000 pending
20 3NL1XVgg2DAjSjVStzXmeQnRunV7Pp1B4cYQ27VtN3Q6esAZ5ufp 19 3NLJ3QfoaRBs2sMj2dpx1dYAgQoe9tLAFNb19ijBnyzAWafF1KBm 3 3 1 1 21 77 3100000000000000000 jxf5BSTGv7SyqPPx5q6936WSurZhjUo3rVZd2gGppNKsfgL8WUY 20 65 65 1659994950000 pending
21 3NKKXz5f8zUEb5PyoW1faVfJqsHnBvzrK58XJdxoNGaMenfWcw5w 20 3NL1XVgg2DAjSjVStzXmeQnRunV7Pp1B4cYQ27VtN3Q6esAZ5ufp 3 3 1 1 22 77 3100000000000000000 jxKbMV92wzA9tWV5BVSZWqzLFkE8TM27VHM7f1fcSWwsf6kGVBh 21 68 68 1659995040000 pending
17 3NLjjx7dm6Bc3D5bc2cNAecuPyhYum9PoX7DYUHGYvS3qc551j1M 16 3NLCqsJpwVxSC7gKUVEkCb3PmCvf3CcX52CtSG3xjhcSzopg5NZJ 3 3 1 1 18 77 3100000000000000000 jxkzgEktJZGkXuWvBfAVWkeYZRs17s1M2rDPBx5ymovS3inFKsG 17 56 56 1659994680000 pending
18 3NKmDH5RAujPGiX76vwhV6HFsAjN2vvkHjkQcveExvDywyykLeaL 17 3NLjjx7dm6Bc3D5bc2cNAecuPyhYum9PoX7DYUHGYvS3qc551j1M 3 3 1 1 19 77 3100000000000000000 jxF8cFJazX4YgCGHquL1i2DMxHUeo19fuw75XyDSgRes7VmwGe7 18 57 57 1659994710000 pending
19 3NLJ3QfoaRBs2sMj2dpx1dYAgQoe9tLAFNb19ijBnyzAWafF1KBm 18 3NKmDH5RAujPGiX76vwhV6HFsAjN2vvkHjkQcveExvDywyykLeaL 3 3 1 1 20 77 3100000000000000000 jxF8cFJazX4YgCGHquL1i2DMxHUeo19fuw75XyDSgRes7VmwGe7 19 60 60 1659994800000 pending
20 3NL1XVgg2DAjSjVStzXmeQnRunV7Pp1B4cYQ27VtN3Q6esAZ5ufp 19 3NLJ3QfoaRBs2sMj2dpx1dYAgQoe9tLAFNb19ijBnyzAWafF1KBm 3 3 1 1 21 77 3100000000000000000 jxJ5pxUYZ1NYHh5Wi7EGz5ufRoxsXo3WerATFr6fBoYYhHicGMi 20 65 65 1659994950000 pending
21 3NKKXz5f8zUEb5PyoW1faVfJqsHnBvzrK58XJdxoNGaMenfWcw5w 20 3NL1XVgg2DAjSjVStzXmeQnRunV7Pp1B4cYQ27VtN3Q6esAZ5ufp 3 3 1 1 22 77 3100000000000000000 jxSPqQatMxxoZEcYDP5K7kSqX4yw6vsWyY1BpjCHg1Bkcui71Br 21 68 68 1659995040000 pending
\.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ module Accounts = struct
; sequence_state
; last_sequence_slot
; proved_state
; zkapp_uri
} ->
let%bind app_state =
if
Expand Down Expand Up @@ -157,6 +158,7 @@ module Accounts = struct
; sequence_state
; last_sequence_slot
; proved_state
; zkapp_uri
}
in
( { public_key = account.public_key
Expand All @@ -177,7 +179,6 @@ module Accounts = struct
~f:Mina_base.State_hash.of_base58_check_exn t.voting_for
; zkapp
; permissions
; zkapp_uri = Option.value ~default:"" t.zkapp_uri
}
: Mina_base.Account.t )

Expand Down Expand Up @@ -268,6 +269,7 @@ module Accounts = struct
; sequence_state
; last_sequence_slot
; proved_state
; zkapp_uri
}
->
let state = Zkapp_state.V.to_list app_state in
Expand All @@ -284,6 +286,7 @@ module Accounts = struct
; sequence_state
; last_sequence_slot
; proved_state
; zkapp_uri
} )
in
{ pk =
Expand All @@ -308,7 +311,6 @@ module Accounts = struct
; zkapp
; permissions
; token_symbol = Some account.token_symbol
; zkapp_uri = Some account.zkapp_uri
}
end

Expand Down
60 changes: 7 additions & 53 deletions src/lib/mina_base/account.ml
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@ module Poly = struct
, 'state_hash
, 'timing
, 'permissions
, 'zkapp_opt
, 'zkapp_uri )
, 'zkapp_opt )
t =
{ public_key : 'pk
; token_id : 'id
Expand All @@ -249,7 +248,6 @@ module Poly = struct
; timing : 'timing
; permissions : 'permissions
; zkapp : 'zkapp_opt
; zkapp_uri : 'zkapp_uri
}
[@@deriving sexp, equal, compare, hash, yojson, fields, hlist]

Expand Down Expand Up @@ -322,8 +320,7 @@ module Binable_arg = struct
, State_hash.Stable.V1.t
, Timing.Stable.V1.t
, Permissions.Stable.V2.t
, Zkapp_account.Stable.V2.t option
, string )
, Zkapp_account.Stable.V2.t option )
(* TODO: Cache the digest of this? *)
Poly.Stable.V2.t
[@@deriving sexp, equal, hash, compare, yojson]
Expand Down Expand Up @@ -377,8 +374,7 @@ type value =
, State_hash.t
, Timing.t
, Permissions.t
, Zkapp_account.t option
, string )
, Zkapp_account.t option )
Poly.t
[@@deriving sexp]

Expand All @@ -403,7 +399,6 @@ let initialize account_id : t =
; timing = Timing.Untimed
; permissions = Permissions.user_default
; zkapp = None
; zkapp_uri = ""
}

let hash_zkapp_account_opt = function
Expand All @@ -412,38 +407,6 @@ let hash_zkapp_account_opt = function
| Some (a : Zkapp_account.t) ->
Zkapp_account.digest a

(* This preimage cannot be attained by any string, due to the trailing [true]
added below.
*)
let zkapp_uri_non_preimage =
lazy (Random_oracle_input.Chunked.field_elements [| Field.zero; Field.zero |])

let hash_zkapp_uri_opt (zkapp_uri_opt : string option) =
let input =
match zkapp_uri_opt with
| Some zkapp_uri ->
(* We use [length*8 + 1] to pass a final [true] after the end of the
string, to ensure that trailing null bytes don't alias in the hash
preimage.
*)
let bits = Array.create ~len:((String.length zkapp_uri * 8) + 1) true in
String.foldi zkapp_uri ~init:() ~f:(fun i () c ->
let c = Char.to_int c in
(* Insert the bits into [bits], LSB order. *)
for j = 0 to 7 do
(* [Int.test_bit c j] *)
bits.((i * 8) + j) <- Int.bit_and c (1 lsl j) <> 0
done ) ;
Random_oracle_input.Chunked.packeds
(Array.map ~f:(fun b -> (field_of_bool b, 1)) bits)
| None ->
Lazy.force zkapp_uri_non_preimage
in
Random_oracle.pack_input input
|> Random_oracle.hash ~init:Hash_prefix_states.zkapp_uri

let hash_zkapp_uri (zkapp_uri : string) = hash_zkapp_uri_opt (Some zkapp_uri)

let delegate_opt = Option.value ~default:Public_key.Compressed.empty

let to_input (t : t) =
Expand All @@ -459,7 +422,6 @@ let to_input (t : t) =
~voting_for:(f State_hash.to_input) ~timing:(f Timing.to_input)
~zkapp:(f (Fn.compose field hash_zkapp_account_opt))
~permissions:(f Permissions.to_input)
~zkapp_uri:(f (Fn.compose field hash_zkapp_uri))
|> List.reduce_exn ~f:append

let crypto_hash_prefix = Hash_prefix.account
Expand All @@ -482,9 +444,8 @@ type var =
, State_hash.var
, Timing.var
, Permissions.Checked.t
, Field.Var.t * Zkapp_account.t option As_prover.Ref.t
(* TODO: This is a hack that lets us avoid unhashing zkApp accounts when we don't need to *)
, string Data_as_hash.t )
(* TODO: This is a hack that lets us avoid unhashing zkApp accounts when we don't need to *)
, Field.Var.t * Zkapp_account.t option As_prover.Ref.t )
Poly.t

let identifier_of_var ({ public_key; token_id; _ } : var) =
Expand All @@ -507,7 +468,6 @@ let typ' zkapp =
; Timing.typ
; Permissions.typ
; zkapp
; Data_as_hash.typ ~hash:hash_zkapp_uri
]
~var_to_hlist:Poly.to_hlist ~var_of_hlist:Poly.of_hlist
~value_to_hlist:Poly.to_hlist ~value_of_hlist:Poly.of_hlist
Expand Down Expand Up @@ -539,7 +499,6 @@ let var_of_t
; timing
; permissions
; zkapp
; zkapp_uri
} :
value ) =
{ Poly.public_key = Public_key.Compressed.var_of_t public_key
Expand All @@ -554,7 +513,6 @@ let var_of_t
; timing = Timing.var_of_t timing
; permissions = Permissions.Checked.constant permissions
; zkapp = Field.Var.constant (hash_zkapp_account_opt zkapp)
; zkapp_uri = Field.Var.constant (hash_zkapp_uri zkapp_uri)
}

module Checked = struct
Expand All @@ -571,8 +529,7 @@ module Checked = struct
, State_hash.var
, Timing.var
, Permissions.Checked.t
, Zkapp_account.Checked.t
, string Data_as_hash.t )
, Zkapp_account.Checked.t )
Poly.t

let typ : (t, Stable.Latest.t) Typ.t =
Expand All @@ -597,7 +554,7 @@ module Checked = struct
~receipt_chain_hash:(f Receipt.Chain_hash.var_to_input)
~delegate:(f Public_key.Compressed.Checked.to_input)
~voting_for:(f State_hash.var_to_input)
~timing:(f Timing.var_to_input) ~zkapp_uri:(f Data_as_hash.to_input) )
~timing:(f Timing.var_to_input) )

let digest t =
make_checked (fun () ->
Expand Down Expand Up @@ -695,7 +652,6 @@ let empty =
Permissions.user_default
(* TODO: This should maybe be Permissions.empty *)
; zkapp = None
; zkapp_uri = ""
}

let empty_digest = digest empty
Expand All @@ -719,7 +675,6 @@ let create account_id balance =
; timing = Timing.Untimed
; permissions = Permissions.user_default
; zkapp = None
; zkapp_uri = ""
}

let create_timed account_id balance ~initial_minimum_balance ~cliff_time
Expand Down Expand Up @@ -756,7 +711,6 @@ let create_timed account_id balance ~initial_minimum_balance ~cliff_time
; vesting_period
; vesting_increment
}
; zkapp_uri = ""
}

(* no vesting after cliff time + 1 slot *)
Expand Down
8 changes: 4 additions & 4 deletions src/lib/mina_base/account_update.ml
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ module Update = struct
; Set_or_keep.to_input permissions ~dummy:Permissions.user_default
~f:Permissions.to_input
; Set_or_keep.to_input
(Set_or_keep.map ~f:Account.hash_zkapp_uri zkapp_uri)
~dummy:(Account.hash_zkapp_uri_opt None)
(Set_or_keep.map ~f:Zkapp_account.hash_zkapp_uri zkapp_uri)
~dummy:(Zkapp_account.hash_zkapp_uri_opt None)
~f:field
; Set_or_keep.to_input token_symbol ~dummy:Account.Token_symbol.default
~f:Account.Token_symbol.to_input
Expand Down Expand Up @@ -535,8 +535,8 @@ module Update = struct
} ) )
; Set_or_keep.typ ~dummy:Permissions.user_default Permissions.typ
; Set_or_keep.optional_typ
(Data_as_hash.optional_typ ~hash:Account.hash_zkapp_uri
~non_preimage:(Account.hash_zkapp_uri_opt None)
(Data_as_hash.optional_typ ~hash:Zkapp_account.hash_zkapp_uri
~non_preimage:(Zkapp_account.hash_zkapp_uri_opt None)
~dummy_value:"" )
~to_option:Fn.id ~of_option:Fn.id
; Set_or_keep.typ ~dummy:Account.Token_symbol.default
Expand Down
Loading