<p>Had to use <code>cardano-cli transaction build-raw</code> and set my scripts to use more memory and cpu via the following flags (for example):</p>
<pre><code>--tx-in-execution-units=&quot;(5000000000, 5000000)&quot; \
   ...
--mint-execution-units=&quot;(5000000000, 5000000)&quot; \
</code></pre>
<p>I used the following divisions as they add up to the maximum tx mem and cpu units for testnet (as of 11/24/2021) and split the units halfway between both of them, since both scripts were failing.</p>

CC BY-SA 4.0
2021-11-25T04:29:31.450Z
2021-11-25T04:29:31.450Z
yoyobigmanyo
<p>Running into this error when attempting to build a tx.</p>
<pre><code>Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The budget was overspent. Final negative state: ({ cpu: 6228000431
| mem: -2515
})
Script debugging logs: 
the script for policyId 0 (in the order of the PolicyIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The budget was overspent. Final negative state: ({ cpu: 6209175329
| mem: -4312
})```

Any ideas for how to solve it?
</code></pre>

<plutus><smart-contract><cardano-cli><transaction>
The Plutus script evaluation failed
# The Plutus script evaluation failed

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

Running into this error when attempting to build a tx.
Command failed: transaction build  Error: The following scripts have execution failures:
the script for transaction input 1 (in the order of the TxIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The budget was overspent. Final negative state: ({ cpu: 6228000431
| mem: -2515
})
Script debugging logs: 
the script for policyId 0 (in the order of the PolicyIds) failed with: 
The Plutus script evaluation failed: An error has occurred:  User error:
The budget was overspent. Final negative state: ({ cpu: 6209175329
| mem: -4312
})```

Any ideas for how to solve it?

**Tags:** plutus, smart-contract, cardano-cli, transaction

---

## 1 answers

### Answer by username_0 on 2021-11-25. Score: 1

Had to use cardano-cli transaction build-raw and set my scripts to use more memory and cpu via the following flags (for example):
--tx-in-execution-units="(5000000000, 5000000)" \
   ...
--mint-execution-units="(5000000000, 5000000)" \

I used the following divisions as they add up to the maximum tx mem and cpu units for testnet (as of 11/24/2021) and split the units halfway between both of them, since both scripts were failing.


---

