replace uplc with uplc_two and move structs over
This commit is contained in:
parent
22fbef2fbe
commit
3e68204768
|
@ -12,7 +12,6 @@ pub mod parser;
|
||||||
pub mod pretty;
|
pub mod pretty;
|
||||||
pub mod tipo;
|
pub mod tipo;
|
||||||
pub mod uplc;
|
pub mod uplc;
|
||||||
pub mod uplc_two;
|
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Debug, Default, Clone)]
|
||||||
pub struct IdGenerator {
|
pub struct IdGenerator {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,7 @@ use aiken_lang::{
|
||||||
builtins,
|
builtins,
|
||||||
tipo::TypeInfo,
|
tipo::TypeInfo,
|
||||||
uplc::{DataTypeKey, FunctionAccessKey},
|
uplc::{DataTypeKey, FunctionAccessKey},
|
||||||
uplc_two::CodeGenerator,
|
uplc::CodeGenerator,
|
||||||
IdGenerator,
|
IdGenerator,
|
||||||
};
|
};
|
||||||
use miette::NamedSource;
|
use miette::NamedSource;
|
||||||
|
|
|
@ -49,24 +49,28 @@ pub type Datum {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn spend(datum: Datum, _rdmr: Nil, _ctx: Nil) -> Bool {
|
pub fn spend(datum: Datum, _rdmr: Nil, _ctx: Nil) -> Bool {
|
||||||
when datum is {
|
// when datum is {
|
||||||
Sell -> sample.eqIntPlusOne(sample.incrementor(0, 8), 9)
|
// Sell -> sample.eqIntPlusOne(sample.incrementor(0, 8), 9)
|
||||||
Offer {
|
// Offer {
|
||||||
prices: p,
|
// prices: p,
|
||||||
asset_class: ac,
|
// asset_class: ac,
|
||||||
other_thing: Offer {
|
// other_thing: Offer {
|
||||||
other_thing: Offer { asset_class: nested_signer, prices: amounts, .. },
|
// other_thing: Offer { asset_class: nested_signer, prices: amounts, .. },
|
||||||
..
|
// ..
|
||||||
},
|
// },
|
||||||
} -> 1 == 1
|
// } -> 1 == 1
|
||||||
Offer { prices, other_thing: thing, .. } ->
|
// Offer { prices, other_thing: thing, .. } ->
|
||||||
when prices is {
|
// when prices is {
|
||||||
[] -> True
|
// [] -> True
|
||||||
[a] -> True
|
// [a] -> True
|
||||||
[a, b, c] -> True
|
// [a, b, c] -> True
|
||||||
[a, b, c, d, ..e] -> sample.big_a == a
|
// [a, b, c, d, ..e] -> sample.big_a == a
|
||||||
|
// }
|
||||||
}
|
// _ -> False
|
||||||
|
// }
|
||||||
|
let x = Buy1{signer: #[4, 4, 255], amount: 1000}
|
||||||
|
when x is {
|
||||||
|
Buy1{signer, ..} -> signer == #[3,3,255]
|
||||||
_ -> False
|
_ -> False
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue