Skip to content

Commit

Permalink
Babbage: TxBody + TxOut (IntersectMBO#2560)
Browse files Browse the repository at this point in the history
* add babbage era, TxBody and TxOut

* update collateralReturn

* reuse Alonzo code, update TxOut

* revert pattern synonym change

* WIP

* correct FromCBOR instance

* Update eras/babbage/impl/src/Cardano/Ledger/Babbage/TxBody.hs

Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>

Co-authored-by: Alexey Kuleshevich <alexey.kuleshevich@iohk.io>
  • Loading branch information
goolord and lehins committed Feb 5, 2022
1 parent 69f2068 commit caf7cce
Show file tree
Hide file tree
Showing 7 changed files with 994 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ index-state: 2021-12-03T06:07:23Z
packages:
eras/alonzo/impl
eras/alonzo/test-suite
eras/babbage/impl
eras/byron/chain/executable-spec
eras/byron/ledger/executable-spec
eras/byron/ledger/impl
Expand Down Expand Up @@ -119,6 +120,9 @@ package cardano-ledger-alonzo
package cardano-ledger-alonzo-test
ghc-options: -Werror

package cardano-ledger-babbage
ghc-options: -Werror

package byron-spec-chain
ghc-options: -Werror

Expand Down
5 changes: 5 additions & 0 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxBody.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ module Cardano.Ledger.Alonzo.TxBody
scriptIntegrityHash',
adHash',
txnetworkid',
getAdaOnly,
decodeDataHash32,
encodeDataHash32,
encodeAddress28,
decodeAddress28,
AlonzoBody,
EraIndependentScriptIntegrity,
ScriptIntegrityHash,
Expand Down
1 change: 1 addition & 0 deletions eras/babbage/impl/.ghcid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-c "nix-shell ../../shell.nix --run \"cabal repl cardano-ledger-babbage\"" -o ghcid.txt
3 changes: 3 additions & 0 deletions eras/babbage/impl/Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Distribution.Simple

main = defaultMain
71 changes: 71 additions & 0 deletions eras/babbage/impl/cardano-ledger-babbage.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
cabal-version: 3.0

name: cardano-ledger-babbage
version: 0.1.0.0
synopsis: TODO
description: TODO
bug-reports: https://github.com/input-output-hk/cardano-ledger/issues
license: Apache-2.0
author: IOHK Formal Methods Team
maintainer: formal.methods@iohk.io
copyright: 2020 Input Output (Hong Kong) Ltd.
category: Network
build-type: Simple

source-repository head
type: git
location: https://github.com/input-output-hk/cardano-ledger
subdir: eras/babbage/impl

common base
build-depends: base >= 4.12 && < 4.15

common project-config
default-language: Haskell2010

ghc-options: -Wall
-Wcompat
-Wincomplete-record-updates
-Wincomplete-uni-patterns
-Wpartial-fields
-Wredundant-constraints
-- -Wunused-packages

library
import: base, project-config
exposed-modules:
Cardano.Ledger.Babbage.TxBody
build-depends:
array,
base-deriving-via,
base64-bytestring,
bytestring,
cardano-binary,
cardano-crypto-class,
cardano-data,
cardano-ledger-alonzo,
cardano-ledger-core,
cardano-ledger-shelley,
cardano-ledger-shelley-ma,
cardano-prelude,
cardano-slotting,
containers,
data-default,
deepseq,
measures,
mtl,
nothunks,
plutus-core,
plutus-ledger-api,
plutus-tx,
prettyprinter,
serialise,
set-algebra,
small-steps,
strict-containers,
text,
time,
transformers,
utf8-string,
hs-source-dirs:
src
Loading

0 comments on commit caf7cce

Please sign in to comment.