Skip to content

Commit

Permalink
Add new acceptance scenario 079 (double validators)
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ authored and rvcas committed Mar 17, 2023
1 parent bc690c5 commit a4c7337
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/acceptance_tests/079/aiken.lock
@@ -0,0 +1,5 @@
# This file was generated by Aiken
# You typically do not need to edit this file

requirements = []
packages = []
2 changes: 2 additions & 0 deletions examples/acceptance_tests/079/aiken.toml
@@ -0,0 +1,2 @@
name = "aiken-lang/acceptance_test_079"
version = "0.0.0"
57 changes: 57 additions & 0 deletions examples/acceptance_tests/079/plutus.json
@@ -0,0 +1,57 @@
{
"preamble": {
"title": "aiken-lang/acceptance_test_079",
"version": "0.0.0",
"plutusVersion": "v2"
},
"validators": [
{
"title": "foo.spend",
"datum": {
"title": "datum",
"schema": {
"$ref": "#/definitions/Int"
}
},
"redeemer": {
"title": "redeemer",
"schema": {
"$ref": "#/definitions/RedeemerWrapper$Int"
}
},
"compiledCode": "58a7010000323232323232323232322253330063370e900018041baa0011332253330083370e004902a0a4c2c6eb40080044cc88c894ccc028cdc399b800040024815052616375a0026eb4008c02cc8c028dd50008009119199800800a4000006444666601066e1c0100080348ccc010010cdc0001a4004601e0020026002002444a666010004293099802980098048011998018019805001000ab9a5736aae7555cf2ab9f5742ae89",
"hash": "d5e5d02c9a5b71045eb8a0cfabd036d3a89bc3a403491bbff65a9621"
},
{
"title": "foo.mint",
"redeemer": {
"title": "redeemer",
"schema": {
"$ref": "#/definitions/Int"
}
},
"compiledCode": "58a7010000323232323232323232322253330063370e900018041baa0011332253330083370e004902a0a4c2c6eb40080044cc88c894ccc028cdc399b800040024815052616375a0026eb4008c02cc8c028dd50008009119199800800a4000006444666601066e1c0100080348ccc010010cdc0001a4004601e0020026002002444a666010004293099802980098048011998018019805001000ab9a5736aae7555cf2ab9f5742ae89",
"hash": "d5e5d02c9a5b71045eb8a0cfabd036d3a89bc3a403491bbff65a9621"
}
],
"definitions": {
"Int": {
"dataType": "integer"
},
"RedeemerWrapper$Int": {
"title": "Wrapped Redeemer",
"description": "A redeemer wrapped in an extra constructor to make multi-validator detection possible on-chain.",
"anyOf": [
{
"dataType": "constructor",
"index": 1,
"fields": [
{
"$ref": "#/definitions/Int"
}
]
}
]
}
}
}
9 changes: 9 additions & 0 deletions examples/acceptance_tests/079/validators/foo.ak
@@ -0,0 +1,9 @@
validator {
fn spend(datum: Int, redeemer: Int, _context: Data) {
datum + redeemer == 42
}

fn mint(redeemer: Int, _context: Data) {
redeemer == 42
}
}

0 comments on commit a4c7337

Please sign in to comment.