What is the correct approach for handling decimals in a token bridge with Fuel?

According to the architecture documentation, Fuel tokens should have a maximum of 9 decimals. This means that a bridged token with 6 decimals should retain those 6 decimals on Fuel, while an 18-decimal token should be adjusted to 9 decimals on Fuel.

To implement this adjustment effectively, what is the best way to create the token? Is it sufficient to limit the token contract to a maximum of 9 decimals? Additionally, to avoid precision loss, should the bridge infrastructure revert transactions if the provided amount cannot be represented within 9 decimals? If a revert occurs on the contract side, would the original sender still be required to pay gas and send/burn the amount from their wallet?

Hey @RuntimeTerror, i will look into it and get back to you soon

Hey @RuntimeTerror, we do have a dust mechanism revert handling in the bridge contracts when the decimals are > 9 so ideally yes the token on L1 should be 9 decimals but even if not the bridge contracts handle those scenario’s correctly so there is complete flexibility even if token decimals are >9