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

Use consistent namespace for ShelleyLedgerEra in cardano-balance-tx. #4233

Closed

Conversation

jonathanknowles
Copy link
Contributor

@jonathanknowles jonathanknowles commented Nov 15, 2023

Issue

ADP-3184

This PR follows on from #4185 and #4229.

Description

This PR:

  • corrects an inconsistency between Cardano.Write.Tx and other modules in the cardano-balance-tx library.
  • arranges that ShelleyLedgerEra is always imported into the CardanoApi namespace.

@jonathanknowles jonathanknowles changed the title Use consistent namespace for Cardano.Api.ShelleyLedgerEra in cardano-balance-tx. Use consistent namespace for ShelleyLedgerEra in cardano-balance-tx. Nov 15, 2023
@jonathanknowles jonathanknowles self-assigned this Nov 15, 2023
@jonathanknowles jonathanknowles force-pushed the jonathanknowles/balance-tx-import-cardano-api branch from 652d61a to 9b79ff4 Compare November 16, 2023 07:41
@Anviking
Copy link
Member

I believe this,

  • corrects an inconsistency between Cardano.Write.Tx and other modules in the cardano-balance-tx library.
  • arranges that ShelleyLedgerEra is always imported into the CardanoApi namespace.

is fulfilled now after #4252 and that this now can be closed — do you agree?

git grep "ShelleyLedgerEra"                                                                                                               (1) (4s 175ms)
lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx.hs:    , CardanoApi.ShelleyLedgerEra
lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx.hs:    , CardanoApi.ShelleyLedgerEra (CardanoApiEra era) ~ era
lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx.hs:    -> Maybe (RecentEra (CardanoApi.ShelleyLedgerEra era))
lib/wallet/src/Cardano/Api/Extra.hs:    ( ShelleyLedgerEra
lib/wallet/src/Cardano/Api/Extra.hs:  -> Ledger.PParams (ShelleyLedgerEra era)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Allegra.hs:    :: ShelleyTx (Cardano.ShelleyLedgerEra AllegraEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Allegra.hs:fromAllegraTx' :: ShelleyTx (Cardano.ShelleyLedgerEra AllegraEra) -> W.Tx
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs:    :: Alonzo.AlonzoTx (Cardano.ShelleyLedgerEra AlonzoEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs:                    . Core.hashScript @(Cardano.ShelleyLedgerEra AlonzoEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Alonzo.hs:fromAlonzoTx' :: Alonzo.AlonzoTx (Cardano.ShelleyLedgerEra AlonzoEra) -> W.Tx
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs:    :: Alonzo.AlonzoTx (Cardano.ShelleyLedgerEra BabbageEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs:    hashBabbageScript = Core.hashScript @(Cardano.ShelleyLedgerEra BabbageEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Babbage.hs:fromBabbageTx' :: Alonzo.AlonzoTx (Cardano.ShelleyLedgerEra BabbageEra) -> W.Tx
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs:    :: Alonzo.AlonzoTx (Cardano.ShelleyLedgerEra ConwayEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs:    hashConwayScript = Core.hashScript @(Cardano.ShelleyLedgerEra ConwayEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Conway.hs:fromConwayTx' :: Alonzo.AlonzoTx (Cardano.ShelleyLedgerEra ConwayEra) -> W.Tx
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs:        Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.AlonzoEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs:        Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.BabbageEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Features/Mint.hs:        Core.hashScript @(Cardano.ShelleyLedgerEra Cardano.ConwayEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Mary.hs:    :: SL.ShelleyTx (Cardano.ShelleyLedgerEra MaryEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Mary.hs:    SL.ShelleyTx (Cardano.ShelleyLedgerEra MaryEra) ->
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Shelley.hs:    :: ShelleyTx (Cardano.ShelleyLedgerEra ShelleyEra)
lib/wallet/src/Cardano/Wallet/Read/Primitive/Tx/Shelley.hs:fromShelleyTx' :: SL.ShelleyTx (Cardano.ShelleyLedgerEra ShelleyEra) -> W.Tx
lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs:    , ShelleyLedgerEra
lib/wallet/src/Cardano/Wallet/Shelley/Transaction.hs:    case Write.recentEra @(ShelleyLedgerEra byronEra) of {}
lib/wallet/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs:    , ShelleyLedgerEra
lib/wallet/test/unit/Cardano/Wallet/Shelley/TransactionSpec.hs:    -> ((CardanoApiEra (ShelleyLedgerEra era) ~ era) => a)
lib/wallet/test/unit/Internal/Cardano/Write/Tx/BalanceSpec.hs:    :: Era (CardanoApi.ShelleyLedgerEra era)

And thanks for waiting and apologies for any unclarity about motivation!

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