Skip to content

Commit

Permalink
Add simple validators
Browse files Browse the repository at this point in the history
  • Loading branch information
iburzynski committed Jan 12, 2024
1 parent b6fbff8 commit ee8bfb2
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jambhalaiken
# jambhalAiken

Write validators in the `validators` folder, and supporting functions in the `lib` folder using `.ak` as a file extension.

Expand Down
15 changes: 15 additions & 0 deletions aiken.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file was generated by Aiken
# You typically do not need to edit this file

[[requirements]]
name = "aiken-lang/stdlib"
version = "1.7.0"
source = "github"

[[packages]]
name = "aiken-lang/stdlib"
version = "1.7.0"
requirements = []
source = "github"

[etags]
55 changes: 55 additions & 0 deletions plutus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"preamble": {
"title": "jambhala/jambhalaiken",
"description": "Aiken contracts for project 'jambhala/jambhalaiken'",
"version": "0.0.0",
"plutusVersion": "v2",
"compiler": {
"name": "Aiken",
"version": "v1.0.21-alpha+unknown"
},
"license": "Apache-2.0"
},
"validators": [
{
"title": "simple.burn",
"datum": {
"title": "_datum",
"schema": {
"$ref": "#/definitions/Data"
}
},
"redeemer": {
"title": "_redeemer",
"schema": {
"$ref": "#/definitions/Data"
}
},
"compiledCode": "510100003222253330044a029309b2b2b9a1",
"hash": "66a67769edd0c54d5f6ec8ba3925394bf0e4fc1f8bfbe3a131eb523c"
},
{
"title": "simple.gift",
"datum": {
"title": "_datum",
"schema": {
"$ref": "#/definitions/Data"
}
},
"redeemer": {
"title": "_redeemer",
"schema": {
"$ref": "#/definitions/Data"
}
},
"compiledCode": "510100003222253330044a229309b2b2b9a1",
"hash": "39c520d0627aafa728f7e4dd10142b77c257813c36f57e2cb88f72a5"
}
],
"definitions": {
"Data": {
"title": "Data",
"description": "Any Plutus data."
}
}
}
11 changes: 11 additions & 0 deletions validators/simple.ak
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
validator {
fn gift(_datum: Data, _redeemer: Data, _context: Data) -> Bool {
True
}
}

validator {
fn burn(_datum: Data, _redeemer: Data, _context: Data) -> Bool {
False
}
}

0 comments on commit ee8bfb2

Please sign in to comment.