Skip to content

Instantly share code, notes, and snippets.

@ahmetkizilay
Created October 2, 2021 01:53
Show Gist options
  • Save ahmetkizilay/6d82c8623c0c1df7d8d5a6950edf62aa to your computer and use it in GitHub Desktop.
Save ahmetkizilay/6d82c8623c0c1df7d8d5a6950edf62aa to your computer and use it in GitHub Desktop.
Plutus Playground Smart Contract
import Control.Monad (void)
import Data.Aeson (FromJSON, ToJSON)
import qualified Data.Text as T
import GHC.Generics (Generic)
import Ledger
import qualified Ledger.Ada as Ada
import qualified Ledger.Constraints as Constraints
import qualified Ledger.Typed.Scripts as Scripts
import Plutus.Contract
import qualified PlutusTx as PlutusTx
import PlutusTx.Prelude
import qualified Prelude as Haskell
import Schema
import Wallet.Emulator.Wallet
data SplitData =
SplitData
{ recipient1 :: PubKeyHash -- ^ First recipient of the funds
, recipient2 :: PubKeyHash -- ^ Second recipient of the funds
, amount :: Ada -- ^ How much Ada we want to lock
}
deriving stock (Haskell.Show, Generic)
PlutusTx.unstableMakeIsData ''SplitData
PlutusTx.makeLift ''SplitData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment