-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
2,248 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
:set -Wunused-binds -Wunused-imports -Worphans | ||
:set -isrc -itest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--reload=cem-script.cabal --command="cabal repl test-suite:cem-sdk-test" -W -T ":main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,5 @@ cabal.project.local | |
cabal.project.local~ | ||
.HTF/ | ||
.ghc.environment.* | ||
devnet/db | ||
haddocks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,9 @@ synopsis: Cardano DApp SDK | |
homepage: https://github.com/cem-script | ||
author: MLabs | ||
maintainer: [email protected] | ||
data-files: README.md | ||
data-files: | ||
README.md | ||
data/alonzo-params.json | ||
|
||
-- @todo #3 Reproduce `cabal repl` and HLS build on another (@adamczykm) computer | ||
tested-with: GHC ==9.6.3 | ||
|
@@ -21,10 +23,11 @@ common common-lang | |
-- Options from MLabs styleguide | ||
|
||
ghc-options: | ||
-Wall -Wcompat -Wincomplete-record-updates | ||
-Wincomplete-uni-patterns -Wredundant-constraints | ||
-Wmissing-export-lists -Wmissing-deriving-strategies | ||
-Wno-redundant-constraints | ||
-- -Wall | ||
-- -Wcompat -Wincomplete-record-updates | ||
-- -Wincomplete-uni-patterns -Wredundant-constraints | ||
-- -Wmissing-export-lists -Wmissing-deriving-strategies | ||
-- -Wno-redundant-constraints | ||
|
||
if !flag(dev) | ||
ghc-options: -Werror | ||
|
@@ -76,6 +79,7 @@ common common-lang | |
TypeOperators | ||
TypeSynonymInstances | ||
UndecidableInstances | ||
NoPolyKinds | ||
|
||
if flag(dev) | ||
default-extensions: PartialTypeSignatures | ||
|
@@ -89,24 +93,41 @@ common common-onchain | |
, plutus-ledger-api | ||
, plutus-tx | ||
, plutus-tx-plugin | ||
, template-haskell >= 2.20 | ||
, th-abstraction >= 0.6.0.0 | ||
|
||
if flag(dev) | ||
ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors | ||
-- if flag(dev) | ||
-- ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors | ||
|
||
-- Options for Plutus Tx compilations | ||
-- (some are enabled additionaly in individual modules) | ||
|
||
ghc-options: | ||
-fplugin-opt PlutusTx.Plugin:target-version=1.0.0 -fobject-code | ||
-fplugin-opt PlutusTx.Plugin:target-version=1.0.0 | ||
-fobject-code | ||
-fno-ignore-interface-pragmas -fno-omit-interface-pragmas | ||
-fno-specialize -fno-unbox-small-strict-fields | ||
-fno-unbox-strict-fields | ||
-fno-full-laziness | ||
-fno-spec-constr | ||
-fno-strictness | ||
-fno-unbox-small-strict-fields | ||
|
||
common common-offchain | ||
import: common-lang | ||
build-depends: | ||
, aeson | ||
, bytestring | ||
, pretty-show | ||
, retry | ||
, cardano-api | ||
-- , cardano-cli | ||
, cardano-ledger-core | ||
, cardano-ledger-babbage | ||
, cardano-ledger-alonzo | ||
, cardano-ledger-shelley | ||
, ouroboros-consensus-cardano | ||
, cardano-crypto-class | ||
, containers | ||
, filepath | ||
, text | ||
|
@@ -117,16 +138,63 @@ common common-executable | |
import: common-offchain | ||
ghc-options: -threaded -rtsopts | ||
|
||
library cem-sdk | ||
library data-spine | ||
import: | ||
common-lang | ||
hs-source-dirs: src-lib/data-spine | ||
build-depends: | ||
template-haskell, | ||
singletons, | ||
exposed-modules: | ||
Data.Spine | ||
|
||
library cardano-extras | ||
import: | ||
common-offchain, | ||
common-onchain | ||
hs-source-dirs: | ||
src-lib/cardano-extras | ||
build-depends: | ||
template-haskell, | ||
exposed-modules: | ||
Plutus.Extras | ||
Cardano.Extras | ||
|
||
library | ||
import: | ||
common-onchain, | ||
common-offchain | ||
|
||
hs-source-dirs: src/ | ||
exposed-modules: | ||
Cardano.CEM | ||
Cardano.CEM.Stages | ||
Cardano.CEM.Examples.Auction | ||
Cardano.CEM.Examples.Compilation | ||
-- Cardano.CEM.Examples.Escrow | ||
Cardano.CEM.Examples.Voting | ||
Cardano.CEM.Monads | ||
Cardano.CEM.Monads.L1 | ||
Cardano.CEM.OnChain | ||
build-depends: | ||
cem-script:data-spine, | ||
cem-script:cardano-extras, | ||
dependent-map, | ||
singletons-th, | ||
-- plutarch, | ||
|
||
test-suite cem-sdk-test | ||
import: | ||
common-onchain, | ||
common-offchain, | ||
type: exitcode-stdio-1.0 | ||
build-depends: | ||
hspec, | ||
cem-script, | ||
QuickCheck, | ||
quickcheck-dynamic, | ||
cem-script:data-spine, | ||
cem-script:cardano-extras, | ||
dependent-map, | ||
random, | ||
hs-source-dirs: test/ | ||
main-is: Main.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
{ | ||
"genDelegs": {} | ||
"genDelegs": {}, | ||
"poolVotingThresholds": { | ||
"pvtCommitteeNormal": 0.51, | ||
"pvtCommitteeNoConfidence": 0.51, | ||
"pvtHardForkInitiation": 0.51, | ||
"pvtMotionNoConfidence": 0.51 | ||
}, | ||
"dRepVotingThresholds": { | ||
"dvtMotionNoConfidence": 0.51, | ||
"dvtCommitteeNormal": 0.51, | ||
"dvtCommitteeNoConfidence": 0.51, | ||
"dvtUpdateToConstitution": 0.51, | ||
"dvtHardForkInitiation": 0.51, | ||
"dvtPPNetworkGroup": 0.51, | ||
"dvtPPEconomicGroup": 0.51, | ||
"dvtPPTechnicalGroup": 0.51, | ||
"dvtPPGovGroup": 0.51, | ||
"dvtTreasuryWithdrawal": 0.51 | ||
}, | ||
"committeeMinSize": 0, | ||
"committeeMaxTermLength": 200, | ||
"govActionLifetime": 10, | ||
"govActionDeposit": 1000000000, | ||
"dRepDeposit": 2000000, | ||
"dRepActivity": 20, | ||
"constitution": { | ||
"anchor": { | ||
"url": "", | ||
"dataHash": "0000000000000000000000000000000000000000000000000000000000000000" | ||
} | ||
}, | ||
"committee": { | ||
"members": { | ||
}, | ||
"quorum": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
services: | ||
cardano-node-devnet: | ||
image: ghcr.io/input-output-hk/cardano-node:8.7.3 | ||
volumes: | ||
- ./devnet:/devnet | ||
environment: | ||
- CARDANO_BLOCK_PRODUCER=true | ||
- CARDANO_SOCKET_PATH=/devnet/node.socket # used by cardano-node | ||
- CARDANO_NODE_SOCKET_PATH=/devnet/node.socket # used by cardano-cli | ||
command: | ||
[ "run" | ||
, "--config", "/devnet/cardano-node.json" | ||
, "--topology", "/devnet/topology.json" | ||
, "--database-path", "/devnet/db" | ||
, "--shelley-kes-key", "/devnet/kes.skey" | ||
, "--shelley-vrf-key", "/devnet/vrf.skey" | ||
, "--shelley-operational-certificate", "/devnet/opcert.cert" | ||
, "--byron-delegation-certificate", "/devnet/byron-delegation.cert" | ||
, "--byron-signing-key", "/devnet/byron-delegate.key" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TARGETDIR=devnet | ||
sed -i "s/\"startTime\": [0-9]*/\"startTime\": $(date +%s)/" "$TARGETDIR/genesis-byron.json" && \ | ||
sed -i "s/\"systemStart\": \".*\"/\"systemStart\": \"$(date -u +%FT%TZ)\"/" "$TARGETDIR/genesis-shelley.json" | ||
sudo chown -R $USER:$USER ./devnet/ |
Oops, something went wrong.