fuels-ts icon indicating copy to clipboard operation
fuels-ts copied to clipboard

Incorrect asset for devnet

Open petertonysmith94 opened this issue 9 months ago • 2 comments

We export assets that can be easily consumed by the end user.

  • The assetId is currently 0x0000…. (or baseAssetId), is incorrect for devnet.
  • The chainId for devnet should be 0.

Reported by @LuizAsFight

petertonysmith94 avatar May 09 '24 16:05 petertonysmith94

I think beta5 can be removed and devnet changed to zero. as we will drop support to beta5 when devnet gets released

LuizAsFight avatar May 09 '24 17:05 LuizAsFight

about the baseAssetId its a bigger problem my first thought for this:

  • the static definition assets should not be exported anymore. create a isBaseAsset flag, so we don’t need to inform the address for the base assets, and can identify it later on next topic
  • create a getAssets which receives the provider and sort out the correct baseAssetIds to the assets that are needed. also it can filter out the assets that are not from the provider chainId

LuizAsFight avatar May 09 '24 17:05 LuizAsFight

@LuizAsFight Why we should remove the static assets?

I reckon that the baseAssetId is not something that's going to change on Test-net/Main-net.

Torres-ssf avatar May 21 '24 12:05 Torres-ssf

@Torres-ssf Do you know why baseAssetId became dynamic?

arboleya avatar May 21 '24 12:05 arboleya

@LuizAsFight Why we should remove the static assets?

I reckon that the baseAssetId is not something that's going to change on Test-net/Main-net.

@Torres-ssf its not to remove static assets, instead its to keep it, but remove only the specific mocked asset ids 0x00000...

a quickfix would be to just replace the assetId from testnet eth to be "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"

LuizAsFight avatar May 28 '24 04:05 LuizAsFight

ref #2394

LuizAsFight avatar May 28 '24 04:05 LuizAsFight

@xgreenx @LuizAsFight As we briefly discussed last week, should we use a hardcoded assetId value in the JSON for now and re-think the approach if/when the situation changes?

arboleya avatar May 28 '24 09:05 arboleya

Should add a new entry for testnet - or renamed devnet?

petertonysmith94 avatar May 31 '24 16:05 petertonysmith94

We should add a new entry

xgreenx avatar Jun 03 '24 08:06 xgreenx

@xgreenx @LuizAsFight As we briefly discussed last week, should we use a hardcoded assetId value in the JSON for now and re-think the approach if/when the situation changes?

Yes

xgreenx avatar Jun 03 '24 08:06 xgreenx