-
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
Changes from all commits
a57d61f
14d6a42
79a873a
2dd88c8
c880625
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"blueprint": "Blueprint" | ||
} | ||
"blueprint": "Blueprint", | ||
"simple-scripts": "Simple Scripts" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Simple Scripts | ||
4TT1L4 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 commentThe 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." |
||
|
||
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 commentThe 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. |
||
|
||
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. |
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.