Skip to content

Commit

Permalink
cardano-api upgrade: use convert instead of deprecated conwayEraOnwar…
Browse files Browse the repository at this point in the history
…dsToShelleyBasedEra
  • Loading branch information
neilmayhew committed Dec 12, 2024
1 parent 2b1d1ce commit 696032a
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cardano-testnet/src/Testnet/Components/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ getGovState
-> m (L.ConwayGovState (ShelleyLedgerEra era)) -- ^ The governance state
getGovState epochStateView ceo = withFrozenCallStack $ do
AnyNewEpochState sbe' newEpochState <- getEpochState epochStateView
let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo
Refl <- H.leftFail $ assertErasEqual sbe sbe'
pure $ conwayEraOnwardsConstraints ceo $ newEpochState ^. L.newEpochStateGovStateL

Expand Down
4 changes: 2 additions & 2 deletions cardano-testnet/src/Testnet/Process/Cli/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ registerDRep
-- as returned by 'cardanoTestnetDefault'.
-> m (KeyPair PaymentKey)
registerDRep execConfig epochStateView ceo work prefix wallet = do
let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era

Expand Down Expand Up @@ -354,7 +354,7 @@ makeActivityChangeProposal
makeActivityChangeProposal execConfig epochStateView ceo work
prevGovActionInfo drepActivity stakeKeyPair wallet timeout = do

let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era
KeyPair{verificationKey=File stakeVkeyFp} = stakeKeyPair
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ hprop_plutus_v3 = integrationWorkspace "all-plutus-script-purposes" $ \tempAbsBa
let
tempBaseAbsPath = makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath'
ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
era = toCardanoEra sbe
anyEra = AnyCardanoEra era
options = def { cardanoNodeEra = AnyShelleyBasedEra sbe }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ hprop_kes_period_info = integrationRetryWorkspace 2 "kes-period-info" $ \tempAbs

let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
asbe = AnyShelleyBasedEra sbe
eraString = eraToString sbe
cTestnetOptions = def { cardanoNodeEra = asbe }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ hprop_leadershipSchedule = integrationRetryWorkspace 2 "leadership-schedule" $ \
conf@Conf { tempAbsPath=tempAbsPath@(TmpAbsolutePath work) } <- mkConf tempAbsBasePath'
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath
ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
asbe = AnyShelleyBasedEra sbe
cTestnetOptions = def
{ cardanoNodeEra = asbe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ hprop_tx_register_deregister_stake_address = integrationWorkspace "register-dere
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
eraName = eraToString sbe
fastTestnetOptions = def { cardanoNodeEra = AnyShelleyBasedEra sbe }
shelleyOptions = def { genesisEpochLength = 200 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ hprop_constitutional_committee_add_new = integrationWorkspace "constitutional-co
nDrepVotes = length drepVotes
nSpos = fromIntegral $ cardanoNumPools fastTestnetOptions
ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era
eraName = eraToString era
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ hprop_check_drep_activity = integrationWorkspace "test-activity" $ \tempAbsBaseP

-- Create default testnet with 3 DReps and 3 stake holders delegated, one to each DRep.
let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
fastTestnetOptions = def
{ cardanoNodeEra = AnyShelleyBasedEra sbe
, cardanoNumDReps = 1
Expand Down Expand Up @@ -219,7 +219,7 @@ activityChangeProposalTest
-> m (String, Word16) -- ^ The transaction id and the index of the governance action.
activityChangeProposalTest execConfig epochStateView ceo work prefix
stakeKeys wallet votes change minWait mExpected maxWait = do
let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo

mPreviousProposalInfo <- getLastPParamUpdateActionId execConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ hprop_ledger_events_drep_deposits = integrationWorkspace "drep-deposits" $ \temp
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era
fastTestnetOptions = def
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ hprop_check_gov_action_timeout = integrationWorkspace "gov-action-timeout" $ \te

-- Create default testnet
let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
eraName = eraToString sbe
asbe = AnyShelleyBasedEra sbe
fastTestnetOptions = def { cardanoNodeEra = asbe }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ hprop_ledger_events_info_action = integrationRetryWorkspace 2 "info-hash" $ \tem
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
asbe = AnyShelleyBasedEra sbe
eraName = eraToString sbe
fastTestnetOptions = def { cardanoNodeEra = asbe }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ hprop_gov_no_confidence = integrationWorkspace "no-confidence" $ \tempAbsBasePat
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
asbe = AnyShelleyBasedEra sbe
era = toCardanoEra sbe
cEra = AnyCardanoEra era
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ hprop_check_pparam_fails_spo = integrationWorkspace "test-pparam-spo" $ \tempAbs

-- Create default testnet
let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
asbe = AnyShelleyBasedEra sbe
eraName = eraToString sbe
fastTestnetOptions = def { cardanoNodeEra = asbe }
Expand Down Expand Up @@ -163,7 +163,7 @@ failToVoteChangeProposalWithSPOs ceo execConfig epochStateView work prefix
governanceActionTxId governanceActionIndex votes wallet = withFrozenCallStack $ do
baseDir <- H.createDirectoryIfMissing $ work </> prefix

let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ hprop_check_predefined_abstain_drep = H.integrationWorkspace "test-activity" $ \

-- Create default testnet with 3 DReps and 3 stake holders delegated, one to each DRep.
let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
fastTestnetOptions = def
{ cardanoNodeEra = AnyShelleyBasedEra sbe
, cardanoNumDReps = 3
Expand Down Expand Up @@ -186,7 +186,7 @@ desiredPoolNumberProposalTest
-> m (String, Word16)
desiredPoolNumberProposalTest execConfig epochStateView ceo work prefix wallet
previousProposalInfo votes change minWait mExpected maxWait = do
let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo

baseDir <- H.createDirectoryIfMissing $ work </> prefix

Expand Down Expand Up @@ -229,7 +229,7 @@ makeDesiredPoolNumberChangeProposal
makeDesiredPoolNumberChangeProposal execConfig epochStateView ceo work prefix
prevGovActionInfo desiredPoolNumber wallet = do

let sbe = conwayEraOnwardsToShelleyBasedEra ceo
let sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ hprop_ledger_events_propose_new_constitution = integrationWorkspace "propose-new
annotateShow numVotes

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era
eraName = eraToString sbe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ hprop_ledger_events_propose_new_constitution_spo = integrationWorkspace "propose
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
era = toCardanoEra sbe
cEra = AnyCardanoEra era
fastTestnetOptions = def
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ hprop_ledger_events_treasury_donation = integrationRetryWorkspace 2 "treasury-do
let tempBaseAbsPath = makeTmpBaseAbsPath tempAbsPath

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
fastTestnetOptions = def { cardanoNodeEra = AnyShelleyBasedEra sbe }
shelleyOptions = def { genesisEpochLength = 100 }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ hprop_ledger_events_treasury_withdrawal = integrationRetryWorkspace 2 "treasury
work <- H.createDirectoryIfMissing $ tempAbsPath' </> "work"

let ceo = ConwayEraOnwardsConway
sbe = conwayEraOnwardsToShelleyBasedEra ceo
sbe = convert ceo
era = toCardanoEra sbe
eraName = eraToString era

Expand Down

0 comments on commit 696032a

Please sign in to comment.