Skip to content

Commit

Permalink
Extract lens
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodvp committed May 31, 2024
1 parent 032c217 commit b98e7eb
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 649 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Support for `ghc-8.10.7` and `cardano-node-1.35.4` will be maintained for a litt

We use the `TxBodyContent BuildTx BabbageEra` type from `cardano-api` as the basic type for building transactions. The `MonadBuildTx` class from `Convex.BuildTx` is essentially a writer for `TxBodyContent` modifications. `Convex.BuildTx` defines a number of helper functions for common tasks such as spending and creating Plutus script outputs, minting native assets, setting collateral, etc.

To `Convex.Lenses` defines some lenses for adding content to transaction bodies. These can be used together with `MonadBuildTx.addBtx`.
To `Convex.CardanoApi.Lenses` defines some lenses for adding content to transaction bodies. These can be used together with `MonadBuildTx.addBtx`.

```haskell
import qualified Cardano.API.Shelley as C
Expand Down
5 changes: 3 additions & 2 deletions src/base/convex-base.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ library
Convex.BuildTx
Convex.Class
Convex.Constants
Convex.Lenses
Convex.MonadLog
Convex.NodeQueries
Convex.PlutusLedger
Expand All @@ -54,6 +53,8 @@ library
either-result

build-depends:
convex-optics,

cardano-api == 8.45.0.0,
cardano-ledger-core,
cardano-crypto-wrapper,
Expand All @@ -74,4 +75,4 @@ library
bytestring,
dlist,
either-result,
strict-sop-core
strict-sop-core
2 changes: 1 addition & 1 deletion src/base/lib/Convex/BuildTx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ import Control.Monad.Writer.Class (MonadWriter (..))
import Convex.Class (MonadBlockchain (..),
MonadBlockchainCardanoNodeT,
MonadMockchain (..))
import qualified Convex.Lenses as L
import qualified Convex.CardanoApi.Lenses as L
import Convex.MonadLog (MonadLog (..), MonadLogIgnoreT,
MonadLogKatipT)
import Convex.Scripts (toHashableScriptData)
Expand Down
Loading

0 comments on commit b98e7eb

Please sign in to comment.