@@ -54,10 +54,12 @@ pub async fn query_epoch(args: args::Query) -> Epoch {
5454/// Query the raw bytes of given storage key
5555pub async fn query_raw_bytes ( _ctx : Context , args : args:: QueryRawBytes ) {
5656 let client = HttpClient :: new ( args. query . ledger_address ) . unwrap ( ) ;
57- let bytes = unwrap_client_response (
58- RPC . shell ( ) . storage_value ( & client, & args. storage_key ) . await ,
57+ let response = unwrap_client_response (
58+ RPC . shell ( )
59+ . storage_value ( & client, None , None , false , & args. storage_key )
60+ . await ,
5961 ) ;
60- match bytes {
62+ match response . data {
6163 Some ( bytes) => println ! ( "Found data: 0x{}" , HEXLOWER . encode( & bytes) ) ,
6264 None => println ! ( "No data found for key {}" , args. storage_key) ,
6365 }
@@ -1032,9 +1034,7 @@ pub async fn dry_run_tx(ledger_address: &TendermintAddress, tx_bytes: Vec<u8>) {
10321034 let client = HttpClient :: new ( ledger_address. clone ( ) ) . unwrap ( ) ;
10331035 let ( data, height, prove) = ( Some ( tx_bytes) , None , false ) ;
10341036 let result = unwrap_client_response (
1035- RPC . shell ( )
1036- . dry_run_tx_with_options ( & client, data, height, prove)
1037- . await ,
1037+ RPC . shell ( ) . dry_run_tx ( & client, data, height, prove) . await ,
10381038 )
10391039 . data ;
10401040 println ! ( "Dry-run result: {}" , result) ;
@@ -1249,9 +1249,12 @@ pub async fn query_storage_value<T>(
12491249where
12501250 T : BorshDeserialize ,
12511251{
1252- let bytes =
1253- unwrap_client_response ( RPC . shell ( ) . storage_value ( client, key) . await ) ;
1254- bytes. map ( |bytes| {
1252+ let response = unwrap_client_response (
1253+ RPC . shell ( )
1254+ . storage_value ( client, None , None , false , key)
1255+ . await ,
1256+ ) ;
1257+ response. data . map ( |bytes| {
12551258 T :: try_from_slice ( & bytes[ ..] ) . unwrap_or_else ( |err| {
12561259 eprintln ! ( "Error decoding the value: {}" , err) ;
12571260 cli:: safe_exit ( 1 )
@@ -1269,8 +1272,11 @@ pub async fn query_storage_prefix<T>(
12691272where
12701273 T : BorshDeserialize ,
12711274{
1272- let values =
1273- unwrap_client_response ( RPC . shell ( ) . storage_prefix ( client, key) . await ) ;
1275+ let values = unwrap_client_response (
1276+ RPC . shell ( )
1277+ . storage_prefix ( client, None , None , false , key)
1278+ . await ,
1279+ ) ;
12741280 let decode =
12751281 |PrefixValue { key, value } : PrefixValue | match T :: try_from_slice (
12761282 & value[ ..] ,
@@ -1284,10 +1290,10 @@ where
12841290 }
12851291 Ok ( value) => Some ( ( key, value) ) ,
12861292 } ;
1287- if values. is_empty ( ) {
1293+ if values. data . is_empty ( ) {
12881294 None
12891295 } else {
1290- Some ( values. into_iter ( ) . filter_map ( decode) )
1296+ Some ( values. data . into_iter ( ) . filter_map ( decode) )
12911297 }
12921298}
12931299
0 commit comments