user7734: after creating my pool for 2 weeks on Cardano, I would like to take the funds back to finish my tests.
But after the deregistration, I still don't see my funds in my payment address.
I was wondering if I have another command line to type to get this back.
These were the command lines that I typed for the deregistration:
cardano-cli transaction build \
    --mainnet \
    --witness-override 2 \
    --tx-in 738b285d278eb2b0df231b1376d41991508c85a2b76407209a0b6cdc493f1847#0 \
    --change-address addr1q8lyynej6uprzj2ty7fpk4azfp07fc5n4emtwcszzecrl8zag54tt8pagr3nnk3verl9k47jsqmrahw4z53hftwye53ssztqtp \
    --certificate-file pool-deregistration.cert \
    --out-file tx.raw

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet

After getting a successful message about this, I waited until epoch 374.
Now I can see here, my pool is expired but I have not received my 500 ADA.
I didn't find any documentation about it, how can I get this fund back? Do we have a command line for this?
Thank you to anyone who can help me.
NEW EDIT
Actually, I can't see exactly the same thing on the Cardano doc maybe it could help somebody else here. So I have to deregistrate my stack account too.
We have to generate the file here:
cardano-cli stake-address deregistration-certificate \
--stake-verification-key-file stake.vkey \
--out-file stake-deregistration.cert

And I'm trying to proceed to the transaction here:
cardano-cli transaction build \
    --tx-in 75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386#0 \
    --tx-out $(cat stake.addr)+500000000 \
    --change-address $(cat stake.addr) \
    --mainnet  \
    --out-file tx.raw \
    --certificate-file stake-deregistration.cert \
    --witness-override 2

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet

As you can see here my reward is available but I have this message after to submit my transaction :
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeKeyNonZeroAccountBalanceDELEG (Just (Coin 500000000)))))])


user252: PoolDeposit (500 ADA on mainnet) is returned automatically upon pool deregistration at corresponding epoch to your stake address, as long as your stake account is not deregistered, while keyDeposit (2 ADA) is returned upon key deregistration.
You already have them on your stake account (see here )
PS: There are preprod and preview networks to learn, dont need to test on mainnet chain

7734: <p>after creating my pool for 2 weeks on Cardano, I would like to take the funds back to finish my tests.
But after the deregistration, I still don't see my funds in my payment address.
I was wondering if I have another command line to type to get this back.</p>
<p>These were the command lines that I typed for the deregistration:</p>
<pre><code>cardano-cli transaction build \
    --mainnet \
    --witness-override 2 \
    --tx-in 738b285d278eb2b0df231b1376d41991508c85a2b76407209a0b6cdc493f1847#0 \
    --change-address addr1q8lyynej6uprzj2ty7fpk4azfp07fc5n4emtwcszzecrl8zag54tt8pagr3nnk3verl9k47jsqmrahw4z53hftwye53ssztqtp \
    --certificate-file pool-deregistration.cert \
    --out-file tx.raw

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cold.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet
</code></pre>
<p>After getting a successful message about this, I waited until epoch 374.
Now I can see <a href="https://cardanoscan.io/pool/e9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab?tab=poolupdatehistory" rel="nofollow noreferrer">here</a>, my pool is expired but I have not received my 500 ADA.</p>
<p>I didn't find any documentation about it, how can I get this fund back? Do we have a command line for this?</p>
<p>Thank you to anyone who can help me.</p>
<p><strong>NEW EDIT</strong></p>
<p>Actually, I can't see exactly the same thing on the Cardano doc maybe it could help somebody else here. So I have to deregistrate my stack account too.</p>
<p>We have to generate the file here:</p>
<pre><code>cardano-cli stake-address deregistration-certificate \
--stake-verification-key-file stake.vkey \
--out-file stake-deregistration.cert
</code></pre>
<p>And I'm trying to proceed to the transaction here:</p>
<pre><code>cardano-cli transaction build \
    --tx-in 75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386#0 \
    --tx-out $(cat stake.addr)+500000000 \
    --change-address $(cat stake.addr) \
    --mainnet  \
    --out-file tx.raw \
    --certificate-file stake-deregistration.cert \
    --witness-override 2

cardano-cli transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --mainnet \
    --out-file tx.signed

cardano-cli transaction submit \
    --tx-file tx.signed \
    --mainnet
</code></pre>
<p>As you can see <a href="https://cardanoscan.io/stakekey/084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009" rel="nofollow noreferrer">here</a> my reward is available but I have this message after to submit my transaction :</p>
<pre><code>Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeKeyNonZeroAccountBalanceDELEG (Just (Coin 500000000)))))])
</code></pre>
 252: <p>PoolDeposit (500 ADA on mainnet) is returned automatically upon pool deregistration at corresponding epoch to your stake address, as long as your stake account is not deregistered, while keyDeposit (2 ADA) is returned upon key deregistration.</p>
<p>You already have them on your stake account (see <a href="https://cardanoscan.io/stakeKey/084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009?tab=stakekeyhistory" rel="nofollow noreferrer">here</a> )</p>
<p>PS: There are preprod and preview networks to learn, dont need to test on mainnet chain</p>
