diff --git a/CHANGELOG.md b/CHANGELOG.md index 660e85e4..84b0c686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.1 + +* Add combined stake address registration and delegation certificate. + ## 0.8.0 * Note that there has been large internal refactoring inside this update, but these are mostly non breaking as we provide pattern & type synonyms to keep earlier behavior. In particular: diff --git a/atlas-cardano.cabal b/atlas-cardano.cabal index c96c2aee..ad231e45 100644 --- a/atlas-cardano.cabal +++ b/atlas-cardano.cabal @@ -1,6 +1,6 @@ cabal-version: 3.8 name: atlas-cardano -version: 0.8.0 +version: 0.8.1 synopsis: Application backend for Plutus smart contracts on Cardano description: Atlas is an all-in-one, Haskell-native application backend for writing off-chain code for on-chain Plutus smart contracts. diff --git a/src/GeniusYield/Types/TxCert.hs b/src/GeniusYield/Types/TxCert.hs index b4e137d2..a630fad7 100644 --- a/src/GeniusYield/Types/TxCert.hs +++ b/src/GeniusYield/Types/TxCert.hs @@ -14,6 +14,7 @@ module GeniusYield.Types.TxCert ( mkStakeAddressRegistrationCertificate, mkStakeAddressDeregistrationCertificate, mkStakeAddressDelegationCertificate, + mkStakeAddressCombinedRegistrationAndDelegationCertificate, mkDRepRegistrationCertificate, mkDRepUpdateCertificate, mkDRepUnregistrationCertificate, @@ -51,6 +52,10 @@ mkStakeAddressDeregistrationCertificate sc wit = GYTxCert (GYStakeAddressDeregis mkStakeAddressDelegationCertificate :: GYStakeCredential -> GYDelegatee -> GYTxBuildWitness v -> GYTxCert v mkStakeAddressDelegationCertificate sc del wit = GYTxCert (GYStakeAddressDelegationCertificatePB sc del) (Just wit) +-- | Rules for combined registration and delegation certificate are same as for individual registration and delegation certificates. +mkStakeAddressCombinedRegistrationAndDelegationCertificate :: GYStakeCredential -> GYDelegatee -> GYTxBuildWitness v -> GYTxCert v +mkStakeAddressCombinedRegistrationAndDelegationCertificate sc del wit = GYTxCert (GYStakeAddressRegistrationDelegationCertificatePB sc del) (Just wit) + {- | Note that delegation certificate requires following preconditions: 1. DRep must not already be registered.