Skip to content

Commit

Permalink
Merge pull request #393 from geniusyield/combined-stake-address-reg-d…
Browse files Browse the repository at this point in the history
…eleg

feat: add combined stake address registration and delegation certificate
  • Loading branch information
sourabhxyz authored Jan 14, 2025
2 parents 89f1962 + 2620310 commit d0f64e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion atlas-cardano.cabal
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
5 changes: 5 additions & 0 deletions src/GeniusYield/Types/TxCert.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module GeniusYield.Types.TxCert (
mkStakeAddressRegistrationCertificate,
mkStakeAddressDeregistrationCertificate,
mkStakeAddressDelegationCertificate,
mkStakeAddressCombinedRegistrationAndDelegationCertificate,
mkDRepRegistrationCertificate,
mkDRepUpdateCertificate,
mkDRepUnregistrationCertificate,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d0f64e8

Please sign in to comment.