let address = wallet.address();
let amount = 100;
let response = contract_methods
.mint_then_increment_from_contract(called_contract_id, amount, address)
.call()
.await;
assert!(matches!(
response,
Err(Error::RevertTransactionError { .. })
));
.with_contracts()
and add an output variable with append_variable_outputs()
to resolve this: let response = contract_methods
.mint_then_increment_from_contract(called_contract_id, amount, address)
.append_variable_outputs(1)
.with_contract_ids(&[called_contract_id.into()])
.call()
.await?;
.estimate_tx_dependencies()
instead, the dependencies will be estimated by the SDK and set automatically. The optional parameter is the maximum number of simulation attempts: let response = contract_methods
.mint_then_increment_from_contract(called_contract_id, amount, address)
.estimate_tx_dependencies(Some(2))
.await?
.call()
.await?;
Note:estimate_tx_dependencies()
can also be used when working with script calls or multi calls.estimate_tx_dependencies()
does not currently resolve the dependencies needed for logging from an external contract. For more information, see here . If no resolution was found after exhausting all simulation attempts, the last received error will be propagated. The same will happen if an error is unrelated to transaction dependencies.