Fees on a Hooks-enabled ledger are non trivial. See: Hook Fees for details.
- Return the amount of the fee in drops recommended for a to-be emitted transaction.
int64_t etxn_fee_base ( uint32_t read_ptr, uint32_t read_len );
int64_t fee_to_pay = etxn_fee_base(tx_blob, tx_blob_len);
Pointer to the buffer containing the serialized transaction you intend to emit. The fee field is required but ignored (you may use zero). Use the output of this function to populate the fee field correctly.
The length of the tx blob.
The smallest number of drops that an emitted txn would need to be accepted.
If negative, an error: