change uplc version number based on plutus version

This commit is contained in:
microproofs 2024-05-23 15:04:59 -04:00
parent e2bc3a9fc4
commit 59cfa209d7
1 changed files with 5 additions and 4 deletions

View File

@ -217,12 +217,13 @@ impl<'a> CodeGenerator<'a> {
fn finalize(&mut self, mut term: Term<Name>) -> Program<Name> {
term = self.special_functions.apply_used_functions(term);
// TODO: Once SOP is implemented on mainnet, new version is 1.1.0
let mut program = Program {
version: (1, 0, 0),
term,
let version = match self.plutus_version {
PlutusVersion::V1 | PlutusVersion::V2 => (1, 0, 0),
PlutusVersion::V3 => (1, 1, 0),
};
let mut program = Program { version, term };
program = aiken_optimize_and_intern(program);
// This is very important to call here.