From 1fe72769551c5d27d678f153e9344cc578d97971 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Fri, 21 Nov 2025 16:35:25 +0100 Subject: [PATCH 1/6] Proto/CLST: add total supply to storage Co-authored-by: Pierrick Couderc --- src/proto_alpha/lib_protocol/clst_storage.ml | 12 ++++++++---- src/proto_alpha/lib_protocol/script_native.ml | 16 ++++++++++------ .../lib_protocol/script_native_repr.ml | 7 ++++++- .../lib_protocol/script_native_types.ml | 9 +++++++-- .../lib_protocol/script_native_types.mli | 4 +++- 5 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/proto_alpha/lib_protocol/clst_storage.ml b/src/proto_alpha/lib_protocol/clst_storage.ml index dda304075737..e3be977acafa 100644 --- a/src/proto_alpha/lib_protocol/clst_storage.ml +++ b/src/proto_alpha/lib_protocol/clst_storage.ml @@ -41,9 +41,9 @@ let get_storage ctxt = identity ctxt storage | None -> return (None, ctxt) -let get_balance_from_storage ctxt storage contract = +let get_balance_from_storage ctxt (ledger, _total_supply) contract = let open Lwt_result_syntax in - let* balance, ctxt = Script_big_map.get ctxt contract storage in + let* balance, ctxt = Script_big_map.get ctxt contract ledger in return (Option.value balance ~default:Script_int.zero_n, ctxt) let get_balance ctxt contract = @@ -60,5 +60,9 @@ let get_balance ctxt contract = | Some storage -> get_balance_from_storage ctxt storage contract | None -> return (Script_int.zero_n, ctxt) -let set_balance_from_storage ctxt storage contract amount = - Script_big_map.update ctxt contract (Some amount) storage +let set_balance_from_storage ctxt (ledger, total_supply) contract amount = + let open Lwt_result_syntax in + let* ledger, ctxt = + Script_big_map.update ctxt contract (Some amount) ledger + in + return ((ledger, total_supply), ctxt) diff --git a/src/proto_alpha/lib_protocol/script_native.ml b/src/proto_alpha/lib_protocol/script_native.ml index f53b52c678f9..493d92d50c2f 100644 --- a/src/proto_alpha/lib_protocol/script_native.ml +++ b/src/proto_alpha/lib_protocol/script_native.ml @@ -44,10 +44,12 @@ module CLST_contract = struct |> Script_int.of_int64 |> Script_int.abs in let new_amount = Script_int.(add_n added_amount amount) in - let* new_ledger, ctxt = + let* new_storage, ctxt = Clst_storage.set_balance_from_storage ctxt storage address new_amount in - return ((Script_list.empty, new_ledger), ctxt) + let new_ledger, total_supply = new_storage in + let total_supply = Script_int.add_n total_supply added_amount in + return ((Script_list.empty, (new_ledger, total_supply)), ctxt) let execute_withdraw (ctxt, (step_constants : Script_typed_ir.step_constants)) (amount : withdraw) (storage : storage) : @@ -86,7 +88,7 @@ module CLST_contract = struct else return amount in let new_amount = Script_int.(abs (sub current_amount removed_amount)) in - let* new_ledger, ctxt = + let* new_storage, ctxt = Clst_storage.set_balance_from_storage ctxt storage address new_amount in let amount_tez = @@ -106,7 +108,9 @@ module CLST_contract = struct () in let ctxt = Local_gas_counter.update_context gas_counter outdated_ctxt in - return ((Script_list.of_list [op], new_ledger), ctxt) + let new_ledger, total_supply = new_storage in + let total_supply = Script_int.(abs (sub total_supply removed_amount)) in + return ((Script_list.of_list [op], (new_ledger, total_supply)), ctxt) let execute (ctxt, (step_constants : step_constants)) (value : arg) (storage : storage) = @@ -121,10 +125,10 @@ module CLST_contract = struct let* name = Script_string.of_string "get_balance" in let* ty = CLST_types.balance_view_ty in let implementation (ctxt, _step_constants) ((address : address), token_id) - (ledger : storage) = + (storage : storage) = let open Lwt_result_syntax in if Compare.Int.(Script_int.compare token_id Clst_storage.token_id = 0) - then Clst_storage.get_balance_from_storage ctxt ledger address + then Clst_storage.get_balance_from_storage ctxt storage address else return (Script_int.zero_n, ctxt) in return (Ex_view {name; ty; implementation}) diff --git a/src/proto_alpha/lib_protocol/script_native_repr.ml b/src/proto_alpha/lib_protocol/script_native_repr.ml index ded04889b2ab..8f073a718566 100644 --- a/src/proto_alpha/lib_protocol/script_native_repr.ml +++ b/src/proto_alpha/lib_protocol/script_native_repr.ml @@ -11,7 +11,12 @@ type with_storage = {kind : t; storage : Script_repr.lazy_expr} module CLST_contract = struct let initial_storage = - Micheline.(Seq (dummy_location, [])) + Micheline.( + Prim + ( dummy_location, + Michelson_v1_primitives.D_Pair, + [Seq (dummy_location, []); Int (dummy_location, Z.zero)], + [] )) |> Micheline.strip_locations |> Script_repr.lazy_expr let with_initial_storage = {kind = CLST; storage = initial_storage} diff --git a/src/proto_alpha/lib_protocol/script_native_types.ml b/src/proto_alpha/lib_protocol/script_native_types.ml index c4b55058e900..50f1f4a6ccad 100644 --- a/src/proto_alpha/lib_protocol/script_native_types.ml +++ b/src/proto_alpha/lib_protocol/script_native_types.ml @@ -139,7 +139,9 @@ module CLST_types = struct type ledger = (address, nat) big_map - type storage = ledger + type total_supply = nat + + type storage = ledger * total_supply let deposit_type : (deposit ty_node * deposit entrypoints_node) tzresult = make_entrypoint_leaf "deposit" (unit_ty ()) @@ -154,7 +156,10 @@ module CLST_types = struct let* arg_type = make_entrypoint_node deposit_type withdraw_type in return (finalize_entrypoint arg_type) - let storage_type : storage ty_node tzresult = address_big_map_ty (nat_ty ()) + let storage_type : storage ty_node tzresult = + let open Result_syntax in + let* ledger_ty = address_big_map_ty (nat_ty ()) in + pair_ty ledger_ty (nat_ty ()) type balance_view = (address * nat, nat) view_type diff --git a/src/proto_alpha/lib_protocol/script_native_types.mli b/src/proto_alpha/lib_protocol/script_native_types.mli index 0ac294a9d0d2..3d5b50544113 100644 --- a/src/proto_alpha/lib_protocol/script_native_types.mli +++ b/src/proto_alpha/lib_protocol/script_native_types.mli @@ -27,7 +27,9 @@ module CLST_types : sig type ledger = (address, nat) big_map - type storage = ledger + type total_supply = nat + + type storage = ledger * total_supply type balance_view = (address * nat, nat) view_type -- GitLab From 003abf163efd2a6f33250b3adbfafd89fcb612e8 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Fri, 21 Nov 2025 16:52:47 +0100 Subject: [PATCH 2/6] Proto/CLST: add get_total_supply view --- src/proto_alpha/lib_protocol/script_native.ml | 29 +++++++++++++++---- .../lib_protocol/script_native_types.ml | 5 ++++ .../lib_protocol/script_native_types.mli | 4 +++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/proto_alpha/lib_protocol/script_native.ml b/src/proto_alpha/lib_protocol/script_native.ml index 493d92d50c2f..ca6088cc04e5 100644 --- a/src/proto_alpha/lib_protocol/script_native.ml +++ b/src/proto_alpha/lib_protocol/script_native.ml @@ -133,14 +133,33 @@ module CLST_contract = struct in return (Ex_view {name; ty; implementation}) + let total_supply : storage ex_view tzresult = + let open Result_syntax in + let* name = Script_string.of_string "get_total_supply" in + let implementation (ctxt, _step_constants) (() : unit) + ((_ledger, total_supply) : storage) = + let open Lwt_result_syntax in + return (total_supply, ctxt) + in + return + (Ex_view {name; ty = CLST_types.total_supply_view_ty; implementation}) + let view_map : storage Script_native_types.view_map tzresult = let open Result_syntax in let* (Ex_view {name = get_balance_name; _} as get_balance) = balance in - return - @@ Script_map.update - get_balance_name - (Some get_balance) - (Script_map.empty string_t) + let* (Ex_view {name = get_total_supply_name; _} as get_total_supply) = + total_supply + in + let view_map = + Script_map.update + get_balance_name + (Some get_balance) + (Script_map.empty string_t) + in + let view_map = + Script_map.update get_total_supply_name (Some get_total_supply) view_map + in + return view_map end end diff --git a/src/proto_alpha/lib_protocol/script_native_types.ml b/src/proto_alpha/lib_protocol/script_native_types.ml index 50f1f4a6ccad..24f7d2828944 100644 --- a/src/proto_alpha/lib_protocol/script_native_types.ml +++ b/src/proto_alpha/lib_protocol/script_native_types.ml @@ -163,10 +163,15 @@ module CLST_types = struct type balance_view = (address * nat, nat) view_type + type total_supply_view = (unit, nat) view_type + let balance_view_ty = let open Result_syntax in let* {typed = input_ty; _} = pair_ty (address_ty ()) (nat_ty ()) in return {input_ty; output_ty = (nat_ty ()).typed} + + let total_supply_view_ty = + {input_ty = (unit_ty ()).typed; output_ty = (nat_ty ()).typed} end type ('arg, 'storage) kind = diff --git a/src/proto_alpha/lib_protocol/script_native_types.mli b/src/proto_alpha/lib_protocol/script_native_types.mli index 3d5b50544113..c81288ad0f74 100644 --- a/src/proto_alpha/lib_protocol/script_native_types.mli +++ b/src/proto_alpha/lib_protocol/script_native_types.mli @@ -33,7 +33,11 @@ module CLST_types : sig type balance_view = (address * nat, nat) view_type + type total_supply_view = (unit, nat) view_type + val balance_view_ty : balance_view tzresult + + val total_supply_view_ty : total_supply_view end (** Typed equivalent of `Script_native_repr.kind` *) -- GitLab From 8464c49cf3e102c3d37642f42ccb4c9a8e1a66ed Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Fri, 21 Nov 2025 19:13:59 +0100 Subject: [PATCH 3/6] Proto/Plugin/CLST: add total_supply RPC --- .../lib_plugin/contract_services.ml | 20 ++++++++++++++++--- .../lib_plugin/contract_services.mli | 5 +++++ src/proto_alpha/lib_protocol/clst_storage.ml | 10 ++++++++++ src/proto_alpha/lib_protocol/clst_storage.mli | 4 ++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/proto_alpha/lib_plugin/contract_services.ml b/src/proto_alpha/lib_plugin/contract_services.ml index a3345fd89edb..27ec17dd7e15 100644 --- a/src/proto_alpha/lib_plugin/contract_services.ml +++ b/src/proto_alpha/lib_plugin/contract_services.ml @@ -399,11 +399,22 @@ module S = struct ~output:Script_int.n_encoding RPC_path.(custom_root /: Contract.rpc_arg / "clst_balance") - let register_balance () = + let total_supply_service = + RPC_service.get_service + ~description:"Returns the total supply of CLST tokens." + ~query:RPC_query.empty + ~output:Script_int.n_encoding + RPC_path.(open_root / "context" / "clst" / "total_supply") + + let register () = register1 ~chunked:false balance_service (fun ctxt contract () () -> let open Lwt_result_syntax in let* balance, _ = Clst_storage.get_balance ctxt contract in - return balance) + return balance) ; + register0 ~chunked:false total_supply_service (fun ctxt () () -> + let open Lwt_result_syntax in + let* total_supply, _ = Clst_storage.get_total_supply ctxt in + return total_supply) end end @@ -790,7 +801,7 @@ let register () = Contract.For_RPC.get_estimated_own_pending_slashed_amount ctxt contract) ; S.Sapling.register () ; - S.CLST.register_balance () + S.CLST.register () let list ctxt block = RPC_context.make_call0 S.list ctxt block () () @@ -904,3 +915,6 @@ let single_sapling_get_diff ctxt block id ?offset_commitment ?offset_nullifier let clst_balance ctxt block contract = RPC_context.make_call1 S.CLST.balance_service ctxt block contract () () + +let clst_total_supply ctxt block = + RPC_context.make_call0 S.CLST.total_supply_service ctxt block () () diff --git a/src/proto_alpha/lib_plugin/contract_services.mli b/src/proto_alpha/lib_plugin/contract_services.mli index dda794586b34..8f05e90722e9 100644 --- a/src/proto_alpha/lib_plugin/contract_services.mli +++ b/src/proto_alpha/lib_plugin/contract_services.mli @@ -194,6 +194,11 @@ val clst_balance : Contract.t -> Script_int.n Script_int.num shell_tzresult Lwt.t +val clst_total_supply : + 'a #RPC_context.simple -> + 'a -> + Script_int.n Script_int.num shell_tzresult Lwt.t + val register : unit -> unit (** Functions used in the implementation of this file's RPCs, but also diff --git a/src/proto_alpha/lib_protocol/clst_storage.ml b/src/proto_alpha/lib_protocol/clst_storage.ml index e3be977acafa..8471a77c4d83 100644 --- a/src/proto_alpha/lib_protocol/clst_storage.ml +++ b/src/proto_alpha/lib_protocol/clst_storage.ml @@ -66,3 +66,13 @@ let set_balance_from_storage ctxt (ledger, total_supply) contract amount = Script_big_map.update ctxt contract (Some amount) ledger in return ((ledger, total_supply), ctxt) + +let get_total_supply ctxt = + let open Lwt_result_syntax in + let* storage_opt, ctxt = get_storage ctxt in + let total_supply = + match storage_opt with + | Some (_ledger, total_supply) -> total_supply + | None -> Script_int.zero_n + in + return (total_supply, ctxt) diff --git a/src/proto_alpha/lib_protocol/clst_storage.mli b/src/proto_alpha/lib_protocol/clst_storage.mli index f90528b91a0d..9c030e1b8111 100644 --- a/src/proto_alpha/lib_protocol/clst_storage.mli +++ b/src/proto_alpha/lib_protocol/clst_storage.mli @@ -42,3 +42,7 @@ val set_balance_from_storage : address -> CLST_types.nat -> (CLST_types.storage * context) tzresult Lwt.t + +(** [get_total_supply context] returns the total supply of CLST tokens + in the CLST contract. *) +val get_total_supply : context -> (CLST_types.nat * context) tzresult Lwt.t -- GitLab From 8de4183b0d22a462755aa5c3550bb85afaa4c57e Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Wed, 3 Dec 2025 10:32:09 +0100 Subject: [PATCH 4/6] Proto/Test: add tests for total_supply view and RPC --- .../test/integration/test_clst.ml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/src/proto_alpha/lib_protocol/test/integration/test_clst.ml b/src/proto_alpha/lib_protocol/test/integration/test_clst.ml index 2d92a0184d59..954dfaaeedea 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_clst.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_clst.ml @@ -333,3 +333,85 @@ let () = let amount = Tez.to_mutez amount in let* () = Assert.equal_int64 ~loc:__LOC__ amount balance in return_unit + +let test_total_supply (total_supply_f : Block.t -> int64 tzresult Lwt.t) = + let open Lwt_result_wrap_syntax in + let* b, funder = Context.init1 ~consensus_threshold_size:0 () in + let initial_bal_mutez = 300_000_000L in + let* account_a, b = + create_funded_account ~funder ~amount_mutez:initial_bal_mutez b + in + let* account_b, b = + create_funded_account ~funder ~amount_mutez:initial_bal_mutez b + in + let initial_clst_bal_mutez_a = 200_000_000L in + let initial_clst_bal_mutez_b = 50_000_000L in + let* deposit_a_tx = + Op.clst_deposit + ~force_reveal:true + ~fee:Tez.zero + (B b) + account_a + (Tez.of_mutez_exn initial_clst_bal_mutez_a) + in + let* deposit_b_tx = + Op.clst_deposit + ~force_reveal:true + ~fee:Tez.zero + (B b) + account_b + (Tez.of_mutez_exn initial_clst_bal_mutez_b) + in + let* b = Block.bake ~operations:[deposit_a_tx; deposit_b_tx] b in + let* total_supply = total_supply_f b in + let expected_total_supply = + Int64.add initial_clst_bal_mutez_a initial_clst_bal_mutez_b + in + let* () = + Assert.equal_int64 ~loc:__LOC__ total_supply expected_total_supply + in + let withdrawal_amount_mutez = 40_000_000L in + let* withdraw_tx = + Op.clst_withdraw ~fee:Tez.zero (B b) account_a withdrawal_amount_mutez + in + let* b = Block.bake ~operation:withdraw_tx b in + let* total_supply = total_supply_f b in + let expected_total_supply = + Int64.sub expected_total_supply withdrawal_amount_mutez + in + Assert.equal_int64 ~loc:__LOC__ total_supply expected_total_supply + +let () = + register_test ~title:"Test get_total_supply view" @@ fun () -> + test_total_supply (fun b -> + let open Lwt_result_wrap_syntax in + let* clst_hash = get_clst_hash (B b) in + let* total_supply = + run_view + ~contract:clst_hash + ~view_name:"get_total_supply" + ~input: + Environment.Micheline.( + Prim (dummy_location, Script.D_Unit, [], []) |> strip_locations) + b + in + let total_supply = + match total_supply |> Environment.Micheline.root with + | Environment.Micheline.Int (_, balance_z) -> balance_z |> Z.to_int64 + | _ -> Test.fail "Unexpected output" + in + return total_supply) + +let () = + register_test ~title:"Test total_supply RPC" @@ fun () -> + test_total_supply (fun b -> + let open Lwt_result_syntax in + let* total_supply = + Plugin.Contract_services.clst_total_supply Block.rpc_ctxt b + in + let total_supply = + Option.value_f + ~default:(fun () -> assert false) + (Script_int.to_int64 total_supply) + in + return total_supply) -- GitLab From 9152af2e1e083ecf534bb3710620e08fe5586cf3 Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Thu, 11 Dec 2025 16:35:49 +0100 Subject: [PATCH 5/6] Tezt/Tests: add tests for clst_balance and clst total_supply RPCs --- tezt/lib_tezos/RPC.ml | 23 +++++++++++++++++++++++ tezt/lib_tezos/RPC.mli | 14 ++++++++++++++ tezt/tests/RPC_test.ml | 22 ++++++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/tezt/lib_tezos/RPC.ml b/tezt/lib_tezos/RPC.ml index 7ada6f51c6b1..aaa622cec127 100644 --- a/tezt/lib_tezos/RPC.ml +++ b/tezt/lib_tezos/RPC.ml @@ -2082,3 +2082,26 @@ let get_chain_block_context_destination_index ?(chain = "main") "index"; ] @@ JSON.as_int_opt + +let get_chain_block_context_clst_total_supply ?(chain = "main") + ?(block = "head") () = + make + GET + ["chains"; chain; "blocks"; block; "context"; "clst"; "total_supply"] + Fun.id + +let get_chain_block_context_contract_clst_balance ?(chain = "main") + ?(block = "head") ~id () = + make + GET + [ + "chains"; + chain; + "blocks"; + block; + "context"; + "contracts"; + id; + "clst_balance"; + ] + Fun.id diff --git a/tezt/lib_tezos/RPC.mli b/tezt/lib_tezos/RPC.mli index 30f870b5143d..5cc3180679ab 100644 --- a/tezt/lib_tezos/RPC.mli +++ b/tezt/lib_tezos/RPC.mli @@ -1503,3 +1503,17 @@ val get_abaab_activation_level : [block] defaults to ["head"]. *) val get_chain_block_context_destination_index : ?chain:string -> ?block:string -> string -> int option t + +(** RPC: [GET /chains//blocks//context/clst/total_supply] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_clst_total_supply : + ?chain:string -> ?block:string -> unit -> JSON.t t + +(** RPC: [GET /chains//blocks//context/contracts//clst_balance] + + [chain] defaults to ["main"]. + [block] defaults to ["head"]. *) +val get_chain_block_context_contract_clst_balance : + ?chain:string -> ?block:string -> id:string -> unit -> JSON.t t diff --git a/tezt/tests/RPC_test.ml b/tezt/tests/RPC_test.ml index 55005fbf12cd..7c11e8654465 100644 --- a/tezt/tests/RPC_test.ml +++ b/tezt/tests/RPC_test.ml @@ -463,6 +463,19 @@ let test_adaptive_issuance ~contracts ?endpoint client = in unit +let test_clst ~contracts ?endpoint client = + Log.info "Test CLST parameters retrieval" ; + let* _ = + Client.RPC.call ?endpoint ~hooks client + @@ RPC.get_chain_block_context_clst_total_supply () + in + let bootstrap = List.hd contracts in + let* _ = + Client.RPC.call ?endpoint ~hooks client + @@ RPC.get_chain_block_context_contract_clst_balance ~id:bootstrap () + in + unit + let test_delegates_on_registered_hangzhou ~contracts ?endpoint client = Log.info "Test implicit baker contract" ; @@ -661,6 +674,11 @@ let test_adaptive_issuance _test_mode_tag (_ : Protocol.t) ?endpoint client = let* contracts = get_contracts ?endpoint client in test_adaptive_issuance ~contracts ?endpoint client +(* Test the CLST RPC. *) +let test_clst _test_mode_tag (_ : Protocol.t) ?endpoint client = + let* contracts = get_contracts ?endpoint client in + test_clst ~contracts ?endpoint client + (* Test the votes RPC. *) let test_votes _test_mode_tag _protocol ?endpoint client = (* initialize data *) @@ -1691,6 +1709,10 @@ let register protocols = check_rpc_regression "adaptive_issuance" ~test_function:test_adaptive_issuance ; + check_rpc_regression + ~supports:Protocol.(From_protocol 25) + "clst" + ~test_function:test_clst ; check_rpc_regression "votes" ~test_function:test_votes -- GitLab From c9a20ca09b21a4971a567db1498812dac9cbc1cd Mon Sep 17 00:00:00 2001 From: Marina Polubelova Date: Thu, 11 Dec 2025 16:36:35 +0100 Subject: [PATCH 6/6] Tezt/Tests: reset regressions --- ...ode client) RPC regression tests- clst.out | 24 +++++++++++++++++++ ...mode light) RPC regression tests- clst.out | 24 +++++++++++++++++++ ...mode proxy) RPC regression tests- clst.out | 24 +++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- clst.out create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- clst.out create mode 100644 tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- clst.out diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- clst.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- clst.out new file mode 100644 index 000000000000..6f9622f45c6d --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode client) RPC regression tests- clst.out @@ -0,0 +1,24 @@ + +./octez-client rpc get /chains/main/blocks/head/context/contracts +[ "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]" ] + +./octez-client rpc get /chains/main/blocks/head/context/delegates +[ "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]" ] + +./octez-client rpc get /chains/main/blocks/head/context/clst/total_supply +"0" + +./octez-client rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/clst_balance' +"0" diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- clst.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- clst.out new file mode 100644 index 000000000000..2e521f5189ea --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode light) RPC regression tests- clst.out @@ -0,0 +1,24 @@ + +./octez-client --mode light rpc get /chains/main/blocks/head/context/contracts +[ "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]" ] + +./octez-client --mode light rpc get /chains/main/blocks/head/context/delegates +[ "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]" ] + +./octez-client --mode light rpc get /chains/main/blocks/head/context/clst/total_supply +"0" + +./octez-client --mode light rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/clst_balance' +"0" diff --git a/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- clst.out b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- clst.out new file mode 100644 index 000000000000..37f428006d84 --- /dev/null +++ b/tezt/tests/expected/RPC_test.ml/Alpha- (mode proxy) RPC regression tests- clst.out @@ -0,0 +1,24 @@ + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/contracts +[ "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[CONTRACT_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]" ] + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/delegates +[ "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]", + "[PUBLIC_KEY_HASH]" ] + +./octez-client --mode proxy rpc get /chains/main/blocks/head/context/clst/total_supply +"0" + +./octez-client --mode proxy rpc get '/chains/main/blocks/head/context/contracts/[PUBLIC_KEY_HASH]/clst_balance' +"0" -- GitLab