Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txSummary not returning contract call operation in some cases #2448

Closed
LuizAsFight opened this issue Jun 6, 2024 · 3 comments
Closed

txSummary not returning contract call operation in some cases #2448

LuizAsFight opened this issue Jun 6, 2024 · 3 comments
Assignees
Labels
bug Issue is a bug p2 Low Priority

Comments

@LuizAsFight
Copy link
Contributor

LuizAsFight commented Jun 6, 2024

What version of fuels-ts are you using?

0.88.1

Steps to Reproduce

image

More details

The screen above tries to show the operations of the transaction for the user to check and confirm it. It's currently showing no operations.

Behind the scenes it's consuming getTransactionSummary.
When this method tries to compute the contract call operations, it tries to identify who called the contract using the assetId returned from the receipt.

The problem is that the receipt returns 0x0000..., as there was no assetId in the contract call made. The previous code was working only because the baseAssetId was the same, and the input would have the correct assetId.

Solution

When the receipt returns assetId: 0x0000..., consider getting the input that has the current baseAssetId, meaning that who payed the fee will be identified as the contract caller.

fuel-core FuelLabs/fuel-core#1941

I think this is something that could be changed in the VM, it could return null instead of 0x0000..., but it doesn't change the solution above

@LuizAsFight LuizAsFight added the bug Issue is a bug label Jun 6, 2024
@maschad maschad self-assigned this Jun 6, 2024
@maschad
Copy link
Member

maschad commented Jun 8, 2024

I think the more permanent fix for this should involve fuel-core determining what the correct response is based on FuelLabs/fuel-core#1941

In the interim we have released a patch which solves this.

@maschad maschad added the blocked Something is blocking development on this issue label Jun 8, 2024
@maschad maschad removed their assignment Jun 8, 2024
@arboleya arboleya added the p0 High priority label Jun 9, 2024
@arboleya arboleya added this to the Mainnet milestone Jun 9, 2024
@arboleya arboleya added p1 Medium priority and removed p0 High priority labels Jun 10, 2024
@arboleya arboleya modified the milestones: 0.x mainnet, 0.x post-launch Jun 12, 2024
@arboleya arboleya added p2 Low Priority and removed p1 Medium priority labels Jun 12, 2024
@LuizAsFight
Copy link
Contributor Author

@maschad
makes sense to close this issue? the bug in this issue is fixed.

the change on VM may or may not happen haha, can it be tracked in another issue as an improvement instead of a bug ?

cc @arboleya

@maschad maschad self-assigned this Jun 28, 2024
@maschad
Copy link
Member

maschad commented Jun 28, 2024

I agree @LuizAsFight this particular issue closed since both

have been created to address this on our end going forward, if FuelLabs/fuel-core#1941 gets integrated on fuel-core then we can create another issue to make accommodations for that.

@maschad maschad closed this as completed Jun 28, 2024
@maschad maschad removed the blocked Something is blocking development on this issue label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is a bug p2 Low Priority
Projects
None yet
Development

No branches or pull requests

3 participants