@@ -141,7 +141,7 @@ pub async fn put_deploy(
141141 verbosity : Verbosity ,
142142 deploy : Deploy ,
143143) -> Result < SuccessResponse < PutDeployResult > , Error > {
144- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
144+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
145145 . send_request ( PUT_DEPLOY_METHOD , Some ( PutDeployParams :: new ( deploy) ) )
146146 . await
147147}
@@ -157,7 +157,7 @@ pub async fn put_transaction(
157157 verbosity : Verbosity ,
158158 transaction : Transaction ,
159159) -> Result < SuccessResponse < PutTransactionResult > , Error > {
160- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
160+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
161161 . send_request (
162162 PUT_TRANSACTION_METHOD ,
163163 Some ( PutTransactionParams :: new ( transaction) ) ,
@@ -177,7 +177,7 @@ pub async fn speculative_exec(
177177 verbosity : Verbosity ,
178178 deploy : Deploy ,
179179) -> Result < SuccessResponse < SpeculativeExecResult > , Error > {
180- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
180+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
181181 . send_request (
182182 SPECULATIVE_EXEC_METHOD ,
183183 Some ( SpeculativeExecParams :: new ( deploy) ) ,
@@ -196,7 +196,7 @@ pub async fn speculative_exec_txn(
196196 verbosity : Verbosity ,
197197 transaction : Transaction ,
198198) -> Result < SuccessResponse < SpeculativeExecTxnResult > , Error > {
199- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
199+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
200200 . send_request (
201201 SPECULATIVE_EXEC_TXN_METHOD ,
202202 Some ( SpeculativeExecTxnParams :: new ( transaction) ) ,
@@ -318,7 +318,7 @@ pub async fn get_deploy(
318318 deploy_hash : DeployHash ,
319319 finalized_approvals : bool ,
320320) -> Result < SuccessResponse < GetDeployResult > , Error > {
321- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
321+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
322322 . send_request (
323323 GET_DEPLOY_METHOD ,
324324 Some ( GetDeployParams :: new ( deploy_hash, finalized_approvals) ) ,
@@ -341,7 +341,7 @@ pub async fn get_transaction(
341341 transaction_hash : TransactionHash ,
342342 finalized_approvals : bool ,
343343) -> Result < SuccessResponse < GetTransactionResult > , Error > {
344- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
344+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
345345 . send_request (
346346 GET_TRANSACTION_METHOD ,
347347 Some ( GetTransactionParams :: new (
@@ -364,7 +364,7 @@ pub async fn get_block(
364364 maybe_block_identifier : Option < BlockIdentifier > ,
365365) -> Result < SuccessResponse < GetBlockResult > , Error > {
366366 let params = maybe_block_identifier. map ( GetBlockParams :: new) ;
367- let success_response = JsonRpcCall :: new ( rpc_id, node_address, verbosity)
367+ let success_response = JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
368368 . send_request ( GET_BLOCK_METHOD , params)
369369 . await ?;
370370 validation:: validate_get_block_result ( maybe_block_identifier, & success_response. result ) ?;
@@ -383,7 +383,7 @@ pub async fn get_block_transfers(
383383 maybe_block_identifier : Option < BlockIdentifier > ,
384384) -> Result < SuccessResponse < GetBlockTransfersResult > , Error > {
385385 let params = maybe_block_identifier. map ( GetBlockTransfersParams :: new) ;
386- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
386+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
387387 . send_request ( GET_BLOCK_TRANSFERS_METHOD , params)
388388 . await
389389}
@@ -400,7 +400,7 @@ pub async fn get_state_root_hash(
400400 maybe_block_identifier : Option < BlockIdentifier > ,
401401) -> Result < SuccessResponse < GetStateRootHashResult > , Error > {
402402 let params = maybe_block_identifier. map ( GetStateRootHashParams :: new) ;
403- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
403+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
404404 . send_request ( GET_STATE_ROOT_HASH_METHOD , params)
405405 . await
406406}
@@ -417,7 +417,7 @@ pub async fn get_era_summary(
417417 maybe_block_identifier : Option < BlockIdentifier > ,
418418) -> Result < SuccessResponse < GetEraSummaryResult > , Error > {
419419 let params = maybe_block_identifier. map ( GetEraSummaryParams :: new) ;
420- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
420+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
421421 . send_request ( GET_ERA_SUMMARY_METHOD , params)
422422 . await
423423}
@@ -445,7 +445,7 @@ pub async fn query_global_state(
445445 path : Vec < String > ,
446446) -> Result < SuccessResponse < QueryGlobalStateResult > , Error > {
447447 let params = QueryGlobalStateParams :: new ( global_state_identifier, key, path) ;
448- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
448+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
449449 . send_request ( QUERY_GLOBAL_STATE_METHOD , Some ( params) )
450450 . await
451451}
@@ -463,7 +463,7 @@ pub async fn query_balance(
463463 purse_identifier : PurseIdentifier ,
464464) -> Result < SuccessResponse < QueryBalanceResult > , Error > {
465465 let params = QueryBalanceParams :: new ( maybe_global_state_identifier, purse_identifier) ;
466- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
466+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
467467 . send_request ( QUERY_BALANCE_METHOD , Some ( params) )
468468 . await
469469}
@@ -481,7 +481,7 @@ pub async fn query_balance_details(
481481 purse_identifier : PurseIdentifier ,
482482) -> Result < SuccessResponse < QueryBalanceDetailsResult > , Error > {
483483 let params = QueryBalanceDetailsParams :: new ( maybe_global_state_identifier, purse_identifier) ;
484- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
484+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
485485 . send_request ( QUERY_BALANCE_DETAILS_METHOD , Some ( params) )
486486 . await
487487}
@@ -499,7 +499,7 @@ pub async fn get_dictionary_item(
499499 dictionary_item_identifier : DictionaryItemIdentifier ,
500500) -> Result < SuccessResponse < GetDictionaryItemResult > , Error > {
501501 let params = GetDictionaryItemParams :: new ( state_root_hash, dictionary_item_identifier) ;
502- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
502+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
503503 . send_request ( GET_DICTIONARY_ITEM_METHOD , Some ( params) )
504504 . await
505505}
@@ -517,7 +517,7 @@ pub async fn get_balance(
517517 purse : URef ,
518518) -> Result < SuccessResponse < GetBalanceResult > , Error > {
519519 let params = GetBalanceParams :: new ( state_root_hash, purse) ;
520- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
520+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
521521 . send_request ( GET_BALANCE_METHOD , Some ( params) )
522522 . await
523523}
@@ -535,7 +535,7 @@ pub async fn get_account(
535535 account_identifier : AccountIdentifier ,
536536) -> Result < SuccessResponse < GetAccountResult > , Error > {
537537 let params = GetAccountParams :: new ( account_identifier, maybe_block_identifier) ;
538- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
538+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
539539 . send_request ( GET_ACCOUNT_METHOD , Some ( params) )
540540 . await
541541}
@@ -553,7 +553,7 @@ pub async fn get_entity(
553553 entity_identifier : EntityIdentifier ,
554554) -> Result < SuccessResponse < GetAddressableEntityResult > , Error > {
555555 let params = GetAddressableEntityParams :: new ( entity_identifier, maybe_block_identifier) ;
556- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
556+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
557557 . send_request ( GET_ENTITY_METHOD , Some ( params) )
558558 . await
559559}
@@ -572,7 +572,7 @@ pub async fn get_reward(
572572 delegator : Option < PublicKey > ,
573573) -> Result < SuccessResponse < GetRewardResult > , Error > {
574574 let params = GetRewardParams :: new ( maybe_era_identifier, validator, delegator) ;
575- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
575+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
576576 . send_request ( GET_REWARD_METHOD , Some ( params) )
577577 . await
578578}
@@ -589,7 +589,7 @@ pub async fn get_auction_info(
589589 maybe_block_identifier : Option < BlockIdentifier > ,
590590) -> Result < SuccessResponse < GetAuctionInfoResult > , Error > {
591591 let params = maybe_block_identifier. map ( GetAuctionInfoParams :: new) ;
592- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
592+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
593593 . send_request ( GET_AUCTION_INFO_METHOD , params)
594594 . await
595595}
@@ -604,7 +604,7 @@ pub async fn get_validator_changes(
604604 node_address : & str ,
605605 verbosity : Verbosity ,
606606) -> Result < SuccessResponse < GetValidatorChangesResult > , Error > {
607- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
607+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
608608 . send_request :: < ( ) , _ > ( GET_VALIDATOR_CHANGES_METHOD , None )
609609 . await
610610}
@@ -619,7 +619,7 @@ pub async fn get_peers(
619619 node_address : & str ,
620620 verbosity : Verbosity ,
621621) -> Result < SuccessResponse < GetPeersResult > , Error > {
622- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
622+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
623623 . send_request :: < ( ) , _ > ( GET_PEERS_METHOD , None )
624624 . await
625625}
@@ -634,7 +634,7 @@ pub async fn get_node_status(
634634 node_address : & str ,
635635 verbosity : Verbosity ,
636636) -> Result < SuccessResponse < GetNodeStatusResult > , Error > {
637- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
637+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
638638 . send_request :: < ( ) , _ > ( GET_NODE_STATUS_METHOD , None )
639639 . await
640640}
@@ -649,7 +649,7 @@ pub async fn get_chainspec(
649649 node_address : & str ,
650650 verbosity : Verbosity ,
651651) -> Result < SuccessResponse < GetChainspecResult > , Error > {
652- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
652+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
653653 . send_request :: < ( ) , _ > ( GET_CHAINSPEC_METHOD , None )
654654 . await
655655}
@@ -665,7 +665,7 @@ pub async fn list_rpcs(
665665 node_address : & str ,
666666 verbosity : Verbosity ,
667667) -> Result < SuccessResponse < ListRpcsResult > , Error > {
668- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
668+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
669669 . send_request :: < ( ) , _ > ( LIST_RPCS_METHOD , None )
670670 . await
671671}
@@ -761,7 +761,7 @@ pub async fn get_era_info(
761761 maybe_block_identifier : Option < BlockIdentifier > ,
762762) -> Result < SuccessResponse < GetEraInfoResult > , Error > {
763763 let params = maybe_block_identifier. map ( GetEraInfoParams :: new) ;
764- JsonRpcCall :: new ( rpc_id, node_address, verbosity)
764+ JsonRpcCall :: new ( rpc_id, node_address, verbosity) ?
765765 . send_request ( GET_ERA_INFO_METHOD , params)
766766 . await
767767}
0 commit comments