Created
July 27, 2022 13:15
-
-
Save brishtiteveja/673c543dcd58951e258423f25e6db382 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 Data.Text qualified as T | |
import Playground.Contract | |
import Plutus.Contract | |
import PlutusTx.Prelude | |
import Prelude qualified as Haskell | |
-- | A 'Contract' that logs a message. | |
hello :: Contract () EmptySchema T.Text () | |
hello = logInfo @Haskell.String "Hello, world" | |
endpoints :: Contract () EmptySchema T.Text () | |
endpoints = hello | |
-- 'mkSchemaDefinitions' doesn't work with 'EmptySchema' | |
-- (that is, with 0 endpoints) so we define a | |
-- dummy schema type with 1 endpoint to make it compile. | |
-- TODO: Repair 'mkSchemaDefinitions' | |
type DummySchema = Endpoint "dummy" () | |
mkSchemaDefinitions ''DummySchema | |
$(mkKnownCurrencies []) |
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