-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update cardano-api to a newer cardano-ledger #227
Conversation
6ed090a
to
fd1cda8
Compare
a0d1a33
to
7a4e626
Compare
283b3d7
to
8803de7
Compare
8803de7
to
9fc3a04
Compare
@@ -551,6 +558,10 @@ instance ToJSON StakeCredential where | |||
StakeCredentialByScript scriptHash -> | |||
["stakingScriptHash" .= serialiseToRawBytesHexText scriptHash] | |||
|
|||
newtype DRepCredential = DRepCredential { unDRepCredential :: Shelley.Credential 'Shelley.DRepRole StandardCrypto } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the edger type directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that newtype wrappers can help you in the future protect upstream from breaking ledger changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to as much as possible not maintain any additional types in cardano-api. The ledger team can wrap it in a newtype and expose that if they like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that newtypes
help with two things:
- protect upstream libraries
- hide unnecessary details (in this case not exposing two type parameters which are irrelevant for upstream users)
They also can simplify maintnance, since they limit what needs to changed in the provided API.
cf3fe93
to
f72cc20
Compare
f72cc20
to
f74c2ec
Compare
* cardano-ledger-api-1.5.0.0 * cardano-ledger-conway-1.8 * ouroboros-consensus-0.9.0.0 * ouroboros-network-0.9.1
f74c2ec
to
9a7c48d
Compare
This API was previously available in `cardano-cli`.
123aca9
to
5b10b41
Compare
The review comment was accomodated.
…n_shelleyStakeAddressRegistrationCertificateWithBuildRaw-test New `hprop_golden_shelleyStakeAddressRegistrationCertificateWithBuildRaw` test
Changelog
Context
Make
cardano-api
compatible with a newer ledger IntersectMBO/cardano-ledger@9e2f815.Checklist
See Running tests for more details
.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7