parent
4ee7a48aab
commit
56e2c195cf
|
@ -11,6 +11,7 @@
|
||||||
- **aiken-lang**: Prevent (type error) backpassing blocks with empty continuation. See [#1111](https://github.com/aiken-lang/aiken/issues/1111). @KtorZ
|
- **aiken-lang**: Prevent (type error) backpassing blocks with empty continuation. See [#1111](https://github.com/aiken-lang/aiken/issues/1111). @KtorZ
|
||||||
- **aiken-lang**: Change default placeholder for `trace` to `Void` instead of `todo`. @KtorZ
|
- **aiken-lang**: Change default placeholder for `trace` to `Void` instead of `todo`. @KtorZ
|
||||||
- **aiken-lang**: Disallow (parse error) dangling colon `:` in traces. See [#1113](https://github.com/aiken-lang/aiken/issues/1113). @KtorZ
|
- **aiken-lang**: Disallow (parse error) dangling colon `:` in traces. See [#1113](https://github.com/aiken-lang/aiken/issues/1113). @KtorZ
|
||||||
|
- **aiken-lang**: Fix `aiken blueprint apply` wrongly overriding all validators handlers names & ABI to the mint's one. See [#1099](https://github.com/aiken-lang/aiken/issues/1099). @KtorZ
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -714,12 +714,13 @@ where
|
||||||
blueprint.validators = blueprint
|
blueprint.validators = blueprint
|
||||||
.validators
|
.validators
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|validator| {
|
.map(|mut validator| {
|
||||||
if prefix(&applied_validator.title) == prefix(&validator.title) {
|
if prefix(&applied_validator.title) == prefix(&validator.title) {
|
||||||
applied_validator.clone()
|
validator.program = applied_validator.program.clone();
|
||||||
} else {
|
validator.parameters = applied_validator.parameters.clone();
|
||||||
validator
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validator
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
name = "aiken-lang/120"
|
||||||
|
version = "0.0.0"
|
||||||
|
license = "Apache-2.0"
|
||||||
|
description = "Aiken contracts for project 'aiken-lang/120'"
|
||||||
|
|
||||||
|
[repository]
|
||||||
|
user = "aiken-lang"
|
||||||
|
project = "120"
|
||||||
|
platform = "github"
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd $(dirname "$0")
|
||||||
|
|
||||||
|
cargo run -r -- build
|
||||||
|
JSON=$(cargo run -r -- blueprint apply 43666F6F)
|
||||||
|
|
||||||
|
if [ $(jq -r ".validators[0].title" <<< $JSON) != "tests.my_script.mint" ]; then
|
||||||
|
echo "❌ invalid mint handler name"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(jq -r ".validators[1].title" <<< $JSON) != "tests.my_script.spend" ]; then
|
||||||
|
echo "❌ invalid spend handler name"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(jq -r ".validators[2].title" <<< $JSON) != "tests.my_script.else" ]; then
|
||||||
|
echo "❌ invalid else handler name"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(jq -r ".validators[0].hash" <<< $JSON) != $(jq -r ".validators[1].hash" <<< $JSON) ]; then
|
||||||
|
echo "❌ hash mismatch between mint and spend handlers"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(jq -r ".validators[1].hash" <<< $JSON) != $(jq -r ".validators[2].hash" <<< $JSON) ]; then
|
||||||
|
echo "❌ hash mismatch between spend and else handlers"
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -0,0 +1,13 @@
|
||||||
|
validator my_script(_param: ByteArray) {
|
||||||
|
mint(_redeemer: Int, _policy_id: Data, _self: Data) {
|
||||||
|
True
|
||||||
|
}
|
||||||
|
|
||||||
|
spend(_datum: Option<Int>, _redeemer: Bool, _utxo: Data, _self: Data) {
|
||||||
|
True
|
||||||
|
}
|
||||||
|
|
||||||
|
else(_) {
|
||||||
|
fail
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,7 +21,12 @@ if [ "$?" -eq "0" ]; then
|
||||||
if [ -z "$VALIDATORS" ]; then
|
if [ -z "$VALIDATORS" ]; then
|
||||||
echo "✅ $(basename $TARGET)"
|
echo "✅ $(basename $TARGET)"
|
||||||
else
|
else
|
||||||
cargo run -r --quiet -- build $TARGET 1>$TMP 2>/dev/null
|
if [ ! -f "$TARGET/assert.sh" ]; then
|
||||||
|
cargo run -r --quiet -- build $TARGET 1>$TMP 2>/dev/null
|
||||||
|
else
|
||||||
|
$TARGET/assert.sh 1>$TMP 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
echo "✅ $(basename $TARGET)"
|
echo "✅ $(basename $TARGET)"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue