diff --git a/examples/acceptance_tests/012/lib/tests.ak b/examples/acceptance_tests/012/lib/tests.ak
index 78e5360bf..77cd95eff 100644
--- a/examples/acceptance_tests/012/lib/tests.ak
+++ b/examples/acceptance_tests/012/lib/tests.ak
@@ -14,6 +14,7 @@ pub fn filter(xs: List, f: fn(a) -> Bool) -> List {
}
test filter_1() {
- filter([1,
- 2, 3, 4, 5, 6], fn(x) { builtin.mod_integer(x, 2) == 0 }) == [2, 4, 6]
+ filter([1, 2, 3, 4, 5, 6], fn(x) { builtin.mod_integer(x, 2) == 0 }) == [
+ 2, 4, 6,
+ ]
}
diff --git a/examples/acceptance_tests/036/aiken.lock b/examples/acceptance_tests/036/aiken.lock
index 2658f9e40..0b889661a 100644
--- a/examples/acceptance_tests/036/aiken.lock
+++ b/examples/acceptance_tests/036/aiken.lock
@@ -3,14 +3,14 @@
[[requirements]]
name = "aiken-lang/stdlib"
-version = "main"
+version = "v2"
source = "github"
[[packages]]
name = "aiken-lang/stdlib"
-version = "main"
+version = "v2"
requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158432, nanos_since_epoch = 10066000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@v2" = [{ secs_since_epoch = 1724777134, nanos_since_epoch = 232157000 }, "cdbbce58b61deb385e7ea787a2e0fc2dc8fe94db9999e0e6275bc9c70e5796be"]
diff --git a/examples/acceptance_tests/036/aiken.toml b/examples/acceptance_tests/036/aiken.toml
index 8147c1579..9ab33a029 100644
--- a/examples/acceptance_tests/036/aiken.toml
+++ b/examples/acceptance_tests/036/aiken.toml
@@ -3,5 +3,5 @@ version = "0.0.0"
[[dependencies]]
name = 'aiken-lang/stdlib'
-version = 'main'
+version = 'v2'
source = 'github'
diff --git a/examples/acceptance_tests/036/plutus.json b/examples/acceptance_tests/036/plutus.json
index a91e2dccc..515258cdd 100644
--- a/examples/acceptance_tests/036/plutus.json
+++ b/examples/acceptance_tests/036/plutus.json
@@ -5,12 +5,12 @@
"plutusVersion": "v2",
"compiler": {
"name": "Aiken",
- "version": "v1.0.31-alpha+6e4a16d"
+ "version": "v1.0.31-alpha+4003343"
}
},
"validators": [
{
- "title": "spend.mint",
+ "title": "spend.bar.mint",
"redeemer": {
"title": "_redeemer",
"schema": {
@@ -21,15 +21,28 @@
{
"title": "output_reference",
"schema": {
- "$ref": "#/definitions/aiken~1transaction~1OutputReference"
+ "$ref": "#/definitions/cardano~1transaction~1OutputReference"
}
}
],
- "compiledCode": "589e0100003232323232323222322533300553330053370e900018031baa3232330010013758600460126ea8c008c024dd50019129998058008a6103d87a800013232533300a3375e600a60186ea80080244cdd2a40006601c00497ae0133004004001300f002300d0012300b00114a229405261365653330033370e900018021baa00115333006300537540022930b0b2b9a5573aaae7955cfaba05742ae881",
- "hash": "0241f73ef186e53566d1b5a81eca50049b0d86833e6b88fe26b1e4bc"
+ "compiledCode": "58c90100003232323232323222533300332323232325332330093001300a375400426464a666016600660186ea8c8c8cc004004dd6180118079baa00922533301100114c0103d87a80001323253330103375e600a60246ea800803c4cdd2a40006602800497ae0133004004001301500230130012301100114a229414ccc028c008c02cdd50020a99980698061baa00414985858dd7180718059baa002370e90000b1806180680118058009805801180480098029baa00114984d9595cd2ab9d5573caae7d5d02ba157441",
+ "hash": "2edaecec5a072cd65b12395410ce6da7cafaffdf70506cbcb40b4df8"
},
{
- "title": "spend.spend",
+ "title": "spend.bar.else",
+ "parameters": [
+ {
+ "title": "output_reference",
+ "schema": {
+ "$ref": "#/definitions/cardano~1transaction~1OutputReference"
+ }
+ }
+ ],
+ "compiledCode": "58c90100003232323232323222533300332323232325332330093001300a375400426464a666016600660186ea8c8c8cc004004dd6180118079baa00922533301100114c0103d87a80001323253330103375e600a60246ea800803c4cdd2a40006602800497ae0133004004001301500230130012301100114a229414ccc028c008c02cdd50020a99980698061baa00414985858dd7180718059baa002370e90000b1806180680118058009805801180480098029baa00114984d9595cd2ab9d5573caae7d5d02ba157441",
+ "hash": "2edaecec5a072cd65b12395410ce6da7cafaffdf70506cbcb40b4df8"
+ },
+ {
+ "title": "spend.foo.spend",
"datum": {
"title": "_datum",
"schema": {
@@ -42,8 +55,13 @@
"$ref": "#/definitions/Data"
}
},
- "compiledCode": "58ef01000032323232323232222533300432330010013758601460166016600e6ea8c028c01cdd50011129998048008a501325333007333007533300a3253330083370e900118049baa00114bd6f7b63009bab300d300a375400264660020026eacc034c038c028dd518068019129998060008a60103d87a8000132323232533300d33722911050000000000000021533300d3371e91010500000000000000213374a9000198089ba60014bd700a6103d87a80001330060060033756601c0066eb8c030008c040008c0380045288a504a094452889980180180098060008a4c26cacae6955ceaab9e5573eae815d0aba21",
- "hash": "f56561e01063b11146809755d9907147e79d3166aa5c65fba4040fd1"
+ "compiledCode": "5901230100003232323232323225333002323232323253330073370e900118041baa001132323232330010013758602060226022601a6ea8020894ccc03c0045280992999806999806a99980819299980719b8748008c03cdd50008a5eb7bdb1804dd5980998081baa001323300100137566026602860206ea8c04c00c894ccc048004530103d87a800013232323253330133372291105000000000000002153330133371e91010500000000000000213374a90001980b9ba60014bd700a6103d87a8000133006006003375660280066eb8c048008c058008c0500045288a504a0944528899801801800980900098071807801180680098049baa00116300b300c002300a001300a00230080013004375400229309b2b2b9a5573aaae7955cfaba05742ae881",
+ "hash": "cf024265a1ff4ab129cef178c64b8c4cab25d62129242e01e29bb3d1"
+ },
+ {
+ "title": "spend.foo.else",
+ "compiledCode": "5901230100003232323232323225333002323232323253330073370e900118041baa001132323232330010013758602060226022601a6ea8020894ccc03c0045280992999806999806a99980819299980719b8748008c03cdd50008a5eb7bdb1804dd5980998081baa001323300100137566026602860206ea8c04c00c894ccc048004530103d87a800013232323253330133372291105000000000000002153330133371e91010500000000000000213374a90001980b9ba60014bd700a6103d87a8000133006006003375660280066eb8c048008c058008c0500045288a504a0944528899801801800980900098071807801180680098049baa00116300b300c002300a001300a00230080013004375400229309b2b2b9a5573aaae7955cfaba05742ae881",
+ "hash": "cf024265a1ff4ab129cef178c64b8c4cab25d62129242e01e29bb3d1"
}
],
"definitions": {
@@ -68,7 +86,7 @@
}
]
},
- "aiken/transaction/OutputReference": {
+ "cardano/transaction/OutputReference": {
"title": "OutputReference",
"description": "An `OutputReference` is a unique reference to an output on-chain. The `output_index`\n corresponds to the position in the output list of the transaction (identified by its id)\n that produced that output",
"anyOf": [
@@ -79,7 +97,7 @@
"fields": [
{
"title": "transaction_id",
- "$ref": "#/definitions/aiken~1transaction~1TransactionId"
+ "$ref": "#/definitions/ByteArray"
},
{
"title": "output_index",
@@ -88,23 +106,6 @@
]
}
]
- },
- "aiken/transaction/TransactionId": {
- "title": "TransactionId",
- "description": "A unique transaction identifier, as the hash of a transaction body. Note that the transaction id\n isn't a direct hash of the `Transaction` as visible on-chain. Rather, they correspond to hash\n digests of transaction body as they are serialized on the network.",
- "anyOf": [
- {
- "title": "TransactionId",
- "dataType": "constructor",
- "index": 0,
- "fields": [
- {
- "title": "hash",
- "$ref": "#/definitions/ByteArray"
- }
- ]
- }
- ]
}
}
}
\ No newline at end of file
diff --git a/examples/acceptance_tests/036/validators/spend.ak b/examples/acceptance_tests/036/validators/spend.ak
index 649459b53..d02a89a47 100644
--- a/examples/acceptance_tests/036/validators/spend.ak
+++ b/examples/acceptance_tests/036/validators/spend.ak
@@ -1,29 +1,33 @@
-use aiken/dict
-use aiken/list
-use aiken/transaction.{Output, OutputReference, ScriptContext}
-use aiken/transaction/value.{PolicyId}
+use aiken/collection/dict
+use aiken/collection/list
+use cardano/assets.{PolicyId}
+use cardano/transaction.{Output, OutputReference, Transaction}
const my_policy_id: PolicyId = #"0000000000"
pub fn has_policy_id(self: Output, policy_id: PolicyId) -> Bool {
self.value
- |> value.tokens(policy_id)
+ |> assets.tokens(policy_id)
|> dict.is_empty
|> not
}
validator foo {
- spend(_datum: Data, _redeemer: Data, o_ref: Data, tx: Transaction) -> Bool {
- ctx.transaction.outputs
+ spend(_datum: Option, _redeemer: Data, _o_ref: Data, self: Transaction) {
+ self.outputs
|> list.any(has_policy_id(_, my_policy_id))
}
+
+ else(_) {
+ fail
+ }
}
validator bar(output_reference: OutputReference) {
- mint(_redeemer: Void, _policy_id: Data, tx: Transaction) -> Bool {
+ mint(_redeemer: Void, _policy_id, self: Transaction) {
when
list.find(
- ctx.transaction.inputs,
+ self.inputs,
fn(input) { input.output_reference == output_reference },
)
is {
@@ -31,4 +35,8 @@ validator bar(output_reference: OutputReference) {
None -> False
}
}
+
+ else(_) {
+ fail
+ }
}
diff --git a/examples/acceptance_tests/040/lib/tests.ak b/examples/acceptance_tests/040/lib/tests.ak
index 1522eec04..c20670689 100644
--- a/examples/acceptance_tests/040/lib/tests.ak
+++ b/examples/acceptance_tests/040/lib/tests.ak
@@ -29,7 +29,7 @@ test expect_ford1() {
],
)
expect Ford { owner, wheels, truck_bed_limit, .. }: Car = initial_car
- owner == #"" && ( wheels == 4 && truck_bed_limit == 10000 )
+ owner == #"" && wheels == 4 && truck_bed_limit == 10000
}
test expect_ford2() {
@@ -42,14 +42,14 @@ test expect_ford2() {
car_doors: [],
}
expect Ford { owner, wheels, remote_connect, .. } = initial_car
- owner == #"2222222222" && ( wheels == 6 && remote_connect == #"" )
+ owner == #"2222222222" && wheels == 6 && remote_connect == #""
}
test expect_list1() {
let initial_car =
[5, 6, 7]
expect [a, b, c] = initial_car
- a == 5 && ( b == 6 && c == 7 )
+ a == 5 && b == 6 && c == 7
}
test expect_list2() {
diff --git a/examples/acceptance_tests/047/plutus.json b/examples/acceptance_tests/047/plutus.json
index 9a9241cf5..9dfc4a4fd 100644
--- a/examples/acceptance_tests/047/plutus.json
+++ b/examples/acceptance_tests/047/plutus.json
@@ -5,12 +5,12 @@
"plutusVersion": "v2",
"compiler": {
"name": "Aiken",
- "version": "v1.0.31-alpha+6e4a16d"
+ "version": "v1.0.31-alpha+4003343"
}
},
"validators": [
{
- "title": "foo.spend",
+ "title": "foo.foo.spend",
"datum": {
"title": "_datum",
"schema": {
@@ -23,8 +23,13 @@
"$ref": "#/definitions/Void"
}
},
- "compiledCode": "585201000032323232232232253330064a229309b2b299980219b8748000c014dd50008a99980398031baa001149858594ccc008cdc3a400060066ea800454ccc014c010dd50008a4c2c2cae6955ceaab9e5573f",
- "hash": "84a516ff1f146f698164b5e64ff813e4e22ba2fa35491f2dc3d70935"
+ "compiledCode": "587601000032323232323225333002323232323253330073370e900118041baa0011323232324a2a66601466e1d2000300b375400a2a66601a60186ea80145261616300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89",
+ "hash": "c613c8326fea00dff179b7108f248b60c155881bbce544d84fe573e1"
+ },
+ {
+ "title": "foo.foo.else",
+ "compiledCode": "587601000032323232323225333002323232323253330073370e900118041baa0011323232324a2a66601466e1d2000300b375400a2a66601a60186ea80145261616300d300e002300c001300937540022c6014601600460120026012004600e00260086ea8004526136565734aae7555cf2ab9f5742ae89",
+ "hash": "c613c8326fea00dff179b7108f248b60c155881bbce544d84fe573e1"
}
],
"definitions": {
diff --git a/examples/acceptance_tests/047/validators/foo.ak b/examples/acceptance_tests/047/validators/foo.ak
index aa9f79d35..c8d490e71 100644
--- a/examples/acceptance_tests/047/validators/foo.ak
+++ b/examples/acceptance_tests/047/validators/foo.ak
@@ -1,7 +1,11 @@
validator foo {
- spend(_datum: Void, _redeemer: Void, oref: Data, _tx: Void) -> Bool {
+ spend(_datum: Option, _redeemer: Void, oref: Data, _tx: Void) {
True
}
+
+ else(_) {
+ fail
+ }
}
test foo() {
diff --git a/examples/acceptance_tests/054/aiken.lock b/examples/acceptance_tests/054/aiken.lock
index b7148ea2c..59f3e01b0 100644
--- a/examples/acceptance_tests/054/aiken.lock
+++ b/examples/acceptance_tests/054/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596650, nanos_since_epoch = 294733000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724776969, nanos_since_epoch = 835808000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/055/aiken.lock b/examples/acceptance_tests/055/aiken.lock
index f9af5e0e3..472e63d42 100644
--- a/examples/acceptance_tests/055/aiken.lock
+++ b/examples/acceptance_tests/055/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596651, nanos_since_epoch = 984539000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724776974, nanos_since_epoch = 866167000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/061/aiken.lock b/examples/acceptance_tests/061/aiken.lock
index 9e34f1aaa..3e15749be 100644
--- a/examples/acceptance_tests/061/aiken.lock
+++ b/examples/acceptance_tests/061/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596658, nanos_since_epoch = 893017000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724776995, nanos_since_epoch = 750600000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/063/aiken.lock b/examples/acceptance_tests/063/aiken.lock
index f2d9b2c42..2cec8363b 100644
--- a/examples/acceptance_tests/063/aiken.lock
+++ b/examples/acceptance_tests/063/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596651, nanos_since_epoch = 968695000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724776974, nanos_since_epoch = 455232000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/067/aiken.lock b/examples/acceptance_tests/067/aiken.lock
index 3450439df..37bf10bf9 100644
--- a/examples/acceptance_tests/067/aiken.lock
+++ b/examples/acceptance_tests/067/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596660, nanos_since_epoch = 748574000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724777001, nanos_since_epoch = 587403000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/067/lib/tests.ak b/examples/acceptance_tests/067/lib/tests.ak
index 5ed56bd3c..c4a66f5c3 100644
--- a/examples/acceptance_tests/067/lib/tests.ak
+++ b/examples/acceptance_tests/067/lib/tests.ak
@@ -322,7 +322,7 @@ test get_proof_4() {
let h1: ByteArray = get_proof_item_value(p1)
let h2: ByteArray = get_proof_item_value(p2)
- size_match && ( h1 == hash_fn(cat) && h2 == right_node_hash )
+ size_match && h1 == hash_fn(cat) && h2 == right_node_hash
}
fn do_from_list(
diff --git a/examples/acceptance_tests/068/aiken.lock b/examples/acceptance_tests/068/aiken.lock
index 27ea90234..3731aa410 100644
--- a/examples/acceptance_tests/068/aiken.lock
+++ b/examples/acceptance_tests/068/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596659, nanos_since_epoch = 760789000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724776997, nanos_since_epoch = 900786000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/069/aiken.lock b/examples/acceptance_tests/069/aiken.lock
index 2c1d46e21..d96303910 100644
--- a/examples/acceptance_tests/069/aiken.lock
+++ b/examples/acceptance_tests/069/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596660, nanos_since_epoch = 681097000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724777000, nanos_since_epoch = 47370000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/070/aiken.lock b/examples/acceptance_tests/070/aiken.lock
index 0d8de9c90..10526fde9 100644
--- a/examples/acceptance_tests/070/aiken.lock
+++ b/examples/acceptance_tests/070/aiken.lock
@@ -13,4 +13,4 @@ requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724596647, nanos_since_epoch = 155791000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1724776959, nanos_since_epoch = 949879000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
diff --git a/examples/acceptance_tests/071/aiken.lock b/examples/acceptance_tests/071/aiken.lock
index 57177e6ba..2e59bd680 100644
--- a/examples/acceptance_tests/071/aiken.lock
+++ b/examples/acceptance_tests/071/aiken.lock
@@ -3,14 +3,14 @@
[[requirements]]
name = "aiken-lang/stdlib"
-version = "main"
+version = "v2"
source = "github"
[[packages]]
name = "aiken-lang/stdlib"
-version = "main"
+version = "v2"
requirements = []
source = "github"
[etags]
-"aiken-lang/stdlib@main" = [{ secs_since_epoch = 1723158434, nanos_since_epoch = 487166000 }, "5e58899446492a704d0927a43299139856bef746e697b55895ba34206fa28452"]
+"aiken-lang/stdlib@v2" = [{ secs_since_epoch = 1724776963, nanos_since_epoch = 265617000 }, "cdbbce58b61deb385e7ea787a2e0fc2dc8fe94db9999e0e6275bc9c70e5796be"]
diff --git a/examples/acceptance_tests/071/plutus.json b/examples/acceptance_tests/071/plutus.json
index 1405ea1c2..f2ad08e50 100644
--- a/examples/acceptance_tests/071/plutus.json
+++ b/examples/acceptance_tests/071/plutus.json
@@ -5,12 +5,12 @@
"plutusVersion": "v2",
"compiler": {
"name": "Aiken",
- "version": "v1.0.31-alpha+6e4a16d"
+ "version": "v1.0.31-alpha+4003343"
}
},
"validators": [
{
- "title": "spend.pool_contract",
+ "title": "spend.foo.spend",
"datum": {
"title": "datum",
"schema": {
@@ -23,8 +23,13 @@
"$ref": "#/definitions/spend~1PoolRedeemer"
}
},
- "compiledCode": "5904170100003232323232323232232325333004300230053754006264a6660100022c264a66666601a002264a6660140022c264a66666601e0022c2c2c26464a66601a0022c264a6666660240022c2c2c264a66601e6024006266601200e24a66601a6016601c6ea80044c94ccc044004584c94cccccc05800454ccc048c0540084c8c8c94ccc048c0400044c94ccc058004584c94cccccc06c0045858584c94ccc060c06c00c5401458dd68008b180c000980a1baa004153330123003001132533301600116132533333301b00115333017301a00215333014301230153754002264a6660300022c264a66666603a002264a6660340022c264a66666603e0022c2c2c264a666038603e006266602c0082a0122c2c6eb400458c070004c07000858585858c068004c058dd50008b0b0b0b0b0b180c000980a1baa004153330123370e9002000899299980b0008b099299999980d8008a99980b980d0010a99980a1809180a9baa001132533301800116132533333301d001132533301a00116132533333301f001161616132533301c301f0031333016004150091616375a0022c603800260380042c2c2c2c6034002602c6ea8004585858585858c060004c050dd50020b18091baa0031253330113232325333014301200114a226464646464a666032601400c26464a666036601860386ea80044c8c8c94ccc078c070c07cdd5000899192999810180f18109baa0011324a2604a60446ea800458cc01c03c00cc08cc080dd50008b198038068009804244101ff003020301d37540022940c00cc070dd5005180f180d9baa00713232533301b300c301c37540022646464a66603c6038603e6ea80044c8c94ccc080c078c084dd50008992513025302237540022c6600e01e006604660406ea800458cc01c034004c021220101ff003020301d37540022940c00cc070dd5005180f180d9baa00722330053758601260386ea8c024c070dd5001119baf300a301d37546008603a6ea80040088c074c07800488cc00cdd6180e980f180f180d1baa3007301a3754004466ebcc020c06cdd500080111191980080080191299980e0008a6103d87a800013232533301b300500213374a90001980f80125eb804cc010010004c080008c0780048cdd2a40006603266e95200233019375200297ae0330194c103d87a80004bd70180a1baa00130013014375400c4602e00229309b2b1b87480085858585858c04c004c03cdd50008b0b0b1bad00116300f001300f003375a0022c601800260180042c2c2c2c6014002600c6ea800c588894ccc018c010c01cdd5001899299980500080109929999998078008018018018018991929998068008028992999999809000803003003003099299980798090018a8040039bae001300f001300f003375c002601800260106ea800c004dc3a4000ae6955ceaab9e5573eae815d0aba25749",
- "hash": "640debfa5063d2e3fd7f23e9777aaf3a0f575a99972ccda8748a49c0"
+ "compiledCode": "5903a2010000323232323232323225333002323232323253323300830013009375400426464646464a66601a6004601c6ea80204c94ccc044004584c94cccccc05800454ccc048c0540084c8c94ccc044c0180044c94ccc054004584c94cccccc0680045858584c94ccc05cc06800c5401458dd68008b180b80098099baa00315333011300a001132533301500116132533333301a00115333016301900215333013300830143754002264a66602e0022c264a666666038002264a6660320022c264a66666603c0022c2c2c264a666036603c00626660180082a0122c2c6eb400458c06c004c06c00858585858c064004c054dd50008b0b0b0b0b0b180b80098099baa003153330113370e9002000899299980a8008b099299999980d0008a99980b180c8010a9998099804180a1baa001132533301700116132533333301c001132533301900116132533333301e001161616132533301b301e003133300c004150091616375a0022c603600260360042c2c2c2c6032002602a6ea8004585858585858c05c004c04cdd50018b18089baa0021533300f30043010375400a264646464a666026601000229444c8c8c8c94ccc05cc0400144c8c8c94ccc068c03cc06cdd500089919299980e1808980e9baa0011324a26042603c6ea800458cc01406000cc07cc070dd50008b1980200b0009802a44101ff00301c3019375400c2646464a666034601e60366ea80044c8c94ccc070c044c074dd50008992513021301e37540022c6600a030006603e60386ea800458cc010058004c015220101ff00301c3019375400c44660086eb0c020c068dd5001119baf3009301b3754603c603e60366ea800400888cc00cdd6180e180e980e980c9baa00223375e601060346ea800400888c8cc00400400c894ccc06c004530103d87a800013232533301a300500213374a90001980f00125eb804cc010010004c07c008c0740048cdd2a40006603066e95200233018375200297ae0330184c103d87a80004bd7018099baa0013001301337540184602c002602860226ea8014585858585858c04c004c03cdd50040b1112999807980218081baa00313253330130010021325333333018001003003003003132325333016001005132533333301b0010060060060061325333018301b00315008007375c002603000260300066eb8004c054004c044dd50018009b8748000c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba257481",
+ "hash": "10e8faa163e7c7699b978c2df5f2b1fadc9796e866d67b88799def6e"
+ },
+ {
+ "title": "spend.foo.else",
+ "compiledCode": "5903a2010000323232323232323225333002323232323253323300830013009375400426464646464a66601a6004601c6ea80204c94ccc044004584c94cccccc05800454ccc048c0540084c8c94ccc044c0180044c94ccc054004584c94cccccc0680045858584c94ccc05cc06800c5401458dd68008b180b80098099baa00315333011300a001132533301500116132533333301a00115333016301900215333013300830143754002264a66602e0022c264a666666038002264a6660320022c264a66666603c0022c2c2c264a666036603c00626660180082a0122c2c6eb400458c06c004c06c00858585858c064004c054dd50008b0b0b0b0b0b180b80098099baa003153330113370e9002000899299980a8008b099299999980d0008a99980b180c8010a9998099804180a1baa001132533301700116132533333301c001132533301900116132533333301e001161616132533301b301e003133300c004150091616375a0022c603600260360042c2c2c2c6032002602a6ea8004585858585858c05c004c04cdd50018b18089baa0021533300f30043010375400a264646464a666026601000229444c8c8c8c94ccc05cc0400144c8c8c94ccc068c03cc06cdd500089919299980e1808980e9baa0011324a26042603c6ea800458cc01406000cc07cc070dd50008b1980200b0009802a44101ff00301c3019375400c2646464a666034601e60366ea80044c8c94ccc070c044c074dd50008992513021301e37540022c6600a030006603e60386ea800458cc010058004c015220101ff00301c3019375400c44660086eb0c020c068dd5001119baf3009301b3754603c603e60366ea800400888cc00cdd6180e180e980e980c9baa00223375e601060346ea800400888c8cc00400400c894ccc06c004530103d87a800013232533301a300500213374a90001980f00125eb804cc010010004c07c008c0740048cdd2a40006603066e95200233018375200297ae0330184c103d87a80004bd7018099baa0013001301337540184602c002602860226ea8014585858585858c04c004c03cdd50040b1112999807980218081baa00313253330130010021325333333018001003003003003132325333016001005132533333301b0010060060060061325333018301b00315008007375c002603000260300066eb8004c054004c044dd50018009b8748000c03cc040008c038004c028dd50011b874800858c02cc030008c028004c028008c020004c010dd50008a4c26cacae6955ceaab9e5573eae815d0aba257481",
+ "hash": "10e8faa163e7c7699b978c2df5f2b1fadc9796e866d67b88799def6e"
}
],
"definitions": {
diff --git a/examples/acceptance_tests/071/validators/spend.ak b/examples/acceptance_tests/071/validators/spend.ak
index aa9ce35c4..2d80e0831 100644
--- a/examples/acceptance_tests/071/validators/spend.ak
+++ b/examples/acceptance_tests/071/validators/spend.ak
@@ -1,16 +1,14 @@
+use aiken/collection/list
+use aiken/hash.{Blake2b_224, Hash}
use aiken/interval.{Finite}
-use aiken/list
use aiken/option
use cardano/assets.{
AssetName, PolicyId, Value, add, flatten, from_asset, negate, quantity_of,
}
-use cardano/credential.{
- Address, Script, ScriptCredential, VerificationKey, VerificationKeyCredential,
-}
-use cardano/hash.{Blake2b_224, Hash}
+use cardano/credential.{Address, Script, VerificationKey}
use cardano/transaction.{
- Datum, InlineDatum, Input, Output, OutputReference, Transaction,
- TransactionId, ValidityRange,
+ Datum, InlineDatum, Input, Output, OutputReference, Transaction, TransactionId,
+ ValidityRange,
}
// Datum/Redeemer pool
@@ -20,7 +18,7 @@ pub type PoolDatum {
lent_out: Int,
}
-type PoolRedeemer {
+pub type PoolRedeemer {
action: PoolRedeemerType,
}
@@ -50,17 +48,11 @@ pub fn get_output(transaction: Transaction, address: Address) -> Option