Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
errfrom committed Aug 2, 2024
1 parent 01708d6 commit 7c7b72a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 38 deletions.
8 changes: 4 additions & 4 deletions templates/ctl-scaffold/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion templates/ctl-scaffold/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
type = "github";
owner = "Plutonomicon";
repo = "cardano-transaction-lib";
rev = "127cc209a5d2c15cf77bc2edffc108baff9bc8a3";
rev = "01708d64e858a2ed3cbbc7a9a235d3acf79a7b91";
};
# To use the same version of `nixpkgs` as we do
nixpkgs.follows = "ctl/nixpkgs";
Expand Down
4 changes: 2 additions & 2 deletions templates/ctl-scaffold/packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ let additions =
]
, repo =
"https://github.com/mlabs-haskell/purescript-cardano-transaction-builder"
, version = "40628bbb1049f3eb5364d304f949135e2ee2a2fb"
, version = "36343059b67ffe15e74803078299a486959a5aa3"
}
, cardano-transaction-lib =
{ dependencies =
Expand Down Expand Up @@ -588,7 +588,7 @@ let additions =
, "web-storage"
]
, repo = "https://github.com/Plutonomicon/cardano-transaction-lib.git"
, version = "127cc209a5d2c15cf77bc2edffc108baff9bc8a3"
, version = "01708d64e858a2ed3cbbc7a9a235d3acf79a7b91"
}
}

Expand Down
12 changes: 6 additions & 6 deletions templates/ctl-scaffold/spago-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 18 additions & 25 deletions templates/ctl-scaffold/test/E2E.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import Contract.Prelude

import Contract.Config
( ContractParams
, KnownWallet(Nami, Gero, Flint, Eternl, Lode)
, WalletSpec(ConnectToGenericCip30)
, mainnetConfig
, testnetConfig
, walletName
)
import Contract.Monad (Contract)
import Contract.Test.E2E (E2EConfigName, E2ETestName, addLinks, route)
Expand All @@ -21,35 +22,27 @@ main = do
route configs tests

configs :: Map E2EConfigName (ContractParams /\ Maybe String)
configs = Map.fromFoldable
[ "nami" /\ testnetConfig' "nami" /\ Nothing
, "gero" /\ testnetConfig' "gerowallet" /\ Nothing
, "flint" /\ testnetConfig' "flint" /\ Nothing
, "eternl" /\ testnetConfig' "eternl" /\ Nothing
, "lode" /\ testnetConfig' "LodeWallet" /\ Nothing
, "nami-mock" /\ testnetConfig' "nami" /\ Just "nami"
, "gero-mock" /\ testnetConfig' "gerowallet" /\ Just "gerowallet"
, "flint-mock" /\ testnetConfig' "flint" /\ Just "flint"
, "lode-mock" /\ testnetConfig' "LodeWallet" /\ Just "LodeWallet"
-- Plutip cluster's network ID is set to mainnet:
, "plutip-nami-mock" /\ mainnetConfig' "nami" /\ Just "nami"
, "plutip-gero-mock" /\ mainnetConfig' "gerowallet" /\ Just "gerowallet"
, "plutip-flint-mock" /\ mainnetConfig' "flint" /\ Just "flint"
, "plutip-lode-mock" /\ mainnetConfig' "LodeWallet" /\ Just "LodeWallet"
configs = map (map walletName) <$> Map.fromFoldable
[ "nami" /\ testnetConfig' Nami /\ Nothing
, "gero" /\ testnetConfig' Gero /\ Nothing
, "flint" /\ testnetConfig' Flint /\ Nothing
, "eternl" /\ testnetConfig' Eternl /\ Nothing
, "lode" /\ testnetConfig' Lode /\ Nothing
, "nami-mock" /\ testnetConfig' Nami /\ Just Nami
, "gero-mock" /\ testnetConfig' Gero /\ Just Gero
, "flint-mock" /\ testnetConfig' Flint /\ Just Flint
, "lode-mock" /\ testnetConfig' Lode /\ Just Lode
, "plutip-nami-mock" /\ testnetConfig' Nami /\ Just Nami
, "plutip-gero-mock" /\ testnetConfig' Gero /\ Just Gero
, "plutip-flint-mock" /\ testnetConfig' Flint /\ Just Flint
, "plutip-lode-mock" /\ testnetConfig' Lode /\ Just Lode
]
where
testnetConfig' :: String -> ContractParams
testnetConfig' :: KnownWallet -> ContractParams
testnetConfig' wallet =
testnetConfig
{ walletSpec =
Just $ ConnectToGenericCip30 wallet { cip95: false }
}

mainnetConfig' :: String -> ContractParams
mainnetConfig' wallet =
mainnetConfig
{ walletSpec =
Just $ ConnectToGenericCip30 wallet { cip95: false }
Just $ ConnectToGenericCip30 (walletName wallet) { cip95: false }
}

tests :: Map E2ETestName (Contract Unit)
Expand Down

0 comments on commit 7c7b72a

Please sign in to comment.