Skip to content

Instantly share code, notes, and snippets.

@jsim77
jsim77 / Playground.hs
Created June 6, 2020 04:36
Plutus Playground Smart Contract
-- Vesting scheme as a PLC contract
import qualified Prelude as Haskell
import Language.PlutusTx.Prelude
import qualified Data.Map as Map
import qualified Data.Set as Set
import IOTS
import qualified Language.PlutusTx as PlutusTx
import Ledger (Address, DataScript(..),
@jsim77
jsim77 / Playground.hs
Last active June 5, 2020 15:36
Plutus Playground Smart Contract
-- Crowdfunding contract implemented using the [[Plutus]] interface.
-- This is the fully parallel version that collects all contributions
-- in a single transaction.
--
-- Note [Transactions in the crowdfunding campaign] explains the structure of
-- this contract on the blockchain.
import qualified Language.PlutusTx as PlutusTx
import Language.PlutusTx.Prelude
@jsim77
jsim77 / Marlowe.hs
Last active June 4, 2020 00:30
Marlowe Smart Contract
{-# LANGUAGE OverloadedStrings #-}
module Swap where
import Language.Marlowe
main :: IO ()
main = print . pretty $ contract
{- Simply swap two payments between parties -}
contract :: Contract
@jsim77
jsim77 / Playground.hs
Created May 6, 2020 03:19
Plutus Playground Smart Contract
-- Crowdfunding contract implemented using the [[Plutus]] interface.
-- This is the fully parallel version that collects all contributions
-- in a single transaction.
--
-- Note [Transactions in the crowdfunding campaign] explains the structure of
-- this contract on the blockchain.
import qualified Language.PlutusTx as PlutusTx
import Language.PlutusTx.Prelude
contract Payout {
address Victor;
address Jim;
address Kieren;
mapping (address => uint) ownershipDistribution;
function Setup() {
Victor = 0xaabb;
Jim = 0xccdd;
pragma solidity ^0.4.18;
pip install solidity-flattener
solidity_flattener StandardToken.sol
// ----------------------------------------------------------------------------
// '0Arej' token contract
//
// Deployed to : 0xd87deaa3eb06a4ed009b4559e63089568402723a
// Symbol : 0ARJ