Skip to content

Commit

Permalink
Use the newest plutus packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lehins committed Jan 12, 2024
1 parent 4b5e866 commit 846e660
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
12 changes: 12 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,15 @@ benchmarks: true

-- The only sensible test display option
test-show-details: streaming

-- TO BE removed as soon as https://github.com/IntersectMBO/plutus/pull/5712 is merged and released
source-repository-package
type: git
location: https://github.com/IntersectMBO/plutus
tag: c006bbdddafd100433916def71502415dd9a51cd
--sha256: sha256-JAISXfDQ6DpNLlwxEkZS+t9hwrPawe4K2bMB89IQnIU=
subdir:
plutus-ledger-api
plutus-core
plutus-tx
plutus-tx-plugin
24 changes: 13 additions & 11 deletions eras/conway/impl/src/Cardano/Ledger/Conway/TxInfo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -314,21 +314,21 @@ transTxCert = \case
UnRegTxCert stakeCred ->
PV3.TxCertUnRegStaking (transCred stakeCred) Nothing
RegDepositTxCert stakeCred deposit ->
PV3.TxCertRegStaking (transCred stakeCred) (Just (transCoin deposit))
PV3.TxCertRegStaking (transCred stakeCred) (Just (coinToLovelace deposit))
UnRegDepositTxCert stakeCred refund ->
PV3.TxCertUnRegStaking (transCred stakeCred) (Just (transCoin refund))
PV3.TxCertUnRegStaking (transCred stakeCred) (Just (coinToLovelace refund))
DelegTxCert stakeCred delegatee ->
PV3.TxCertDelegStaking (transCred stakeCred) (transDelegatee delegatee)
RegDepositDelegTxCert stakeCred delegatee deposit ->
PV3.TxCertRegDeleg (transCred stakeCred) (transDelegatee delegatee) (transCoin deposit)
PV3.TxCertRegDeleg (transCred stakeCred) (transDelegatee delegatee) (coinToLovelace deposit)
AuthCommitteeHotKeyTxCert coldCred hotCred ->
PV3.TxCertAuthHotCommittee (transColdCommitteeCred coldCred) (transHotCommitteeCred hotCred)
ResignCommitteeColdTxCert coldCred _anchor ->
PV3.TxCertResignColdCommittee (transColdCommitteeCred coldCred)
RegDRepTxCert drepCred deposit _anchor ->
PV3.TxCertRegDRep (transDRepCred drepCred) (transCoin deposit)
PV3.TxCertRegDRep (transDRepCred drepCred) (coinToLovelace deposit)
UnRegDRepTxCert drepCred refund ->
PV3.TxCertUnRegDRep (transDRepCred drepCred) (transCoin refund)
PV3.TxCertUnRegDRep (transDRepCred drepCred) (coinToLovelace refund)
UpdateDRepTxCert drepCred _anchor ->
PV3.TxCertUpdateDRep (transDRepCred drepCred)

Expand Down Expand Up @@ -361,12 +361,14 @@ transScriptPurpose ::
transScriptPurpose proxy = \case
ConwaySpending (AsItem txIn) -> pure $ PV3.Spending (transTxIn txIn)
ConwayMinting (AsItem policyId) -> pure $ PV3.Minting (Alonzo.transPolicyID policyId)
ConwayCertifying (AsItem txCert) -> PV3.Certifying <$> toPlutusTxCert proxy txCert
ConwayCertifying (AsItem txCert) ->
-- TODO: fix the index. Reqiures adding index to AsItem.
PV3.Certifying 0 <$> toPlutusTxCert proxy txCert
ConwayRewarding (AsItem rewardAccount) -> pure $ PV3.Rewarding (transRewardAccount rewardAccount)
ConwayVoting (AsItem voter) ->
pure $ PV3.Voting (transVoter voter) undefined
ConwayProposing (AsItem _proposal) ->
pure $ PV3.Proposing $ error "Requires adjustment on the Plutus side and implementation of #3957"
ConwayVoting (AsItem voter) -> pure $ PV3.Voting (transVoter voter)
ConwayProposing (AsItem proposal) ->
-- TODO: fix the index. Reqiures adding index to AsItem.
pure $ PV3.Proposing 0 (transProposal proposal)

transVoter :: Voter c -> PV3.Voter
transVoter = \case
Expand Down Expand Up @@ -396,7 +398,7 @@ transGovAction = \case
transProposal :: ProposalProcedure era -> PV3.ProposalProcedure
transProposal ProposalProcedure {pProcDeposit, pProcReturnAddr, pProcGovAction} =
PV3.ProposalProcedure
{ PV3.ppDeposit = transCoin pProcDeposit
{ PV3.ppDeposit = coinToLovelace pProcDeposit
, PV3.ppReturnAddr = transRewardAccount pProcReturnAddr
, PV3.ppGovernanceAction = transGovAction pProcGovAction
}
Expand Down

0 comments on commit 846e660

Please sign in to comment.