Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add transaction building functions for correctly adding registration deregistration and delegation certificates in Conway era. #236

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

koslambrou
Copy link
Collaborator

Add transaction building functions for correctly adding registration deregistration and delegation certificates in Conway era.

  • Add functions for adding certificates in transactions such as:

    • addShelleyStakeCredentialRegistrationCertificatePreConway
    • addShelleyStakeCredentialUnregistrationCertificatePreConway
    • addShelleyStakeCredentialRegistrationCertificateInConway
    • addShelleyStakeCredentialUnregistrationCertificateInConway
    • addConwayStakeCredentialRegistrationCertificate
    • addConwayStakeCredentialRegistrationAndDelegationCertificate
    • addConwayStakeCredentialDeRegistrationCertificate
  • Add addStakeScriptWitness which adds a script stake address witness
    in the transaction. This is a simplified version of addStakeWitness.

  • Add Convex.Eon.IsShelleyToBabbageEra typeclass for building
    certificates in pre-conway eras.

  • Modifies mockchain and devnet protocol parameter default values to
    reflect actual certificate deposits in current mainnet.

    • A stake address registration requires 20_000_000 lovelace as
      deposit.
    • A stake pool certification requires 500_000_000 lovelace as
      deposit.
  • Fix tests given new Conway rules for:

    • registering stake address
    • registering stake pool
    • delegating to stake pools and DReps
    • withdrawal zero trick
  • Change signature of unTransAddressInEra, transAddressInEra, unTransTxOutValue, unTransTxOutDatumHash to work with any era

  • Change signature of sendFaucetFundsTo, createSeededWallet, balanceAndSubmit, balanceAndSubmitReturn to work with any era

* Change signature of unTransAddressInEra, transAddressInEra, unTransTxOutValue, unTransTxOutDatumHash

* Change signature of sendFaucetFundsTo, createSeededWallet, balanceAndSubmit, balanceAndSubmitReturn
… deregistration and delegation certificates in Conway era.

* Add functions for adding certificates in transactions such as:
    * `addPreConwayStakeCredentialRegistrationCertificate`
    * `addPreConwayStakeCredentialUnregistrationCertificate`
    * `addConwayStakeCredentialRegistrationCertificate`
    * `addConwayStakeCredentialRegistrationAndDelegationCertificate`
    * `addConwayStakeCredentialDeRegistrationCertificate`

* Add `addStakeScriptWitness` which adds a script stake address witness
  in the transaction. This is a simplified version of `addStakeWitness`.

* Add Convex.Eon.IsShelleyToBabbageEra typeclass for building
  certificates in pre-conway eras.

* Modifies mockchain and devnet protocol parameter default values to
  reflect actual certificate deposits in current mainnet.
    * A stake address registration requires 20_000_000 lovelace as
      deposit.
    * A stake pool certification requires 500_000_000 lovelace as
      deposit.

* Fix tests given new Conway rules for:
    * registering stake address
    * registering stake pool
    * delegating to stake pools and DReps
    * withdrawal
@koslambrou koslambrou requested a review from j-mueller November 19, 2024 17:06
Copy link
Owner

@j-mueller j-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

src/base/lib/Convex/BuildTx.hs Show resolved Hide resolved
@j-mueller j-mueller merged commit 77e5b78 into main Nov 20, 2024
4 checks passed
@j-mueller j-mueller deleted the koslambrou/generalize-era-some-function branch November 20, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants