diff --git a/crates/aiken-project/src/blueprint/validator.rs b/crates/aiken-project/src/blueprint/validator.rs index a870d0fc6..bd89ade89 100644 --- a/crates/aiken-project/src/blueprint/validator.rs +++ b/crates/aiken-project/src/blueprint/validator.rs @@ -415,7 +415,7 @@ mod tests { assert_validator!( r#" /// On-chain state - type State { + pub type State { /// The contestation period as a number of seconds contestationPeriod: ContestationPeriod, /// List of public key hashes of all participants @@ -424,20 +424,20 @@ mod tests { } /// A Hash digest for a given algorithm. - type Hash = ByteArray + pub type Hash = ByteArray - type Blake2b_256 { Blake2b_256 } + pub type Blake2b_256 { Blake2b_256 } /// Whatever - type ContestationPeriod { + pub type ContestationPeriod { /// A positive, non-zero number of seconds. ContestationPeriod(Int) } - type Party = + pub type Party = ByteArray - type Input { + pub type Input { CollectCom Close /// Abort a transaction @@ -470,12 +470,12 @@ mod tests { fn generics() { assert_validator!( r#" - type Either { + pub type Either { Left(left) Right(right) } - type Interval { + pub type Interval { Finite(a) Infinite } @@ -493,8 +493,8 @@ mod tests { fn free_vars() { assert_validator!( r#" - validator { - fn generics(redeemer: a, ctx: Void) { + validator generics { + spend(redeemer: a, ctx: Void) { True } } @@ -506,11 +506,11 @@ mod tests { fn list_2_tuples_as_list() { assert_validator!( r#" - type Dict { + pub type Dict { inner: List<(ByteArray, value)> } - type UUID { UUID } + pub type UUID { UUID } validator list_2_tuples_as_list { mint(redeemer: Dict, ctx: Void) { @@ -525,14 +525,14 @@ mod tests { fn list_pairs_as_map() { assert_validator!( r#" - type Dict { + pub type Dict { inner: List> } - type UUID { UUID } + pub type UUID { UUID } - validator { - fn list_pairs_as_map(redeemer: Dict, ctx: Void) { + validator list_pairs_as_map { + spend(redeemer: Dict, ctx: Void) { True } } @@ -548,7 +548,7 @@ mod tests { inner: List<(ByteArray, value)> } - type UUID { UUID } + pub type UUID { UUID } validator opaque_singleton_variants { spend(redeemer: Dict, ctx: Void) { diff --git a/crates/aiken-project/src/tests/gen_uplc.rs b/crates/aiken-project/src/tests/gen_uplc.rs index dc71a4ab4..429dbedc2 100644 --- a/crates/aiken-project/src/tests/gen_uplc.rs +++ b/crates/aiken-project/src/tests/gen_uplc.rs @@ -3673,16 +3673,16 @@ fn when_bool_is_false() { #[test] fn when_tuple_deconstruction() { let src = r#" - type Thing { + pub type Thing { idx: Int, } - type Datum { + pub type Datum { A(Thing) B } - type RedSpend { + pub type RedSpend { Spend(Int) Buy } @@ -4037,12 +4037,12 @@ fn when_tuple_empty_lists() { #[test] fn generic_validator_type_test() { let src = r#" - type A { + pub type A { NoA SomeA(Void, x) } - type B { + pub type B { something: Void, } @@ -5548,15 +5548,15 @@ fn list_clause_with_assign() { #[test] fn opaque_value_in_datum() { let src = r#" - opaque type Value { + pub opaque type Value { inner: Dict> } - opaque type Dict { + pub opaque type Dict { inner: List> } - type Dat { + pub type Dat { c: Int, a: Value }