-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugIssue is a bugIssue is a bug
Description
What version of fuels-ts are you using?
0.65.0
Steps to Reproduce
Hey guys, I was trying to run a small project yesterday and got into some issues related to decoding contract calls. What's happening is that it is not possible to return a Struct or a tuple that contains a String or Bytes inside. It seems it worked before 0.58.0, but things started to break since this PR.
Expected Behavior
This is the example of code in Sway
This is the example of usage on the SDK:
static async getFirstMessage() {
const contract = await getContract();
const { value } = await contract.functions.get_first_msg().simulate();
console.log(value);
}
Actual Behavior
And that's the error I'm facing right now:
Seems that the problem is related to this part of the code:
https://github.com/FuelLabs/fuels-ts/blob/master/packages/abi-coder/src/coders/stdString.ts#L52-L58
I don't know, but I guess this toNumber()
error when tryting to convert from bn
will break other decoders as well.
digorithm, Torres-ssf, arboleya and petertonysmith94
Metadata
Metadata
Assignees
Labels
bugIssue is a bugIssue is a bug