Fix: additional tipo case when using Pairs type inside of a redeemer or datum type
This commit is contained in:
parent
cb69325af5
commit
7d6925545c
|
@ -719,7 +719,14 @@ pub fn get_arg_type_name(tipo: &Type) -> String {
|
|||
let inner_args = elems.iter().map(|arg| get_arg_type_name(arg)).collect_vec();
|
||||
inner_args.join("_")
|
||||
}
|
||||
_ => unreachable!(),
|
||||
Type::Pair { fst, snd, .. } => {
|
||||
let inner_args = [fst, snd]
|
||||
.iter()
|
||||
.map(|arg| get_arg_type_name(arg))
|
||||
.collect_vec();
|
||||
inner_args.join("_")
|
||||
}
|
||||
_ => unreachable!("WTF {:#?}", tipo),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
name = "aiken-lang/104"
|
||||
version = "0.0.0"
|
||||
license = "Apache-2.0"
|
||||
description = "Aiken contracts for project 'aiken-lang/104'"
|
||||
|
||||
[repository]
|
||||
user = "aiken-lang"
|
||||
project = "104"
|
||||
platform = "github"
|
||||
|
||||
[[dependencies]]
|
||||
name = "aiken-lang/stdlib"
|
||||
version = "main"
|
||||
source = "github"
|
||||
|
||||
[[dependencies]]
|
||||
name = "aiken-lang/fuzz"
|
||||
version = "main"
|
||||
source = "github"
|
|
@ -0,0 +1,12 @@
|
|||
pub type Thing =
|
||||
Option<Pairs<ByteArray, Pairs<ByteArray, Int>>>
|
||||
|
||||
validator foo_3 {
|
||||
mint(redeemer: Thing, _policy_, _tx) {
|
||||
redeemer == redeemer
|
||||
}
|
||||
|
||||
else(_) {
|
||||
fail
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue