omnicore: Error choosing inputs for the send transaction
When I was planning to send USDT, there was an error. I am sure my balance of USDT&BTC is adequate.
$ ./omnicore-cli omni_funded_send "mrAVAPxdQEZxFkunh56skB6sgJa6vrfrpo" "msJ2h47ZrxFJjksVvPy8ik4h2HFfa9W1zV" 31 "100.01" "mpaumxor659PhoJhXp1VCVHVwbFCZSRmuf"
error code: -212
error message:
Error choosing inputs for the send transaction
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 37 (4 by maintainers)
I’ve come back to this thread a few times because I was totally stumped, and think I may have figured out why a lot more people are seeing this than would be expected (including me). Pardon me if the language is a bit imprecise:
You need UTXO’s in an OMNI address to send OMNI-layer transactions (not super surprising) out of that address.
In practice, what this means is that if: you receive some USDT to a fresh address, and want to send some of the USDT out of that address you can do a “funded send” to pay the transaction fee out of a “fee address” you have (great!). However, what you then wind up with is an address that has some OMNI but no UTXO’s (you consumed it in the previous transaction). So now, even though you can pay the fee to send the remaining USDT from that address to another using “funded_send”, you can’t actually compose a transaction out of that address, since you have consumed the UTXO. So now you need to send some bitcoin (or whatever you want to do) to that address again to get it a UTXO, with which it can compose the funded_send transaction.
abdce...✅omni_funded_send- ✅omni_funded_send- ❗️It seems like a great added feature of the OMNI protocol would be to, when composing a funded_send that is not going to send ALL the omni properties from a given address, address a UTXO back to the origin - conceptually like a “change” transaction…
This problem has been solved. When using the method omni_funded_send to send tokens, fromAddress should have a bit of btc.It means that the “feeaddress” does not pay all the fees. As the error resp said, “All bitcoins from the sender are consumed and if there are bitcoins missing, they are taken from the specified fee source.”
In my case BTC’s UTXO was present in
listlockunspentoutputs list instead of expectedlistunspent, and simplelockunspent truecommand helped meI confirm this issue still happen.
I confirm this issue still happen. if the address have no UTXO, it can’t send any coin.
@dmitryrn sure `
Still happen. I try to construct omni_funded_send transaction without RPC API, and I found the omni_funded_send API actually add new inputs for paying fee. Construct that transaction, you need the inputs for sender address, mean you need utxo of sender address, but this utxo‘s amount can be 0 which comes from previous transaction - like user deposit. This is the transaction i construct: https://www.blockchain.com/btctest/tx/03d56a0c18fd115c5fdee42e62c544dfa3194e1ff6102621750985da39a4cb60 FYI: https://medium.com/omnilayer/introducing-funded-omni-layer-transactions-or-how-exchanges-can-save-money-f3f04161a6af