Write basic e2e validator with evaluation.

This commit is contained in:
KtorZ 2023-02-14 10:39:31 +01:00
parent 4ef1ba69de
commit 545323128c
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
8 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# This file was generated by Aiken
# You typically do not need to edit this file
[[requirements]]
name = "aiken-lang/stdlib"
version = "main"
source = "github"
[[packages]]
name = "aiken-lang/stdlib"
version = "main"
requirements = []
source = "github"

View File

@ -0,0 +1,8 @@
name = 'aiken-lang/acceptance_test_062'
version = '0.0.0'
description = ''
[[dependencies]]
name = 'aiken-lang/stdlib'
version = 'main'
source = 'github'

View File

@ -0,0 +1 @@
81825820000000000000000000000000000000000000000000000000000000000000000000

View File

@ -0,0 +1 @@
81A300581D70{{ VALIDATOR_HASH }}1ED86D464F20AB66EE47AB662572820052078CC8D75345E06A9E8D4011A3B9ACA00028201D81843D87980

View File

@ -0,0 +1 @@
84A80081825820000000000000000000000000000000000000000000000000000000000000000000018182581D60000000000000000000000000000000000000000000000000000000001A3B9ACA00021A0002DF6705A1581DE0000000000000000000000000000000000000000000000000000000001A0280DE800B5820FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0D818258200000000000000000000000000000000000000000000000000000000000000000001082581D60000000000000000000000000000000000000000000000000000000001A3B9ACA00111A00044F1BA20581840000D87980821A000F42401A05F5E100068158A2{{ VALIDATOR }}8A00100003232323232323232222533300632323370E646460026EB0CC00CC010CC00CC010015200048010C004004894CCC03400452000132337009001198018018009807800A400444646660020029000001911199980619B8700400201023330040043370000690011809000800918049BAA001149858C0040048894CCC01C0085261330053001300800233300300330090020015734AE6D55CF2AB9F5742AE89F5F6

View File

@ -0,0 +1,36 @@
{
"preamble": {
"title": "aiken-lang/acceptance_test_062",
"version": "0.0.0"
},
"validators": [
{
"title": "basic",
"purpose": "spend",
"datum": {
"title": "Unit",
"description": "The nullary constructor.",
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
},
"redeemer": {
"title": "Unit",
"description": "The nullary constructor.",
"anyOf": [
{
"dataType": "constructor",
"index": 0,
"fields": []
}
]
},
"compiledCode": "58a00100003232323232323232222533300632323370e646460026eb0cc00cc010cc00cc010015200048010c004004894ccc03400452000132337009001198018018009807800a400444646660020029000001911199980619b8700400201023330040043370000690011809000800918049baa001149858c0040048894ccc01c0085261330053001300800233300300330090020015734ae6d55cf2ab9f5742ae89",
"hash": "81ed86d464f20ab66ee47ab662572820052078cc8d75345e06a9e8d4"
}
]
}

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
aiken build
VALIDATOR=$(jq ".validators[] | select(.title == \"basic\")" plutus.json)

View File

@ -0,0 +1,6 @@
use aiken/list
use aiken/transaction.{ScriptContext}
fn spend(_datum: Void, _redeemer: Void, ctx: ScriptContext) {
list.length(ctx.transaction.outputs) == 1
}