Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from input-output-hk/examples
Browse files Browse the repository at this point in the history
Typography and URLs
  • Loading branch information
bwbush committed May 30, 2023
2 parents e45dee1 + 1d7bce4 commit 4ea81dc
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 77 deletions.
2 changes: 1 addition & 1 deletion ReadMe.md
Expand Up @@ -7,7 +7,7 @@ Click on the image below to navigate to individual contracts.

## Marlowe

- [Language](https://marlowe-finance.io/)
- [Language](https://marlowe.iohk.io/)
- [Software](https://github.com/input-output-hk/marlowe-cardano/)
- [Development](https://developers.cardano.org/docs/smart-contracts/marlowe/#resources-for-developing-and-deploying-marlowe-contracts)
- [Safety](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md)
Expand Down
54 changes: 27 additions & 27 deletions archives/miscellaneous/raffle/ReadMe.ipynb
Expand Up @@ -253,7 +253,7 @@
"SPONSOR_NAME=c.marlowe\n",
"SPONSOR_SKEY=../keys/$SPONSOR_NAME.skey\n",
"SPONSOR_ADDR=$(cat ../keys/$SPONSOR_NAME.testnet.address)\n",
"echo \"$SPONSOR_NAME @ $SPONSOR_ADDR\""
"echo \"$SPONSOR_NAME \"@\" $SPONSOR_ADDR\""
]
},
{
Expand Down Expand Up @@ -286,7 +286,7 @@
"ORACLE_NAME=f.beaumont\n",
"ORACLE_SKEY=../keys/$ORACLE_NAME.skey\n",
"ORACLE_ADDR=$(cat ../keys/$ORACLE_NAME.testnet.address)\n",
"echo \"$ORACLE_NAME @ $ORACLE_ADDR\""
"echo \"$ORACLE_NAME\" @ \"$ORACLE_ADDR\""
]
},
{
Expand Down Expand Up @@ -336,11 +336,11 @@
}
],
"source": [
"cardano-wallet key child 1852H/1815H/0H/2/0 < $ROOT_PRV \\\n",
"cardano-wallet key child 1852H/1815H/0H/2/0 < \"$ROOT_PRV\" \\\n",
"| cardano-cli key convert-cardano-address-key --shelley-stake-key --signing-key-file /dev/stdin --out-file /dev/stdout \\\n",
"| cardano-cli key verification-key --signing-key-file /dev/stdin --verification-key-file /dev/stdout \\\n",
"| cardano-cli key non-extended-key --extended-verification-key-file /dev/stdin --verification-key-file ../keys/william-shakespeare.stake.vkey\n",
"STAKE_ADDR=$(cardano-cli stake-address build --testnet-magic $CARDANO_TESTNET_MAGIC --stake-verification-key-file ../keys/william-shakespeare.stake.vkey)\n",
"STAKE_ADDR=`cardano-cli stake-address build --testnet-magic \"$CARDANO_TESTNET_MAGIC\" --stake-verification-key-file ../keys/william-shakespeare.stake.vkey`\n",
"echo \"Stake address = $STAKE_ADDR\""
]
},
Expand Down Expand Up @@ -513,16 +513,16 @@
}
],
"source": [
"for j in $(seq 1 $NUMBER_OF_PARTICIPANTS)\n",
"for j in `seq 1 $NUMBER_OF_PARTICIPANTS`\n",
"do\n",
" PARTICIPANT_SKEY[$j]=../keys/scholar-$j.skey\n",
" PARTICIPANT_ADDR[$j]=$(\n",
" cardano-wallet key child 1852H/1815H/0H/0/$j < $ROOT_PRV \\\n",
" | cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file /dev/stdin --out-file ${PARTICIPANT_SKEY[$j]}\n",
" cardano-cli key verification-key --signing-key-file ${PARTICIPANT_SKEY[$j]} --verification-key-file /dev/stdout \\\n",
" | cardano-cli address build --testnet-magic $CARDANO_TESTNET_MAGIC --payment-verification-key-file /dev/stdin --stake-verification-key-file ../keys/william-shakespeare.stake.vkey \\\n",
" cardano-wallet key child 1852H/1815H/0H/0/$j < \"$ROOT_PRV\" \\\n",
" | cardano-cli key convert-cardano-address-key --shelley-payment-key --signing-key-file /dev/stdin --out-file \"${PARTICIPANT_SKEY[$j]}\"\n",
" cardano-cli key verification-key --signing-key-file \"${PARTICIPANT_SKEY[$j]}\" --verification-key-file /dev/stdout \\\n",
" | cardano-cli address build --testnet-magic \"$CARDANO_TESTNET_MAGIC\" --payment-verification-key-file /dev/stdin --stake-verification-key-file ../keys/william-shakespeare.stake.vkey \\\n",
" )\n",
" echo \"Participant $j = 1852H/1815H/0H/0/$((1 + j)) = ${PARTICIPANT_ADDR[$j]}\"\n",
" echo \"Participant $j\" = 1852H/1815H/0H/0/\"$((1 + j))\" = \"${PARTICIPANT_ADDR[$j]}\"\n",
"done"
]
},
Expand Down Expand Up @@ -561,8 +561,8 @@
}
],
"source": [
"NOW=$(($(date -u +%s) * 1000))\n",
"echo \"NOW = $NOW = $(date -d @$((NOW / 1000)))\""
"NOW=$((`date -u +%s` * 1000))\n",
"echo \"NOW = $NOW\" = \"`date -d @$((NOW / 1000))`\""
]
},
{
Expand All @@ -582,8 +582,8 @@
}
],
"source": [
"FUNDING_DEADLINE=$(($(date -u +%s) * SECOND + 1 * HOUR))\n",
"echo \"FUNDING_DEADLINE = $FUNDING_DEADLINE = $(date -d @$((FUNDING_DEADLINE / 1000)))\""
"FUNDING_DEADLINE=$((`date -u +%s` * SECOND + 1 * HOUR))\n",
"echo \"FUNDING_DEADLINE = $FUNDING_DEADLINE\" = \"`date -d @$((FUNDING_DEADLINE / 1000))`\""
]
},
{
Expand All @@ -603,8 +603,8 @@
}
],
"source": [
"SELECTION_DEADLINE=$(($(date -u +%s) * SECOND + 2 * HOUR))\n",
"echo \"SELECTION_DEADLINE = $SELECTION_DEADLINE = $(date -d @$((SELECTION_DEADLINE / 1000)))\""
"SELECTION_DEADLINE=$((`date -u +%s` * SECOND + 2 * HOUR))\n",
"echo \"SELECTION_DEADLINE = $SELECTION_DEADLINE\" = \"`date -d @$((SELECTION_DEADLINE / 1000))`\""
]
},
{
Expand All @@ -624,8 +624,8 @@
}
],
"source": [
"AWARD_DEADLINE=$(($(date -u +%s) * SECOND + 3 * HOUR))\n",
"echo \"AWARD_DEADLINE = $AWARD_DEADLINE = $(date -d @$((AWARD_DEADLINE / 1000)))\""
"AWARD_DEADLINE=$((`date -u +%s` * SECOND + 3 * HOUR))\n",
"echo \"AWARD_DEADLINE = $AWARD_DEADLINE\" = \"`date -d @$((AWARD_DEADLINE / 1000))`\""
]
},
{
Expand Down Expand Up @@ -696,13 +696,13 @@
"outputs": [],
"source": [
"runhaskell contract.hs \\\n",
" $SIZE \\\n",
" $SPONSOR_ADDR \\\n",
" $ORACLE_ADDR \\\n",
" $AWARD_AMOUNT \\\n",
" $FUNDING_DEADLINE \\\n",
" $SELECTION_DEADLINE \\\n",
" $AWARD_DEADLINE \\\n",
" \"$SIZE\" \\\n",
" \"$SPONSOR_ADDR\" \\\n",
" \"$ORACLE_ADDR\" \\\n",
" \"$AWARD_AMOUNT\" \\\n",
" \"$FUNDING_DEADLINE\" \\\n",
" \"$SELECTION_DEADLINE\" \\\n",
" \"$AWARD_DEADLINE\" \\\n",
" ${PARTICIPANT_ADDR[@]}"
]
},
Expand Down Expand Up @@ -1050,7 +1050,7 @@
}
],
"source": [
"DEPTH=$(printf \"%.0f\" $(echo \"l($NUMBER_OF_PARTICIPANTS) / l($SIZE)\" | ~/.nix-profile/bin/bc -l))\n",
"DEPTH=$(printf \"%.0f\" `echo l\"($NUMBER_OF_PARTICIPANTS)\" / \"l($SIZE)\" | ~/.nix-profile/bin/bc -l`)\n",
"echo \"DEPTH = $DEPTH\""
]
},
Expand Down Expand Up @@ -1122,7 +1122,7 @@
}
],
"source": [
"for i in $(seq 1 $DEPTH)\n",
"for i in `seq 1 $DEPTH`\n",
"do\n",
"\n",
"n=$((i+3))\n",
Expand Down
4 changes: 2 additions & 2 deletions defi/beamer/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions firsts/loan/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions firsts/mainnet/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions firsts/plutus-v2/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions firsts/reference/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions firsts/swap/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions nfts/airdrop/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down Expand Up @@ -212,7 +212,7 @@
"source": [
"## The Marlowe contract\n",
"\n",
"The Marlowe contract is just a download of the JSON file for the Blockly-format contract designed in the [Marlowe Playground](https://play.marlowe-finance.io/#/)."
"The Marlowe contract is just a download of the JSON file for the Blockly-format contract designed in the [Marlowe Playground](https://play.marlowe.iohk.io/#/)."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions nfts/auction/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions nfts/collateral/ReadMe.ipynb
Expand Up @@ -9,11 +9,11 @@
"\n",
"Before running a Marlowe contract on `mainnet`, it is wise to do the following in order to avoid losing funds:\n",
"\n",
"1. Understand the [Marlowe Language](https://marlowe-finance.io/).\n",
"1. Understand the [Marlowe Language](https://marlowe.iohk.io/).\n",
"2. Understand Cardano\\'s [Extended UTxO Model](https://docs.cardano.org/learn/eutxo-explainer).\n",
"3. Read and understand the [Marlowe Best Practices Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/best-practices.md).\n",
"4. Read and understand the [Marlowe Security Guide](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe/security.md).\n",
"5. Use [Marlowe Playground](https://play.marlowe-finance.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"5. Use [Marlowe Playground](https://play.marlowe.iohk.io/) to flag warnings, perform static analysis, and simulate the contract.\n",
"6. Use [Marlowe CLI\\'s](https://github.com/input-output-hk/marlowe-cardano/blob/main/marlowe-cli/ReadMe.md) `marlowe-cli run analyze` tool to study whether the contract can run on a Cardano network.\n",
"7. Run *all execution paths* of the contract on a [Cardano testnet](https://docs.cardano.org/cardano-testnet/overview).\n",
"\n",
Expand Down Expand Up @@ -269,7 +269,7 @@
"source": [
"## The Marlowe contract\n",
"\n",
"The Marlowe contract is just a download of the JSON file for the Blockly-format contract designed in the [Marlowe Playground](https://play.marlowe-finance.io/#/)."
"The Marlowe contract is just a download of the JSON file for the Blockly-format contract designed in the [Marlowe Playground](https://play.marlowe.iohk.io/#/)."
]
},
{
Expand Down

0 comments on commit 4ea81dc

Please sign in to comment.