0

I'm following the official process here on the Cardano tutorial.

Firstly, I have to show you I already have the fund here:

// cardano-cli query utxo --address $(cat payment.addr) --mainnet

                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
4c782ea34b517b99e508f675ea1019bc6c60738570ae7dbf074d3ad2d44e8eef     0        600000000 lovelace + TxOutDatumNone
75e262eb49ba1237b1ee00a4854935d67bd05988baed5472a7ff97b49551d386     0        17648934 lovelace + TxOutDatumNone
e663b2e14f180ae341a49bcbde247d074d944942cc3b8794277645ac1e49d377     0        8336205 lovelace + TxOutDatumNone

In the process, I've already created my pool-registration.cert file.

We can double-check thanks to this:

// cat pool-registration.cert
{
    "type": "CertificateShelley",
    "description": "Stake Pool Registration Certificate",
    "cborHex": "8a03581ce9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab58208ad95d9965ca817e7d7d5d6985ba4c92b77a206250fa59f52acb6ab36507c79b1a001e84801a1443fd00d81e820001581de1084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a00981581c084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009818400190bb9449e8cc08ff682783d68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6574737261706861656c2f43617264616e6f2f702f702e6a736f6e5820dee0758d3212808f99698e96446dd9400b4455d5c44286f91f66dd6c5796d064"
}

// cat delegation.cert 
{
    "type": "CertificateShelley",
    "description": "Stake Address Delegation Certificate",
    "cborHex": "83028200581c084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009581ce9c55b1910e7fdcacf2db1be6f20fadff0e5d68d6566b223698031ab"
}

Then after calculating my fees and taking a look at the hereafter, I'm building my transaction like this:

cardano-cli transaction build-raw \
    --tx-in 4c782ea34b517b99e508f675ea1019bc6c60738570ae7dbf074d3ad2d44e8eef#0 \
    --tx-out $(cat payment.addr)+99802951 \
    --invalid-hereafter 75915180 \
    --fee 197049 \
    --out-file tx.raw \
    --certificate-file pool-registration.cert \
    --certificate-file delegation.cert

Finally, I'm signing and sending my message like this:

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

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

My result after this is:

Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [DelegsFailure (DelplFailure (DelegFailure (StakeDelegationImpossibleDELEG (KeyHashObj (KeyHash "084cf0adf9fe75b3e479e6c837676bb85016ae891c624cf59004a009")))))])

Thank you if somebody can help, I will add more information if needed.

1 Answer 1

3

You first need to create a registration certificate for the stake key, before being able to delegate it. You can submit all 3 certificates in the same transaction, just add the key registration certificate between the other 2 certificates. You can see all the steps in my documentation here: https://apexpool.gitbook.io/stake-pool-scripts/stake-pool-registration/stake-pool-scripts/stake-key-registration

1
  • After following your documentation, it worked. Really appreciate it, thank you. Commented Nov 7, 2022 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.