FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.25k stars 1.34k forks source link

Error on contract call forwarding an assetId different from base assetId #3053

Closed LuizAsFight closed 1 week ago

LuizAsFight commented 2 weeks ago

fuels-ts SDK Version

0.94.0

Describe the Problem

when doing a contract call forwarding an assetId different from the baseAssetId of the provider, I am running into this error.

image

2 issues here: 1- estimated maxFee is not enough to pay for the transaction 2- even specifying a maxFee through .txParams, is not working, the estimation overrides my params

the issue 2 has already happened before and it was fixed, if it doesn't exist yet I suggest creating a test to make sure it doesn't happen anymore, something like:

Reproduce

See it happening in this PR preview link https://github.com/FuelLabs/fuel-explorer/pull/455 you can use the Fuel Dev Wallet, or run @FuelLabs/fuels-wallet repo locally from master branch

Steps:

petertonysmith94 commented 2 weeks ago

Hey @LuizAsFight,

Struggling to reproduce this issue using the reproduction steps, I'm using the Fuel Development Wallet (v0.27.0) and the latest preview link provided. I get the following error when attempting to confirm the transaction on depositing of TKN:

image

I don't suppose you've experienced this before, or know a way to resolve this?


I did also observed that during settlement the getMessageStatus is return a NOT_FOUND state. I'm not sure if this is related.

{"query":"query getMessageStatus($nonce: Nonce!) {\n  messageStatus(nonce: $nonce) {\n    state\n  }\n}","variables":{"nonce":"0x00000000000000000000000000000000000000000000000000000000000e364e"},"operationName":"getMessageStatus"}
{data: {messageStatus: {state: "NOT_FOUND"}}}
image
LuizAsFight commented 2 weeks ago

hey @petertonysmith94 thanks for the answer turns out the issue was occurring only on account that have a InputMessage containing data. it would be reproducible only in fuel accounts that received a deposit from erc20 token in the bridge. that was my case.

this PR was created with the fix https://github.com/FuelLabs/fuels-ts/pull/3068

cc @Torres-ssf

petertonysmith94 commented 2 weeks ago

@LuizAsFight Wish I could have been more of a help 😓