Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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