Created
May 7, 2021 00:45
-
-
Save leMedi/73e61236545675636fa6795ed9ae6ef9 to your computer and use it in GitHub Desktop.
Plutus Playground Smart Contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Applicative (Applicative (pure)) | |
import Control.Monad (void) | |
import Language.Plutus.Contract | |
import qualified Language.Plutus.Contract.Constraints as Constraints | |
import qualified Language.Plutus.Contract.Typed.Tx as Typed | |
import qualified Language.PlutusTx as PlutusTx | |
import Language.PlutusTx.Prelude hiding (Applicative (..), Semigroup (..)) | |
import Ledger (PubKeyHash, TxInfo (..), Validator, ValidatorCtx (..), | |
pubKeyHash, txId, valueSpent) | |
import qualified Ledger as Ledger | |
import qualified Ledger.Ada as Ada | |
import qualified Ledger.Contexts as V | |
import qualified Ledger.Interval as Interval | |
import qualified Ledger.Scripts as Scripts | |
import Ledger.Slot (Slot, SlotRange) | |
import qualified Ledger.Typed.Scripts as Scripts | |
import Ledger.Value (Value) | |
import qualified Ledger.Value as Value | |
import Playground.Contract | |
import Prelude (Semigroup (..)) | |
import qualified Prelude as Haskell | |
import qualified Wallet.Emulator as Emulator | |
data Pair = Pair | |
{ token0 :: PubKeyHash | |
, token1 :: PubKeyHash | |
, reserve0 :: Value | |
, reserve1 :: Value | |
} deriving (Generic, ToJSON, FromJSON, ToSchema) | |
PlutusTx.makeLift ''Pair |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[0,[]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment