You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transfer output (TRO) opcode transfers coins to addresses by creating a UTXO. The Fuel VM specification states that TRO should panic if the amount ($rC) is zero but the implementation does not perform this validation. Note, that the transfer coins to contract (TR) opcode does perform this validation and will revert for transfers with an amount of zero.
Figure 22.1: The TRO implementation (fuel-vm/src/interpreter/contract.rs#290–367)
Short term, determine whether zero amount transfers will cause a panic and update the specifications and implementations to be consistent.
Long term, create unit test cases that trigger all specified panics.
The text was updated successfully, but these errors were encountered:
Description
The transfer output (TRO) opcode transfers coins to addresses by creating a UTXO. The Fuel VM specification states that TRO should panic if the amount ($rC) is zero but the implementation does not perform this validation. Note, that the transfer coins to contract (TR) opcode does perform this validation and will revert for transfers with an amount of zero.
Figure 22.1: The TRO implementation (fuel-vm/src/interpreter/contract.rs#290–367)
Recommendations
Short term, determine whether zero amount transfers will cause a panic and update the specifications and implementations to be consistent.
Long term, create unit test cases that trigger all specified panics.
The text was updated successfully, but these errors were encountered: