<p>You'd need to set a <code>--ttl &lt;SLOT NUMBER&gt;</code> parameter for the <code>transaction build-raw</code> command</p>

CC BY-SA 4.0
2021-11-26T18:14:51.907Z
2021-11-26T18:14:51.907Z
zhekson
<p>I want to return test ADA to the <a href="https://developers.cardano.org/docs/integrate-cardano/testnet-faucet/" rel="nofollow noreferrer">test faucet</a>. Is there an easy way to return the tAda? I'm using this documentation to create and submit a transaction to testnet: <a href="https://developers.cardano.org/docs/transaction-metadata/how-to-create-a-metadata-transaction-cli" rel="nofollow noreferrer">How to create a metadata transaction using cardano-cli</a></p>
<pre><code>cardano-cli query utxo --testnet-magic 1097911063 --address $(cat payment.addr)

cardano-cli transaction build-raw \
--tx-in dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5#0 \
--tx-out $(cat testfaucet.addr)+999825875 \
--metadata-json-file metadata.json \
--fee 174125 \
--out-file tx.draft

cardano-cli transaction sign \
--tx-body-file tx.draft \
--signing-key-file payment.skey \
--testnet-magic 1097911063 \
--out-file tx.signed 

cardano-cli transaction submit \
--tx-file tx.signed \
--testnet-magic 1097911063

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 0 (fromList [])) (Value 1000000000 (fromList []))))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (BadInputsUTxO (fromList [TxIn (TxId {_unTxId = SafeHash &quot;dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5&quot;}) 0]))))])
</code></pre>

<cardano-cli><testnet>
Return tAda using Cardano-CLI
# Return tAda using Cardano-CLI

(Asked by: username_0 on 2021-11-22)

I want to return test ADA to the test faucet. Is there an easy way to return the tAda? I'm using this documentation to create and submit a transaction to testnet: How to create a metadata transaction using cardano-cli
cardano-cli query utxo --testnet-magic 1097911063 --address $(cat payment.addr)

cardano-cli transaction build-raw \
--tx-in dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5#0 \
--tx-out $(cat testfaucet.addr)+999825875 \
--metadata-json-file metadata.json \
--fee 174125 \
--out-file tx.draft

cardano-cli transaction sign \
--tx-body-file tx.draft \
--signing-key-file payment.skey \
--testnet-magic 1097911063 \
--out-file tx.signed 

cardano-cli transaction submit \
--tx-file tx.signed \
--testnet-magic 1097911063

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 0 (fromList [])) (Value 1000000000 (fromList []))))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (BadInputsUTxO (fromList [TxIn (TxId {_unTxId = SafeHash "dfb99f8f103e56a856e04e087255dbaf402f3801acb71a6baf423a1054d3ccd5"}) 0]))))])

**Tags:** cardano-cli, testnet

---

## 1 answers

### Answer by username_1 on 2021-11-26. Score: 1

You'd need to set a `--ttl`  parameter for the `transaction build-raw` command


---

