From 6e1979df335802061d201338c2f680b2760c4ada Mon Sep 17 00:00:00 2001 From: KtorZ Date: Sun, 22 Sep 2024 12:33:52 +0200 Subject: [PATCH] Switch to aiken 1.1.3 --- .github/workflows/continuous-integration.yml | 2 +- .gitignore | 7 +++++++ aiken.toml | 2 +- lib/aiken/collection/list/extra.ak | 3 +-- validators/zhuli.test.ak | 6 ++---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ed899af..1b4a3be 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: aiken-lang/setup-aiken@v1 with: - version: v1.1.2 + version: v1.1.3 - run: aiken fmt --check - run: aiken check -D - run: aiken build diff --git a/.gitignore b/.gitignore index 372eac1..66d6342 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,10 @@ build/ docs/ # Aiken lock file aiken.lock + +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ +# These are backup files generated by rustfmt +**/*.rs.bk diff --git a/aiken.toml b/aiken.toml index 567df41..27acb83 100644 --- a/aiken.toml +++ b/aiken.toml @@ -1,6 +1,6 @@ name = "cardanosolutions/proxy-dreps" version = "0.0.0" -compiler = "v1.1.2" +compiler = "v1.1.3" plutus = "v3" license = "MPL-2.0" description = "Aiken contracts for project 'cardanosolutions/proxy-dreps'" diff --git a/lib/aiken/collection/list/extra.ak b/lib/aiken/collection/list/extra.ak index 003c4f0..9b03f55 100644 --- a/lib/aiken/collection/list/extra.ak +++ b/lib/aiken/collection/list/extra.ak @@ -5,8 +5,7 @@ /// Insert an element in a list at the given position. pub fn insert(self: List, ix: Int, elem: a) -> List { when self is { - [] -> - [elem] + [] -> [elem] [head, ..tail] -> if ix == 0 { [elem, head, ..tail] diff --git a/validators/zhuli.test.ak b/validators/zhuli.test.ak index 182f31e..d398ff1 100644 --- a/validators/zhuli.test.ak +++ b/validators/zhuli.test.ak @@ -340,11 +340,9 @@ fn register( fn(o) { o.address.payment_credential == Script(validator_hash) }, ) when n_ours is { - 0 -> - [sc_no_required_initial_output, ..labels] + 0 -> [sc_no_required_initial_output, ..labels] 1 -> labels - _ -> - [sc_too_many_initial_outputs, ..labels] + _ -> [sc_too_many_initial_outputs, ..labels] } } else { list.filter(