use aiken/builtin
use aiken/crypto
// Script parameters (hardcoded constants)
const policy_id_0 = #"222d66110efec4c43152a7c5833ec4c1cef412cd9ba45662230d195512bbab1a"
// param_0: builtin.constr_data(0, [#"222d66110efec4c43152a7c5833ec4c1cef412cd9ba45662230d195512bbab1a", 2])
fn rec_0(c7: Data, e7: Data) -> Data {
if builtin.null_list(e7) { fail } else { {
let f7 = builtin.head_list({
expect _headList_arg0: List<Data> = e7
_headList_arg0
})
if {
expect _ifThenElse_arg0: Bool = c7(f7)
_ifThenElse_arg0
} { f7 } else { rec_0(c7, builtin.tail_list({
expect _tailList_arg0: List<Data> = e7
_tailList_arg0
})) }
} }
}
fn rec_1(z6: Data, b7: Data) -> Data {
if builtin.null_list(b7) { False } else { if {
expect _ifThenElse_arg0: Bool = z6(builtin.head_list({
expect _headList_arg0: List<Data> = b7
_headList_arg0
}))
_ifThenElse_arg0
} { True } else { rec_1(z6, builtin.tail_list({
expect _tailList_arg0: List<Data> = b7
_tailList_arg0
})) } }
}
fn rec_2(o6: Data, p6: Data, q6: Data) -> Data {
if builtin.null_list(o6) { q6 } else { if builtin.null_list(p6) { q6 } else { {
let r6 = builtin.head_list({
expect _headList_arg0: List<Data> = o6
_headList_arg0
})
{
let s6 = builtin.head_list({
expect _headList_arg0: List<Data> = p6
_headList_arg0
})
{
let t6 = builtin.un_b_data(r6)
{
let u6 = builtin.un_b_data(s6)
if builtin.equals_bytearray({
expect _equalsByteString_arg0: ByteArray = t6
_equalsByteString_arg0
}, {
expect _equalsByteString_arg1: ByteArray = u6
_equalsByteString_arg1
}) { rec_2(builtin.tail_list({
expect _tailList_arg0: List<Data> = o6
_tailList_arg0
}), builtin.tail_list({
expect _tailList_arg0: List<Data> = p6
_tailList_arg0
}), {
expect _addInteger_arg0: Int = q6
_addInteger_arg0
} + 1) } else { if builtin.less_than_bytearray({
expect _lessThanByteString_arg0: ByteArray = t6
_lessThanByteString_arg0
}, {
expect _lessThanByteString_arg1: ByteArray = u6
_lessThanByteString_arg1
}) { rec_2(builtin.tail_list({
expect _tailList_arg0: List<Data> = o6
_tailList_arg0
}), p6, q6) } else { rec_2(o6, builtin.tail_list({
expect _tailList_arg0: List<Data> = p6
_tailList_arg0
}), q6) } }
}
}
}
} } }
}
fn rec_3(d1: Data, x1: Data) -> Data {
if builtin.null_list(x1) { fail } else { {
let y1 = builtin.head_list({
expect _headList_arg0: List<Data> = x1
_headList_arg0
})
if builtin.fst_pair({
expect _fstPair_arg0: Pair<Int, List<Data>> = y1
_fstPair_arg0
}) == d1 { builtin.un_map_data(builtin.snd_pair({
expect _sndPair_arg0: Pair<Int, List<Data>> = y1
_sndPair_arg0
})) } else { rec_3(d1, builtin.tail_list({
expect _tailList_arg0: List<Data> = x1
_tailList_arg0
})) }
} }
}
fn rec_4(l1: Data, n1: Data) -> Data {
if builtin.null_list(n1) { l1 } else { {
let o1 = builtin.tail_list({
expect _tailList_arg0: List<Data> = n1
_tailList_arg0
})
if builtin.null_list(o1) { l1 } else { if builtin.less_than_bytearray(builtin.un_b_data(builtin.head_list({
expect _headList_arg0: List<Data> = n1
_headList_arg0
})), builtin.un_b_data(builtin.head_list({
expect _headList_arg0: List<Data> = o1
_headList_arg0
}))) { rec_4(l1, o1) } else { fail } }
} }
}
fn rec_5(s3: Data, u3: Data) -> Data {
if builtin.null_list(u3) { s3 } else { {
let v3 = builtin.tail_list({
expect _tailList_arg0: List<Data> = u3
_tailList_arg0
})
if builtin.null_list(v3) { s3 } else { if builtin.less_than_bytearray(builtin.un_b_data(builtin.head_list({
expect _headList_arg0: List<Data> = u3
_headList_arg0
})), builtin.un_b_data(builtin.head_list({
expect _headList_arg0: List<Data> = v3
_headList_arg0
}))) { rec_5(s3, v3) } else { fail } }
} }
}
fn rec_6(u4: Data, w4: Data) -> Data {
if builtin.null_list(w4) { False } else { if {
expect _ifThenElse_arg0: Bool = builtin.head_list({
expect _headList_arg0: List<Data> = w4
_headList_arg0
}) == u4
_ifThenElse_arg0
} { True } else { rec_6(u4, builtin.tail_list({
expect _tailList_arg0: List<Data> = w4
_tailList_arg0
})) } }
}
validator policy {
mint(s: Data, t: Data, tx: Data) {
let f = fn(b8, c8) { {
let d8 = builtin.snd_pair(builtin.un_constr_data(b8))
{
let e8 = builtin.snd_pair(builtin.un_constr_data(c8))
if {
expect _ifThenElse_arg0: Bool = builtin.head_list({
expect _headList_arg0: List<Data> = d8
_headList_arg0
}) == builtin.head_list({
expect _headList_arg0: List<Data> = e8
_headList_arg0
})
_ifThenElse_arg0
} { builtin.head_list(builtin.tail_list({
expect _tailList_arg0: List<Data> = d8
_tailList_arg0
})) == builtin.head_list(builtin.tail_list({
expect _tailList_arg0: List<Data> = e8
_tailList_arg0
})) } else { False }
}
} }
{
let h = fn(g7) { {
let h7 = fn(z7) { g7(fn(a8) { (z7 as fn(fn(Data) -> Data, Data) -> Data)(z7 as fn(Data) -> Data, a8) }) }
g7(fn(i7) { g7(fn(j7) { g7(fn(k7) { g7(fn(l7) { g7(fn(m7) { g7(fn(n7) { g7(fn(o7) { g7(fn(p7) { g7(fn(q7) { g7(fn(r7) { g7(fn(s7) { g7(fn(t7) { g7(fn(u7) { g7(fn(v7) { g7(fn(w7) { g7(fn(x7) { g7(fn(y7) { (h7 as fn(fn(Data) -> Data, Data) -> Data)(h7 as fn(Data) -> Data, y7) }, x7) }, w7) }, v7) }, u7) }, t7) }, s7) }, r7) }, q7) }, p7) }, o7) }, n7) }, m7) }, l7) }, k7) }, j7) }, i7) })
} }
{
let i = fn(c7) { fn(e7) { rec_0(c7, e7) } }
{
let j = fn(z6) { fn(b7) { rec_1(z6, b7) } }
{
let k = fn(w6, x6) { j(fn(y6) { builtin.fst_pair({
expect _fstPair_arg0: Pair<Int, List<Data>> = y6
_fstPair_arg0
}) == w6 }, x6) }
{
let l = fn(v6) { builtin.tail_list(builtin.tail_list(builtin.tail_list(builtin.tail_list(builtin.tail_list(builtin.tail_list({
expect _tailList_arg0: List<Data> = v6
_tailList_arg0
})))))) }
{
let m = fn(l6, m6) { rec_2(l6, m6, 0) }
{
let n = fn(j6, k6) { builtin.map_data({
expect _mapData_arg0: List<Pair<Data, Data>> = j6
_mapData_arg0
}) == builtin.map_data({
expect _mapData_arg0: List<Pair<Data, Data>> = k6
_mapData_arg0
}) }
{
let o = fn(l5, m5) { {
let n5 = builtin.snd_pair(builtin.un_constr_data(l5))
{
let o5 = builtin.snd_pair(builtin.un_constr_data(m5))
if {
expect _ifThenElse_arg0: Bool = {
let p5 = builtin.head_list({
expect _headList_arg0: List<Data> = o5
_headList_arg0
})
{
let q5 = builtin.un_constr_data(builtin.head_list({
expect _headList_arg0: List<Data> = n5
_headList_arg0
}))
{
let r5 = builtin.fst_pair({
expect _fstPair_arg0: Pair<Int, List<Data>> = q5
_fstPair_arg0
})
{
let s5 = builtin.snd_pair({
expect _sndPair_arg0: Pair<Int, List<Data>> = q5
_sndPair_arg0
})
if {
expect _ifThenElse_arg0: Bool = 0 == {
expect _equalsInteger_arg1: Int = r5
_equalsInteger_arg1
}
_ifThenElse_arg0
} { {
let t5 = builtin.un_constr_data(p5)
{
let u5 = builtin.fst_pair({
expect _fstPair_arg0: Pair<Int, List<Data>> = t5
_fstPair_arg0
})
{
let v5 = builtin.snd_pair({
expect _sndPair_arg0: Pair<Int, List<Data>> = t5
_sndPair_arg0
})
if {
expect _ifThenElse_arg0: Bool = 0 == {
expect _equalsInteger_arg1: Int = u5
_equalsInteger_arg1
}
_ifThenElse_arg0
} { builtin.head_list({
expect _headList_arg0: List<Data> = s5
_headList_arg0
}) == builtin.head_list({
expect _headList_arg0: List<Data> = v5
_headList_arg0
}) } else { False }
}
}
} } else { {
let w5 = builtin.un_constr_data(p5)
{
let x5 = builtin.fst_pair({
expect _fstPair_arg0: Pair<Int, List<Data>> = w5
_fstPair_arg0
})
{
let y5 = builtin.snd_pair({
expect _sndPair_arg0: Pair<Int, List<Data>> = w5
_sndPair_arg0
})
if {
expect _ifThenElse_arg0: Bool = 0 == {
expect _equalsInteger_arg1: Int = x5
_equalsInteger_arg1
}
_ifThenElse_arg0
} { False } else { builtin.head_list({
expect _headList_arg0: List<Data> = s5
_headList_arg0
}) == builtin.head_list({
expect _headList_arg0: List<Data> = y5
_headList_arg0
}) }
}
}
} }
}
}
}
}
_ifThenElse_arg0
} { {
let z5 = builtin.head_list(builtin.tail_list({
expect _tailList_arg0: List<Data> = o5
_tailList_arg0
}))
{
let a6 = builtin.un_constr_data(builtin.head_list(builtin.tail_list({
expect _tailList_arg0: List<Data> = n5
_tailList_arg0
})))
{
let b6 = builtin.fst_pair({
expect _fstPair_arg0: Pair<Int, List<Data>> = a6
_fstPair_arg0
})
{
let c6 = builtin.snd_pair({
expect _sndPair_arg0: Pair<Int
... (truncated, 10000 chars total)
AI Enhancement Issue
The AI rewrite (Claude) produced output with quality issues.
This may be a prompt problem, missing context, or model hallucination.
Script:
49b5b45b3b600416fee318dc34d9660ebb3a759fbd2db683fef641ffRetry: Force re-enhancement
Confidence: medium
Constants
Undefined Functions (1 — AI referenced but never defined)
predicate()Scores (AI → Static)
AI-Enhanced Aiken
Raw Decompiled Aiken
UPLC (compact)
Auto-filed by UPLC.WTF verification system