Stake Pool Certificate and payment with TxHash

I am trying to submit the transaction for registering my stake pool. I have 3 TxHash’s: 15252622 Lovelace, 500000000 Lovelace (the 500 for pool registration), and the last one has 1589373 Lovelace.

When I go to build the raw transaction, will the payment.addr take what it needs from fees from the other two TxHash’s that have smaller amounts of Lovelace in them? Do I need a single TxHash with the 500 ADA plus extra for fees? … The largest TxHash has exactly 500 ADA, and I’m just fuzzy on how this all works.

8.10. Build the transaction:

cardano-cli transaction build-raw \ --tx-in # \ --tx-out $(cat payment.addr)+ \ --invalid-hereafter \ --fee \ --out-file tx.raw \ --certificate-file pool-registration.cert \ --certificate-file delegation.cert