morley-1.4.0: src/Michelson/Runtime/TxData.hs
-- SPDX-FileCopyrightText: 2020 Tocqueville Group
--
-- SPDX-License-Identifier: LicenseRef-MIT-TQ
-- | 'TxData' type and associated functionality.
module Michelson.Runtime.TxData
( TxData (..)
, tdSenderAddressL
, tdParameterL
, tdEntrypointL
, tdAmountL
) where
import Control.Lens (makeLensesWith)
import Data.Aeson.TH (deriveJSON)
import Michelson.Untyped (EpName, Value)
import Tezos.Address (Address)
import Tezos.Core (Mutez)
import Util.Aeson (morleyAesonOptions)
import Util.Lens (postfixLFields)
-- | Data associated with a particular transaction.
data TxData = TxData
{ tdSenderAddress :: Address
, tdParameter :: Value
, tdEntrypoint :: EpName
, tdAmount :: Mutez
} deriving stock (Show, Eq)
makeLensesWith postfixLFields ''TxData
deriveJSON morleyAesonOptions ''TxData