Fee relay transactions are those where fees are paid by another address. This can be useful when you split wallets that contain fees and payment funds. The process requires the construction of a custom transaction body that needs to undergo several manual checks due to certain features of the OMG Network.
UTXO helper filters UTXOs that can be used during a transaction. Currently, the OMG Network has a limitation of only 4 inputs and 4 outputs, thus you can have a maximum of 3 payment inputs and reserve the last one for a fee input. For simplicity purposes, we select UTXOs that have an amount that is greater or equal to the amount requested in a transaction.
UTXO change helper checks if the provided UTXO (payment or fee) needs a change. If the change is needed, the helper creates and pushes an additional output to the existing array of transaction outputs.