Skip to content

Instantly share code, notes, and snippets.

@SeldeOn
Created October 23, 2019 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeldeOn/7aad2929d8a886f0afbd5c240fccddef to your computer and use it in GitHub Desktop.
Save SeldeOn/7aad2929d8a886f0afbd5c240fccddef to your computer and use it in GitHub Desktop.
Plutus Playground Smart Contract
import Language.PlutusTx.Prelude
import Playground.Contract
import Wallet
data MyType = First | Second | Third
deriving (ToSchema, Generic)
myFunction :: MonadWallet m => MyType -> m ()
myFunction myType = logMsg "Message"
$(mkFunctions ['myFunction])
[0,[{"wallets":[{"simulatorWalletWallet":{"getWallet":1},"simulatorWalletBalance":{"getValue":[[{"unCurrencySymbol":""},[[{"unTokenName":""},10]]]]}},{"simulatorWalletWallet":{"getWallet":2},"simulatorWalletBalance":{"getValue":[[{"unCurrencySymbol":""},[[{"unTokenName":""},10]]]]}}],"signatures":[{"functionName":"myFunction","argumentSchema":[{"contents":["First","Second","Third"],"tag":"FormSchemaRadio"}]},{"functionName":"payToWallet_","argumentSchema":[{"tag":"FormSchemaValue"},{"contents":[["getWallet",{"tag":"FormSchemaInt"}]],"tag":"FormSchemaObject"}]}],"currencies":[{"knownTokens":[{"unTokenName":""}],"hash":"","friendlyName":"Ada"}],"actions":[{"simulatorWallet":{"simulatorWalletWallet":{"getWallet":1},"simulatorWalletBalance":{"getValue":[[{"unCurrencySymbol":""},[[{"unTokenName":""},10]]]]}},"functionSchema":{"functionName":"myFunction","argumentSchema":[{"contents":[["First","Second","Third"],"First"],"tag":"FormRadio"}]},"tag":"Action"}]}]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment