From a57d61fc9137b0171ddebacdf828bafb341f1bc0 Mon Sep 17 00:00:00 2001 From: sourabhxyz Date: Mon, 7 Oct 2024 17:00:33 +0530 Subject: [PATCH 1/3] docs: add a section on simple scripts --- src/pages/additional-features/_meta.json | 5 +++-- src/pages/additional-features/simple-scripts.mdx | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/pages/additional-features/simple-scripts.mdx diff --git a/src/pages/additional-features/_meta.json b/src/pages/additional-features/_meta.json index 9f364dc..5a9cc01 100644 --- a/src/pages/additional-features/_meta.json +++ b/src/pages/additional-features/_meta.json @@ -1,3 +1,4 @@ { - "blueprint": "Blueprint" -} + "blueprint": "Blueprint", + "simple-scripts": "Simple Scripts" +} \ No newline at end of file diff --git a/src/pages/additional-features/simple-scripts.mdx b/src/pages/additional-features/simple-scripts.mdx new file mode 100644 index 0000000..6e24b3e --- /dev/null +++ b/src/pages/additional-features/simple-scripts.mdx @@ -0,0 +1,7 @@ +# Simple Scripts + +Atlas supports simple scripts, aka native and timelock scripts. The functionality of simple scripts is explained in ledger design document of Shelley & Mary era [here](https://github.com/IntersectMBO/cardano-ledger) and also in [cardano-node-wiki](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/simple-scripts.md). + +Simple scripts can be specified via exposed constructors of [`GYSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#t:GYSimpleScript). They can also be read from their JSON representation as `GYSimpleScript` has a [`FromJSON`](https://hackage.haskell.org/package/aeson-2.2.3.0/docs/Data-Aeson.html#t:FromJSON) instance, we also provide a utility function, [`readSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#v:readSimpleScript), to read JSON representation from a file. + +Simple scripts can also be attached to UTxO outputs to be used as reference script inputs later when building transaction. We have an example [here](https://github.com/geniusyield/atlas/blob/main/tests-privnet/GeniusYield/Test/Privnet/SimpleScripts.hs), demonstrating interaction with simple scripts in both scenarios, when being used as reference and otherwise. \ No newline at end of file From 14d6a428ac6f9af28ee508bfcab75ccca77073dd Mon Sep 17 00:00:00 2001 From: sourabhxyz Date: Mon, 7 Oct 2024 17:02:55 +0530 Subject: [PATCH 2/3] docs: improve language of simple scripts documentation --- src/pages/additional-features/simple-scripts.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/additional-features/simple-scripts.mdx b/src/pages/additional-features/simple-scripts.mdx index 6e24b3e..c59c288 100644 --- a/src/pages/additional-features/simple-scripts.mdx +++ b/src/pages/additional-features/simple-scripts.mdx @@ -1,7 +1,7 @@ # Simple Scripts -Atlas supports simple scripts, aka native and timelock scripts. The functionality of simple scripts is explained in ledger design document of Shelley & Mary era [here](https://github.com/IntersectMBO/cardano-ledger) and also in [cardano-node-wiki](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/simple-scripts.md). +Atlas supports simple scripts, also known as native and timelock scripts. The functionality of simple scripts is explained in the ledger design document of Shelley & Mary era [here](https://github.com/IntersectMBO/cardano-ledger) and also in [cardano-node-wiki](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/simple-scripts.md). -Simple scripts can be specified via exposed constructors of [`GYSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#t:GYSimpleScript). They can also be read from their JSON representation as `GYSimpleScript` has a [`FromJSON`](https://hackage.haskell.org/package/aeson-2.2.3.0/docs/Data-Aeson.html#t:FromJSON) instance, we also provide a utility function, [`readSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#v:readSimpleScript), to read JSON representation from a file. +Simple scripts can be specified via exposed constructors of [`GYSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#t:GYSimpleScript). They can also be read from their JSON representation as `GYSimpleScript` has a [`FromJSON`](https://hackage.haskell.org/package/aeson-2.2.3.0/docs/Data-Aeson.html#t:FromJSON) instance. We also provide a utility function, [`readSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#v:readSimpleScript), to read JSON representation from a file. -Simple scripts can also be attached to UTxO outputs to be used as reference script inputs later when building transaction. We have an example [here](https://github.com/geniusyield/atlas/blob/main/tests-privnet/GeniusYield/Test/Privnet/SimpleScripts.hs), demonstrating interaction with simple scripts in both scenarios, when being used as reference and otherwise. \ No newline at end of file +Simple scripts can also be attached to UTxO outputs to be used as reference script inputs later when building transactions. We have an example [here](https://github.com/geniusyield/atlas/blob/main/tests-privnet/GeniusYield/Test/Privnet/SimpleScripts.hs), demonstrating interaction with simple scripts in both scenarios, when being used as reference and otherwise. \ No newline at end of file From 79a873a9eb28213c1a0915c3561d7d3be5fadf4f Mon Sep 17 00:00:00 2001 From: sourabhxyz Date: Mon, 7 Oct 2024 17:36:58 +0530 Subject: [PATCH 3/3] docs: --- src/pages/additional-features/simple-scripts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/additional-features/simple-scripts.mdx b/src/pages/additional-features/simple-scripts.mdx index c59c288..96c3143 100644 --- a/src/pages/additional-features/simple-scripts.mdx +++ b/src/pages/additional-features/simple-scripts.mdx @@ -4,4 +4,4 @@ Atlas supports simple scripts, also known as native and timelock scripts. The fu Simple scripts can be specified via exposed constructors of [`GYSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#t:GYSimpleScript). They can also be read from their JSON representation as `GYSimpleScript` has a [`FromJSON`](https://hackage.haskell.org/package/aeson-2.2.3.0/docs/Data-Aeson.html#t:FromJSON) instance. We also provide a utility function, [`readSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#v:readSimpleScript), to read JSON representation from a file. -Simple scripts can also be attached to UTxO outputs to be used as reference script inputs later when building transactions. We have an example [here](https://github.com/geniusyield/atlas/blob/main/tests-privnet/GeniusYield/Test/Privnet/SimpleScripts.hs), demonstrating interaction with simple scripts in both scenarios, when being used as reference and otherwise. \ No newline at end of file +Simple scripts can also be attached to UTxO outputs, allowing them to be used later as reference scripts when building transactions. You can find an example [here](https://github.com/geniusyield/atlas/blob/main/tests-privnet/GeniusYield/Test/Privnet/SimpleScripts.hs), that demonstrates how to interact with simple scripts, both when used as a reference and when given directly for transaction validation. \ No newline at end of file