-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add transaction building functions for correctly adding registration,…
… 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
- Loading branch information
1 parent
78c921d
commit 21939df
Showing
9 changed files
with
220 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module Convex.Eon ( | ||
IsShelleyToBabbageEra(shelleyToBabbageEra) | ||
) where | ||
|
||
import qualified Cardano.Api as C | ||
|
||
-- TODO This was deleted from cardano-api because they said it was unused. See | ||
-- https://github.com/IntersectMBO/cardano-api/pull/256. However, because of the | ||
-- Certificate type starting at ConwayEra, that typeclass is a nice to have. | ||
class C.IsShelleyBasedEra era => IsShelleyToBabbageEra era where | ||
shelleyToBabbageEra :: C.ShelleyToBabbageEra era | ||
|
||
instance IsShelleyToBabbageEra C.ShelleyEra where | ||
shelleyToBabbageEra = C.ShelleyToBabbageEraShelley | ||
|
||
instance IsShelleyToBabbageEra C.AllegraEra where | ||
shelleyToBabbageEra = C.ShelleyToBabbageEraAllegra | ||
|
||
instance IsShelleyToBabbageEra C.MaryEra where | ||
shelleyToBabbageEra = C.ShelleyToBabbageEraMary | ||
|
||
instance IsShelleyToBabbageEra C.AlonzoEra where | ||
shelleyToBabbageEra = C.ShelleyToBabbageEraAlonzo | ||
|
||
instance IsShelleyToBabbageEra C.BabbageEra where | ||
shelleyToBabbageEra = C.ShelleyToBabbageEraBabbage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.