Skip to content

Commit

Permalink
chore: release (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
HinsonSIDAN authored Jan 21, 2025
1 parent d1ad88d commit 65aca5d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ Vodka is a library build for [Aiken](https://aiken-lang.org/) development. It of
Simply run

```sh
aiken add sidan-lab/vodka --version 0.1.10
aiken add sidan-lab/vodka --version 0.1.11
```

or putting the below in you `aiken.toml`

```toml
[[dependencies]]
name = "sidan-lab/vodka"
version = "0.1.10"
version = "0.1.11"
source = "github"
```

Expand All @@ -37,7 +37,7 @@ Vodka is now upgraded to support latest PlutusV3 with latest version, if you wan

| Vodka | Aiken Compiler | `aiken-lang/stdlib` |
| ---------- | -------------- | ------------------- |
| 0.1.10 | ^v1.1.9 | v2.2.0 |
| 0.1.11 | ^v1.1.9 | v2.2.0 |
| 0.1.6 | ^v1.1.5 | v2.1.0 |
| 0.0.1-beta | v1.0.29-alpha | v1.9.0 |

Expand Down
2 changes: 1 addition & 1 deletion aiken.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "sidan-lab/vodka"
version = "0.1.10"
version = "0.1.11"
compiler = "v1.1.9"
plutus = "v3"
license = "Apache-2.0"
Expand Down
32 changes: 25 additions & 7 deletions lib/mocktail.ak
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ pub fn add_input(tx: Transaction, condition: Bool, input: Input) -> Transaction
if !condition {
tx
} else {
Transaction { ..tx, inputs: tx.inputs |> list.push(input) }
Transaction { ..tx, inputs: tx.inputs |> list.concat([input]) }
}
}

Expand All @@ -500,7 +500,7 @@ pub fn add_reference_input(
} else {
Transaction {
..tx,
reference_inputs: tx.reference_inputs |> list.push(input),
reference_inputs: tx.reference_inputs |> list.concat([input]),
}
}
}
Expand All @@ -522,7 +522,7 @@ pub fn add_output(
if !condition {
tx
} else {
Transaction { ..tx, outputs: tx.outputs |> list.push(output) }
Transaction { ..tx, outputs: tx.outputs |> list.concat([output]) }
}
}

Expand Down Expand Up @@ -587,7 +587,7 @@ pub fn add_certificate(
} else {
Transaction {
..tx,
certificates: tx.certificates |> list.push(certificate),
certificates: tx.certificates |> list.concat([certificate]),
}
}
}
Expand All @@ -609,7 +609,10 @@ pub fn add_withdrawal(
if !condition {
tx
} else {
Transaction { ..tx, withdrawals: tx.withdrawals |> list.push(withdrawal) }
Transaction {
..tx,
withdrawals: tx.withdrawals |> list.concat([withdrawal]),
}
}
}

Expand All @@ -632,7 +635,7 @@ pub fn add_extra_signatory(
} else {
Transaction {
..tx,
extra_signatories: tx.extra_signatories |> list.push(signatory),
extra_signatories: tx.extra_signatories |> list.concat([signatory]),
}
}
}
Expand All @@ -654,7 +657,7 @@ pub fn add_redeemer(
if !condition {
tx
} else {
Transaction { ..tx, redeemers: tx.redeemers |> list.push(redeemer) }
Transaction { ..tx, redeemers: tx.redeemers |> list.concat([redeemer]) }
}
}

Expand Down Expand Up @@ -756,3 +759,18 @@ pub const mock_script_output = virgin_outputs.mock_script_output

/// Documentation please refer to [`virgin_validity_range`](./mocktail/virgin_validity_range.html)
pub const mock_interval = virgin_validity_range.mock_interval

test preserve_tx_in_order() {
let tx: Transaction =
mocktail_tx()
|> tx_in(True, mock_tx_hash(0), 0, zero, mock_pub_key_address(0, None))
|> tx_in(True, mock_tx_hash(1), 1, zero, mock_pub_key_address(1, None))
|> complete()
expect [input1, input2] = tx.inputs
and {
input1.output_reference.transaction_id == mock_tx_hash(0),
input1.output_reference.output_index == 0,
input2.output_reference.transaction_id == mock_tx_hash(1),
input2.output_reference.output_index == 1,
}
}
2 changes: 1 addition & 1 deletion plutus.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"preamble": {
"title": "sidan-lab/vodka",
"description": "Aiken utils for project 'sidan-lab/vodka",
"version": "0.1.10",
"version": "0.1.11",
"plutusVersion": "v3",
"compiler": {
"name": "Aiken",
Expand Down

0 comments on commit 65aca5d

Please sign in to comment.