Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data U = U
- data A = A
- data B = B
- data PoolState = PoolState
- data Liquidity = Liquidity
- newtype Coin a = Coin {
- unCoin :: AssetClass
- newtype Amount a = Amount {}
- valueOf :: Coin a -> Amount a -> Value
- unitValue :: Coin a -> Value
- isUnity :: Value -> Coin a -> Bool
- amountOf :: Value -> Coin a -> Amount a
- mkCoin :: CurrencySymbol -> TokenName -> Coin a
- newtype Uniswap = Uniswap {}
- data LiquidityPool = LiquidityPool {}
- data UniswapAction
- data UniswapDatum
Documentation
Uniswap coin token
Instances
Eq U Source # | |
Data U Source # | |
Defined in Plutus.Contracts.Uniswap.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> U -> c U Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c U Source # toConstr :: U -> Constr Source # dataTypeOf :: U -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c U) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c U) Source # gmapT :: (forall b. Data b => b -> b) -> U -> U Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> U -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> U -> r Source # gmapQ :: (forall d. Data d => d -> u) -> U -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> U -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> U -> m U Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> U -> m U Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> U -> m U Source # | |
Show U Source # | |
Generic U Source # | |
ToData U Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: U -> BuiltinData | |
FromData U Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe U | |
UnsafeFromData U Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> U | |
Lift DefaultUni U Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Typeable DefaultUni U Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
type Rep U Source # | |
A-side coin token
Instances
Data A Source # | |
Defined in Plutus.Contracts.Uniswap.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> A -> c A Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c A Source # toConstr :: A -> Constr Source # dataTypeOf :: A -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c A) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c A) Source # gmapT :: (forall b. Data b => b -> b) -> A -> A Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> A -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> A -> r Source # gmapQ :: (forall d. Data d => d -> u) -> A -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> A -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> A -> m A Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> A -> m A Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> A -> m A Source # | |
ToData A Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: A -> BuiltinData | |
FromData A Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe A | |
UnsafeFromData A Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> A | |
Lift DefaultUni A Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Typeable DefaultUni A Source # | |
Defined in Plutus.Contracts.Uniswap.Types |
B-side coin token
Instances
Data B Source # | |
Defined in Plutus.Contracts.Uniswap.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> B -> c B Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c B Source # toConstr :: B -> Constr Source # dataTypeOf :: B -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c B) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c B) Source # gmapT :: (forall b. Data b => b -> b) -> B -> B Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> B -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> B -> r Source # gmapQ :: (forall d. Data d => d -> u) -> B -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> B -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> B -> m B Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> B -> m B Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> B -> m B Source # | |
ToData B Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: B -> BuiltinData | |
FromData B Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe B | |
UnsafeFromData B Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> B | |
Lift DefaultUni B Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Typeable DefaultUni B Source # | |
Defined in Plutus.Contracts.Uniswap.Types |
Pool-state coin token
Instances
Data PoolState Source # | |
Defined in Plutus.Contracts.Uniswap.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PoolState -> c PoolState Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PoolState Source # toConstr :: PoolState -> Constr Source # dataTypeOf :: PoolState -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PoolState) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PoolState) Source # gmapT :: (forall b. Data b => b -> b) -> PoolState -> PoolState Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PoolState -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PoolState -> r Source # gmapQ :: (forall d. Data d => d -> u) -> PoolState -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> PoolState -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> PoolState -> m PoolState Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PoolState -> m PoolState Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PoolState -> m PoolState Source # | |
ToData PoolState Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: PoolState -> BuiltinData | |
FromData PoolState Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe PoolState | |
UnsafeFromData PoolState Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> PoolState | |
Lift DefaultUni PoolState Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Typeable DefaultUni PoolState Source # | |
Defined in Plutus.Contracts.Uniswap.Types |
Liquidity-state coin token
Instances
Data Liquidity Source # | |
Defined in Plutus.Contracts.Uniswap.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Liquidity -> c Liquidity Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Liquidity Source # toConstr :: Liquidity -> Constr Source # dataTypeOf :: Liquidity -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Liquidity) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Liquidity) Source # gmapT :: (forall b. Data b => b -> b) -> Liquidity -> Liquidity Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Liquidity -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Liquidity -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Liquidity -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Liquidity -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Liquidity -> m Liquidity Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Liquidity -> m Liquidity Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Liquidity -> m Liquidity Source # | |
ToData Liquidity Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: Liquidity -> BuiltinData | |
FromData Liquidity Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe Liquidity | |
UnsafeFromData Liquidity Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> Liquidity | |
Lift DefaultUni Liquidity Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Typeable DefaultUni Liquidity Source # | |
Defined in Plutus.Contracts.Uniswap.Types |
A single AssetClass
. Because we use three coins, we use a phantom type to track
which one is which.
Instances
Lift DefaultUni (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Eq (Coin a) Source # | |
Data a => Data (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Coin a -> c (Coin a) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Coin a) Source # toConstr :: Coin a -> Constr Source # dataTypeOf :: Coin a -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Coin a)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Coin a)) Source # gmapT :: (forall b. Data b => b -> b) -> Coin a -> Coin a Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Coin a -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Coin a -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Coin a -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Coin a -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Coin a -> m (Coin a) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Coin a -> m (Coin a) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Coin a -> m (Coin a) Source # | |
Ord (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
Show (Coin a) Source # | |
Generic (Coin a) Source # | |
FromJSON (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types parseJSON :: Value -> Parser (Coin a) parseJSONList :: Value -> Parser [Coin a] | |
ToJSON (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types toEncoding :: Coin a -> Encoding toJSONList :: [Coin a] -> Value toEncodingList :: [Coin a] -> Encoding | |
ToData a => ToData (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: Coin a -> BuiltinData | |
FromData a => FromData (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe (Coin a) | |
Eq (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
UnsafeFromData a => UnsafeFromData (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> Coin a | |
Typeable a => ToSchema (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types declareNamedSchema :: Proxy (Coin a) -> Declare (Definitions Schema) NamedSchema | |
Typeable DefaultUni Coin Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
type Rep (Coin a) Source # | |
Defined in Plutus.Contracts.Uniswap.Types |
Instances
Instances
data LiquidityPool Source #
Instances
data UniswapAction Source #
Instances
Show UniswapAction Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
ToData UniswapAction Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: UniswapAction -> BuiltinData | |
FromData UniswapAction Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe UniswapAction | |
UnsafeFromData UniswapAction Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> UniswapAction | |
Lift DefaultUni UniswapAction Source # | |
Defined in Plutus.Contracts.Uniswap.Types lift :: UniswapAction -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) | |
Typeable DefaultUni UniswapAction Source # | |
Defined in Plutus.Contracts.Uniswap.Types typeRep :: Proxy UniswapAction -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) |
data UniswapDatum Source #
Instances
Show UniswapDatum Source # | |
Defined in Plutus.Contracts.Uniswap.Types | |
ToData UniswapDatum Source # | |
Defined in Plutus.Contracts.Uniswap.Types toBuiltinData :: UniswapDatum -> BuiltinData | |
FromData UniswapDatum Source # | |
Defined in Plutus.Contracts.Uniswap.Types fromBuiltinData :: BuiltinData -> Maybe UniswapDatum | |
UnsafeFromData UniswapDatum Source # | |
Defined in Plutus.Contracts.Uniswap.Types unsafeFromBuiltinData :: BuiltinData -> UniswapDatum | |
Lift DefaultUni UniswapDatum Source # | |
Defined in Plutus.Contracts.Uniswap.Types lift :: UniswapDatum -> RTCompile DefaultUni fun (Term TyName Name DefaultUni fun ()) | |
Typeable DefaultUni UniswapDatum Source # | |
Defined in Plutus.Contracts.Uniswap.Types typeRep :: Proxy UniswapDatum -> RTCompile DefaultUni fun (Type TyName DefaultUni ()) |
Orphan instances
ToSchema CurrencySymbol Source # | |
declareNamedSchema :: Proxy CurrencySymbol -> Declare (Definitions Schema) NamedSchema | |
ToSchema TokenName Source # | |
declareNamedSchema :: Proxy TokenName -> Declare (Definitions Schema) NamedSchema | |
ToSchema BuiltinByteString Source # | |
declareNamedSchema :: Proxy BuiltinByteString -> Declare (Definitions Schema) NamedSchema | |
ToSchema AssetClass Source # | |
declareNamedSchema :: Proxy AssetClass -> Declare (Definitions Schema) NamedSchema |