args_from_simple_or_json

Function args_from_simple_or_json 

Source
pub fn args_from_simple_or_json(
    simple: Option<RuntimeArgs>,
    json: Option<RuntimeArgs>,
    chunked: Option<Vec<u8>>,
) -> TransactionArgs
Expand description

Constructs a RuntimeArgs instance from either simple or JSON representation.

§Arguments

  • simple: An optional RuntimeArgs representing simple arguments.
  • json: An optional RuntimeArgs representing arguments in JSON format.

§Returns

A RuntimeArgs instance representing the merged arguments from simple and json.

§Examples

use casper_client::cli::parse::args_from_simple_or_json;
use casper_types::RuntimeArgs;

let simple_args = RuntimeArgs::new(); // Simple arguments
let json_args = RuntimeArgs::new();   // JSON arguments

let _result_args = args_from_simple_or_json(Some(simple_args), None, None);
let _result_args = args_from_simple_or_json(None, Some(json_args), None);