sygmaprotocol / sygma-sdk

A Typescript SDK to add cross-chain capabilities such as bridging tokens and sending messages across dApp projects.
https://docs.buildwithsygma.com/
GNU Lesser General Public License v3.0
31 stars 19 forks source link

Get fee from BasicFeeHandler on XcmV4 ( Tangle Single Chain) for foreign Assets, is returned incorrect #382

Closed LyonSsS closed 2 months ago

LyonSsS commented 3 months ago

Context: Using the SygmaSDK examples, for creating transactions to send 3 ( 3000000) sygUSDC ( ResourceID: 0x0000000000000000000000000000000000000000000000000000000000001100) to destinationID: 2 ( Sepolia, ChainID: 11155111), fails with the message "Error: Transfer amount should be higher than transfer fee".

Adding some loggings on this route we discovered that fee value return for this asset, is actually the value for TNT asset image

Note: On the share config there is the "Concrete" usage in the data structure for sygUSDC vs actual on chain data image

Also this is how BasicFeeHandler is queried on Tangle vs Rhala image

LyonSsS commented 2 months ago

Resolution: Not a Bug. Issue resolved by https://github.com/sygmaprotocol/sygma-shared-configuration/pull/127