@@ -44,9 +44,9 @@ mod transaction_v1_builder;
4444use serde:: Serialize ;
4545
4646#[ cfg( doc) ]
47- use casper_types:: { account:: AccountHash , Key } ;
47+ use casper_types:: account:: AccountHash ;
4848
49- use casper_types:: { Digest , URef } ;
49+ use casper_types:: { CLValue , Digest , Key , SystemHashRegistry , URef } ;
5050
5151use crate :: {
5252 rpcs:: {
@@ -71,8 +71,9 @@ use crate::{Account, Block, Error, StoredValue, Transfer};
7171use casper_types:: PublicKey ;
7272#[ cfg( feature = "std-fs-io" ) ]
7373pub use deploy:: {
74- make_deploy, make_transfer, put_deploy, send_deploy_file, sign_deploy_file,
75- speculative_put_deploy, speculative_send_deploy_file, speculative_transfer, transfer,
74+ make_deploy, make_transfer, put_deploy, put_deploy_with_min_bid_override, send_deploy_file,
75+ sign_deploy_file, speculative_put_deploy, speculative_send_deploy_file, speculative_transfer,
76+ transfer,
7677} ;
7778pub use deploy_builder:: { DeployBuilder , DeployBuilderError } ;
7879pub use deploy_str_params:: DeployStrParams ;
@@ -82,10 +83,12 @@ pub(crate) use fields_container::{FieldsContainer, FieldsContainerError};
8283pub use json_args:: {
8384 help as json_args_help, Error as JsonArgsError , ErrorDetails as JsonArgsErrorDetails , JsonArg ,
8485} ;
86+ pub use parse:: arg_simple:: session:: parse as arg_simple_session_parse;
87+ pub use parse:: args_json:: session:: parse as arg_json_session_parse;
8588pub use payment_str_params:: PaymentStrParams ;
8689pub use session_str_params:: SessionStrParams ;
8790pub use simple_args:: { help as simple_args_help, insert_arg} ;
88- pub use transaction:: { make_transaction, put_transaction} ;
91+ pub use transaction:: { get_maybe_secret_key , make_transaction, put_transaction} ;
8992#[ cfg( feature = "std-fs-io" ) ]
9093pub use transaction:: {
9194 send_transaction_file, sign_transaction_file, speculative_send_transaction_file,
@@ -512,6 +515,32 @@ pub async fn get_auction_info(
512515 . map_err ( CliError :: from)
513516}
514517
518+ /// Retrieve the system hash registry
519+ pub async fn get_system_hash_registry (
520+ node_address : & str ,
521+ verbosity_level : u64 ,
522+ state_root_hash : & str ,
523+ ) -> Result < SystemHashRegistry , CliError > {
524+ let key = Key :: SystemEntityRegistry . to_formatted_string ( ) ;
525+ let response = query_global_state (
526+ "" ,
527+ node_address,
528+ verbosity_level,
529+ "" ,
530+ state_root_hash,
531+ & key,
532+ "" ,
533+ )
534+ . await ?
535+ . result
536+ . stored_value
537+ . into_cl_value ( )
538+ . ok_or_else ( || CliError :: FailedToGetSystemHashRegistry ) ?;
539+
540+ CLValue :: to_t :: < SystemHashRegistry > ( & response)
541+ . map_err ( |err| CliError :: InvalidCLValue ( err. to_string ( ) ) )
542+ }
543+
515544/// Retrieves the status changes of the active validators on the network.
516545///
517546/// For details of the parameters, see [the module docs](crate::cli#common-parameters).
0 commit comments