user2107: I'm trying to convert a V1 contract to V2, and I have offchain code that mints a token with a OneShotCurrency, and then pays the token plus 1 ada to my script.
It worked with Plutus libraries from Feb. 2022, but I'm trying to upgrade it to match the upcoming Vasil HF, so I'm using plutus-apps v1.0.0-alpha1
In the emulator it is currently giving me this error:
TxnValidationFail Phase1 d6dddf483108cdd66915dac9c81d5c41263de34272366f11517debd1597ba3fc:
    CardanoLedgerValidationError "ApplyTxError [UtxowFailure (UtxoFailure
                                 (BabbageOutputTooSmallUTxO [((Addr Testnet ...

It appears that the min Ada amount is higher than 1 Ada, because if I change it to 10 Ada, it works.
Does anyone know if there's Plutus code for checking for the minAda required for a tx, without using the cardano-cli?

user5085: This was just answered here.
The min UTxO output value calculation has changed for the Babbage era. Make sure you're using the latest version of whatever library/ sdk you're using to construct transactions.

user2107: I unfortunately asked 2 questions in one, and since @william answered one of them he should get the credit for the answer.
To answer the second question for future reference, there is indeed a Plutus function that does get the min amount of Ada so you can add that to your Tx Constraints: maxMinAdaTxOut
    let c = Constraints.mustPayToOtherScript (oracleValidatorHash oupOracle) 
                    (V1LedgerScripts.Datum $ PlutusTx.toBuiltinData oupNewFee) 
                       $ ((assetClassValue (oracleAsset oupOracle) 1) <>
                          (Ada.toValue maxMinAdaTxOut))

I've tested this within the Emulator and it does indeed work.

2107: <p>I'm trying to convert a V1 contract to V2, and I have offchain code that mints a token with a OneShotCurrency, and then pays the token plus 1 ada to my script.</p>
<p>It worked with Plutus libraries from Feb. 2022, but I'm trying to upgrade it to match the upcoming Vasil HF, so I'm using plutus-apps v1.0.0-alpha1</p>
<p>In the emulator it is currently giving me this error:</p>
<pre><code>TxnValidationFail Phase1 d6dddf483108cdd66915dac9c81d5c41263de34272366f11517debd1597ba3fc:
    CardanoLedgerValidationError &quot;ApplyTxError [UtxowFailure (UtxoFailure
                                 (BabbageOutputTooSmallUTxO [((Addr Testnet ...
</code></pre>
<p>It appears that the min Ada amount is higher than 1 Ada, because if I change it to 10 Ada, it works.</p>
<p>Does anyone know if there's Plutus code for checking for the minAda required for a tx, without using the cardano-cli?</p>
 5085: <p>This was just answered <a href="https://cardano.stackexchange.com/questions/9043/cardano-java-lib">here</a>.
The min UTxO output value calculation has changed for the Babbage era. Make sure you're using the latest version of whatever library/ sdk you're using to construct transactions.</p>
 2107: <p>I unfortunately asked 2 questions in one, and since @william answered one of them he should get the credit for the answer.</p>
<p>To answer the second question for future reference, there is indeed a Plutus function that does get the min amount of Ada so you can add that to your Tx Constraints: <code>maxMinAdaTxOut</code></p>
<pre><code>    let c = Constraints.mustPayToOtherScript (oracleValidatorHash oupOracle) 
                    (V1LedgerScripts.Datum $ PlutusTx.toBuiltinData oupNewFee) 
                       $ ((assetClassValue (oracleAsset oupOracle) 1) &lt;&gt;
                          (Ada.toValue maxMinAdaTxOut))
</code></pre>
<p>I've tested this within the Emulator and it does indeed work.</p>
