diff --git a/cabal.project b/cabal.project index b2b9d2314d..ab8bdd2e20 100644 --- a/cabal.project +++ b/cabal.project @@ -22,9 +22,9 @@ packages: source-repository-package type: git location: https://github.com/IntersectMBO/cardano-api.git - tag: d77f096d0647c38bc2f87a97fda28cef7f31c679 + tag: 9560e4572f44ff2b466f881d9353ade446f27e1f subdir: cardano-api - --sha256: sha256-lFDjMQayPFhc5suvTChFZHtuVIOM9oLVDsfAZ42qm0k= + --sha256: sha256-Innf1vfuHZzTcTcqDV7SIhHe2rUD1UbqwifUnUQx+7I= package cardano-cli ghc-options: -Werror diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs index 6deb694d27..ec0c6da598 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/CreateTestnetData.hs @@ -325,19 +325,19 @@ runGenesisCreateTestNetDataCmd Cmd.GenesisCreateTestNetDataCmdArgs -> L.ConwayGenesis L.StandardCrypto -> L.ConwayGenesis L.StandardCrypto addDRepsToConwayGenesis dRepKeys stakingKeys conwayGenesis = conwayGenesis { L.cgDelegs = delegs (zip stakingKeys (case dRepKeys of [] -> []; _ -> cycle dRepKeys)) - , L.cgInitialDReps = initialDReps dRepKeys + , L.cgInitialDReps = initialDReps (L.ucppDRepDeposit $ L.cgUpgradePParams conwayGenesis) dRepKeys } where delegs :: [(VerificationKey StakeKey, VerificationKey DRepKey)] -> ListMap (L.Credential L.Staking L.StandardCrypto) (L.Delegatee L.StandardCrypto) delegs = ListMap.fromList . map (bimap verificationKeytoStakeCredential (L.DelegVote . L.DRepCredential . verificationKeyToDRepCredential)) - initialDReps :: [VerificationKey DRepKey] -> ListMap (L.Credential L.DRepRole L.StandardCrypto) (L.DRepState L.StandardCrypto) - initialDReps = ListMap.fromList . map (\c -> ( verificationKeyToDRepCredential c - , L.DRepState { L.drepExpiry = EpochNo 1000 - , L.drepAnchor = SNothing - , L.drepDeposit = L.Coin 100_000_000 - })) + initialDReps :: L.Coin -> [VerificationKey DRepKey] -> ListMap (L.Credential L.DRepRole L.StandardCrypto) (L.DRepState L.StandardCrypto) + initialDReps minDeposit = ListMap.fromList . map (\c -> ( verificationKeyToDRepCredential c + , L.DRepState { L.drepExpiry = EpochNo 1000 + , L.drepAnchor = SNothing + , L.drepDeposit = max (L.Coin 1_000_000) minDeposit + })) verificationKeyToDRepCredential :: VerificationKey DRepKey -> L.Credential L.DRepRole L.StandardCrypto verificationKeyToDRepCredential vk = dRepKeyToCredential (verificationKeyHash vk)