Created
October 2, 2021 01:53
-
-
Save ahmetkizilay/6d82c8623c0c1df7d8d5a6950edf62aa to your computer and use it in GitHub Desktop.
Plutus Playground Smart Contract
This file contains hidden or 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.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 | |
This file contains hidden or 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