<p>You need to subtract the fee from <code>$receiver_output</code>.</p>

CC BY-SA 4.0
2021-12-22T20:35:55.117Z
if you can be more specific, at what step? I tried receiver_output=$(expr $receiver_output - $fee + 2000000) and receiver_output=$(expr $receiver_output - $fee) after output=$(expr $funds - $fee - 2000000) and still get the same error: Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 4818307 (fromList [(PolicyID {policyID = ScriptHash "5b314f4ac2716a22741a69c2c213ba515d0d90e5e7c8400474b948ee"},fromList [("SLIME",100000000000000 ...
Myles
CC BY-SA 4.0
2021-12-23T14:05:42.263Z
In your final build-raw you need something like (($receiver-output - $fee))
Samuel Leathers
CC BY-SA 4.0
2021-12-22T20:26:10.240Z
2021-12-22T20:26:10.240Z
Samuel Leathers
<p>Why are you adding $receiver-output to the --tx-out line where you are minting the tokens? You are not consuming that UTxO, just ignore that UTxO and the 5000000 lovelaces at that address.</p>

CC BY-SA 4.0
2021-12-23T14:07:44.040Z
receiver_output is balance of utxo spent in txin.
Samuel Leathers
CC BY-SA 4.0
2021-12-23T08:59:58.137Z
2021-12-23T08:59:58.137Z
George - APEX Stake Pool
<p>I've minted 1,000,000,000,000,000 SLIME coin following this guide <a href="https://developers.cardano.org/docs/native-tokens/minting/#prerequisites" rel="nofollow noreferrer">https://developers.cardano.org/docs/native-tokens/minting/#prerequisites</a> but I'm getting an error at the &quot;Sending tokens to a wallet&quot; section. I've attached a screenshot of all the steps I take along with the error I receive:</p>
<p>Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 4818307 (fromList [(PolicyID {policyID = ScriptHash &quot;5b314f4ac2716a22741a69c2c213ba515d0d90e5e7c8400474b948ee&quot;},fromList [(&quot;SLIME&quot;,1000000000000000)])])) (Value 7818307 (fromList [(PolicyID {policyID = ScriptHash &quot;5b314f4ac2716a22741a69c2c213ba515d0d90e5e7c8400474b948ee&quot;},fromList [(&quot;SLIME&quot;,1000000000000000)])])))))])</p>
<p>The variable &quot;address&quot; is set to my address which I'm trying to send SLIME from, and the variable &quot;receiver&quot; is set to the address I'm trying to send SLIME to.</p>
<p>I greatly appreciate help in solving this headache of a blocker for me, thanks, Myles.</p>
<p><a href="https://i.sstatic.net/0GWtt.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0GWtt.jpg" alt="enter image description here" /></a></p>

<cardano-cli><native-assets><token>
cardano-cli transaction build-raw error
# cardano-cli transaction build-raw error

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

I've minted 1,000,000,000,000,000 SLIME coin following this guide <https://developers.cardano.org/docs/native-tokens/minting/#prerequisites> but I'm getting an error at the "Sending tokens to a wallet" section. I've attached a screenshot of all the steps I take along with the error I receive:

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 4818307 (fromList [(PolicyID {policyID = ScriptHash "5b314f4ac2716a22741a69c2c213ba515d0d90e5e7c8400474b948ee"},fromList [("SLIME",1000000000000000)])])) (Value 7818307 (fromList [(PolicyID {policyID = ScriptHash "5b314f4ac2716a22741a69c2c213ba515d0d90e5e7c8400474b948ee"},fromList [("SLIME",1000000000000000)])])))))])

The variable "address" is set to my address which I'm trying to send SLIME from, and the variable "receiver" is set to the address I'm trying to send SLIME to.

I greatly appreciate help in solving this headache of a blocker for me, thanks, Myles.

[![enter image description here](https://i.sstatic.net/0GWtt.jpg)](https://i.sstatic.net/0GWtt.jpg)

**Tags:** cardano-cli, native-assets, token

---

## 2 answers

### Answer by username_1 on 2021-12-22. Score: 1

You need to subtract the fee from `$receiver_output`.

> **Comments:**
> **username_0**: if you can be more specific, at what step? I tried receiver_output=$(expr $receiver_output - $fee + 2000000) and receiver_output=$(expr $receiver_output - $fee) after output=$(expr $funds - $fee - 2000000) and still get the same error: Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 4818307 (fromList [(PolicyID {policyID = ScriptHash "5b314f4ac2716a22741a69c2c213ba515d0d90e5e7c8400474b948ee"},fromList [("SLIME",100000000000000 ...  
> **username_1**: In your final build-raw you need something like (($receiver-output - $fee))  

---

### Answer by username_2 on 2021-12-23. Score: 0

Why are you adding $receiver-output to the --tx-out line where you are minting the tokens? You are not consuming that UTxO, just ignore that UTxO and the 5000000 lovelaces at that address.

> **Comments:**
> **username_1**: receiver_output is balance of utxo spent in txin.  

---

