-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add a section on simple scripts #96
Conversation
@@ -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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 documents from the Shelley and Mary eras, which you can find [here](https://github.com/IntersectMBO/cardano-ledger) and in the [cardano-node wiki](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/simple-scripts.md). |
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 using the exposed constructors of [`GYSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#t:GYSimpleScript). They can also be loaded from their JSON representation, as `GYSimpleScript` implements a [`FromJSON`](https://hackage.haskell.org/package/aeson-2.2.3.0/docs/Data-Aeson.html#t:FromJSON) instance. Additionally, we provide the utility function [`readSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#v:readSimpleScript), which reads the 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. | |
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 as reference scripts and in other scenarios. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. Please see my suggestions.
@@ -0,0 +1,7 @@ | |||
# Simple Scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just prefer "Simple Scripts", why ".. in Atlas"? And Native/Timelock are just other names of simple scripts.
@@ -0,0 +1,7 @@ | |||
# Simple Scripts | |||
|
|||
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd avoid " which are key components in building transactions on the Cardano blockchain. These scripts are critical for establishing spending conditions, such as multisig requirements or timelocks."
|
||
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This suggestion, "...type, which represents native and timelock scripts in Atlas. This data type can be used for both creating and interacting with simple scripts programmatically. " is unnecessary. It is already mentioned in beginning of sentence that this is used to specify simple scripts. And the later part "used for both creating and interacting with simple scripts programmatically" is not required as it is not limited to this way of specifying simple script inside Atlas and it is also clear with other paras in this doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for considering my suggestions.
No description provided.