Refer to: Deposit and Withdraw - The Fuel Rust SDK
How to fix the following codes:
pub async fn withdraw(
contract: &Exchange<WalletUnlocked>,
amount: u64,
asset: AssetId,
) -> CallResponse<()> {
contract
.methods()
.withdraw(Asset { id: asset, amount })
.with_variable_output_policy(VariableOutputPolicy::Exactly(1)) //Error: use of undeclared type `VariableOutputPolicy`
.call()
.await
.unwrap()
}
The error: Error: use of undeclared type VariableOutputPolicy