use rust_pact::fetch;
use serde_json::json;
fn main() {
let local_cmd = json!({
"pactCode": "(+ 1 2)",
"envData": {},
"meta": {
"chainId": "0",
"sender": "any",
"gasLimit": 1000,
"gasPrice": 0.00001,
"ttl": 600,
"creationTime": 0
},
"networkId": "mainnet01",
"nonce": "test-nonce"
});
let api_host = "https://api.chainweb.com/chainweb/0.0/mainnet01/chain/0/pact";
println!("\nSending with preflight enabled...");
let response_with_opts = fetch::local_with_options(
&local_cmd,
api_host,
Some(false), Some(false) );
println!("Response with options: {}", response_with_opts);
}