Fix errors on aiken build

- Update generics syntax
- Add required args to default validator function

This allows running a successful aiken build from
files generated by aiken new.
This commit is contained in:
Carlos Souza 2022-12-14 11:19:39 -05:00 committed by Lucas
parent 95986fed83
commit c77b7c293b
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ impl Creator {
write( write(
self.validators.join("always_true.ak"), self.validators.join("always_true.ak"),
indoc! {" indoc! {"
pub fn spend() -> Bool { pub fn spend(_datum, _redeemer, _context) -> Bool {
True True
} }
"}, "},
@ -76,7 +76,7 @@ impl Creator {
write( write(
self.project_lib.join("context.ak"), self.project_lib.join("context.ak"),
indoc! {" indoc! {"
pub type ScriptContext(purpose) { pub type ScriptContext<purpose> {
tx_info: TxInfo, tx_info: TxInfo,
script_purpose: purpose, script_purpose: purpose,
} }