Skip to content

Commit

Permalink
Update to shelley-ma
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Nov 24, 2020
1 parent 9fd020c commit d4a572f
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 61 deletions.
106 changes: 56 additions & 50 deletions cabal.project
Expand Up @@ -8,31 +8,31 @@ packages:
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 13f44ad35d2762dbf98b3d3be56b7ba2adf515f4
tag: 6226a0feb1d74f50a430242a1b4608fd48e10aad
subdir: binary

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 13f44ad35d2762dbf98b3d3be56b7ba2adf515f4
tag: 6226a0feb1d74f50a430242a1b4608fd48e10aad
subdir: binary/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 13f44ad35d2762dbf98b3d3be56b7ba2adf515f4
tag: 6226a0feb1d74f50a430242a1b4608fd48e10aad
subdir: cardano-crypto-class

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 13f44ad35d2762dbf98b3d3be56b7ba2adf515f4
tag: 6226a0feb1d74f50a430242a1b4608fd48e10aad
subdir: slotting

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-base
tag: 13f44ad35d2762dbf98b3d3be56b7ba2adf515f4
tag: 6226a0feb1d74f50a430242a1b4608fd48e10aad
subdir: cardano-crypto-praos

source-repository-package
Expand All @@ -43,110 +43,116 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: semantics/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: semantics/small-steps-test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: byron/ledger/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: byron/ledger/impl

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: byron/crypto

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: byron/ledger/impl/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: byron/crypto/test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: byron/chain/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: shelley/chain-and-ledger/dependencies/non-integer

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: shelley/chain-and-ledger/executable-spec

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 4edcdab87510b2657c62bcf14035817ce6e23455
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: shelley/chain-and-ledger/shelley-spec-ledger-test

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: 7c64ed8ca2e2141780326ac2990f59ab942356af
subdir: shelley-ma/impl

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: 1f2f51164b53b9b775c03ac9f1e23e7b70c74b05
tag: 6ced601eb6fba892358ef3257a18ad8941d04f9f
subdir: cardano-api

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: 1f2f51164b53b9b775c03ac9f1e23e7b70c74b05
tag: 6ced601eb6fba892358ef3257a18ad8941d04f9f
subdir: cardano-cli

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: 1f2f51164b53b9b775c03ac9f1e23e7b70c74b05
tag: 6ced601eb6fba892358ef3257a18ad8941d04f9f
subdir: cardano-config

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: 1f2f51164b53b9b775c03ac9f1e23e7b70c74b05
tag: 6ced601eb6fba892358ef3257a18ad8941d04f9f
subdir: cardano-node

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node
tag: 1f2f51164b53b9b775c03ac9f1e23e7b70c74b05
tag: 6ced601eb6fba892358ef3257a18ad8941d04f9f
subdir: hedgehog-extras

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 0c5b0a6619fadf22f4d62a12154e181a6d035c1c
subdir: .
tag: 58e146c14e1349553d0ed75dd5245bbe65f0533e
subdir: cardano-prelude

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 0c5b0a6619fadf22f4d62a12154e181a6d035c1c
subdir: test
tag: 58e146c14e1349553d0ed75dd5245bbe65f0533e
subdir: cardano-prelude-test

source-repository-package
type: git
Expand All @@ -161,127 +167,127 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: contra-tracer

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: iohk-monitoring

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: plugins/backend-aggregation

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: plugins/backend-ekg

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: plugins/backend-monitoring

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
subdir: plugins/scribe-systemd
--source-repository-package
-- type: git
-- location: https://github.com/input-output-hk/iohk-monitoring-framework
-- tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
-- subdir: plugins/scribe-systemd

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: tracer-transformers

source-repository-package
type: git
location: https://github.com/input-output-hk/iohk-monitoring-framework
tag: 743f266cfe5fff11d18602faf510f22a544ea295
tag: b5965e013fbcfb2a155582953d4a9a99eee22a8a
subdir: plugins/backend-trace-forwarder

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: io-sim

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: io-sim-classes

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: network-mux

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ntp-client

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ouroboros-network

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ouroboros-consensus

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ouroboros-consensus-byron

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ouroboros-consensus-cardano

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ouroboros-consensus-shelley

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: typed-protocols

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: typed-protocols-examples

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: ouroboros-network-framework

source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: f56e5d7ad2ebf5f8750f13a430bb93f8036f5e9d
tag: 9aa3cb03deb367f5f237ab694d2c9e01b6cf431f
subdir: Win32-network

source-repository-package
Expand Down
4 changes: 2 additions & 2 deletions cabal.project.freeze
Expand Up @@ -201,7 +201,7 @@ constraints: any.ALUT ==2.4.0.3,
any.base-prelude ==1.3,
any.base-unicode-symbols ==0.2.3,
any.base16 ==0.1.2.1,
any.base16-bytestring ==0.1.1.6,
any.base16-bytestring ==1.0.1.0,
any.base32string ==0.9.1,
any.base58-bytestring ==0.1.0,
any.base58string ==0.10.0,
Expand Down Expand Up @@ -2127,7 +2127,7 @@ constraints: any.ALUT ==2.4.0.3,
any.text-ansi ==0.1.0,
any.text-binary ==0.2.1.1,
any.text-builder ==0.6.6.1,
any.text-conversions ==0.3.0,
any.text-conversions ==0.3.1,
any.text-format ==0.3.2,
any.text-icu ==0.7.0.1,
any.text-latin1 ==0.3.1,
Expand Down
18 changes: 9 additions & 9 deletions src/Data/UTxO/Transaction/Cardano/Shelley.hs
Expand Up @@ -137,10 +137,10 @@ mkOutput
mkOutput coin bytes =
Cardano.deserialiseFromRawBytes Cardano.AsShelleyAddress bytes >>= \case
Cardano.ShelleyAddress _ (Ledger.ScriptHashObj _) _ -> Nothing
addr@(Cardano.ByronAddress _) ->
pure $ Cardano.TxOut addr (Cardano.Lovelace $ fromIntegral coin)
addr@(Cardano.ShelleyAddress _ (Ledger.KeyHashObj _) _) ->
pure $ Cardano.TxOut addr (Cardano.Lovelace $ fromIntegral coin)
pure $ Cardano.TxOut (Cardano.shelleyAddressInEra addr)
(Cardano.TxOutAdaOnly Cardano.AdaOnlyInShelleyEra
$ Cardano.Lovelace $ fromIntegral coin)

-- | Construct a 'SignKey' for /Shelley/ from primitive types.
-- This is for Shelley era keys.
Expand Down Expand Up @@ -227,19 +227,19 @@ instance MkPayment Shelley where
type Init Shelley = (NetworkId, SlotNo, Fee)

type Input Shelley = TxIn
type Output Shelley = TxOut Cardano.Shelley
type Output Shelley = TxOut Cardano.ShelleyEra
type SignKey Shelley = CardanoSigningKey

type CoinSel Shelley =
(NetworkId, SlotNo, Fee, [TxIn], [TxOut Cardano.Shelley])
(NetworkId, SlotNo, Fee, [TxIn], [TxOut Cardano.ShelleyEra])

type Tx Shelley = Either
ErrMkPayment
( NetworkId
, [TxIn]
, [TxOut Cardano.Shelley]
, Cardano.TxBody Cardano.Shelley
, [Cardano.Witness Cardano.Shelley]
, [TxOut Cardano.ShelleyEra]
, Cardano.TxBody Cardano.ShelleyEra
, [Cardano.Witness Cardano.ShelleyEra]
)

empty :: Init Shelley -> CoinSel Shelley
Expand All @@ -248,7 +248,7 @@ instance MkPayment Shelley where
addInput :: TxIn -> CoinSel Shelley -> CoinSel Shelley
addInput inp (pm, ttl, fee, inps, outs) = (pm, ttl, fee, inp : inps, outs)

addOutput :: TxOut Cardano.Shelley -> CoinSel Shelley -> CoinSel Shelley
addOutput :: TxOut Cardano.ShelleyEra -> CoinSel Shelley -> CoinSel Shelley
addOutput out (pm, ttl, fee, inps, outs) = (pm, ttl, fee, inps, out : outs)

lock :: CoinSel Shelley -> Tx Shelley
Expand Down

0 comments on commit d4a572f

Please sign in to comment.