Token transfer is failing for Rust SDK version 0.42. Am I doing something wrong?
Similar code works fine for Rust SDK 0.39.
Any help? Thanks
Here is the code that is not working
Here is the contract
This is the error
[tests/harness.rs:65] res = Err(
RevertTransactionError {
reason: "failed transfer to address.",
revert_id: 18446744073709486081,
receipts: [
Call {
id: 0x0000000000000000000000000000000000000000000000000000000000000000,
to: 0xba896e0725f512c1f0fd80e4334015394ac2f0148a01cf586d87157f66decfdc,
amount: 0,
asset_id: 0x0000000000000000000000000000000000000000000000000000000000000000,
gas: 1000000,
param1: 2185534222,
param2: 10472,
pc: 11680,
is: 11680,
},
Revert {
id: 0xba896e0725f512c1f0fd80e4334015394ac2f0148a01cf586d87157f66decfdc,
ra: 18446744073709486081,
pc: 12096,
is: 11680,
},
ScriptResult {
result: Revert,
gas_used: 380,
},
],
},
)
Here is the test that passes Rust SDK 0.39