feat: better errors for incorrect contructor making

This commit is contained in:
rvcas
2022-12-05 18:02:00 -05:00
committed by Lucas
parent 7e6dc978a1
commit 7875af7d35
5 changed files with 134 additions and 32 deletions

View File

@@ -46,4 +46,4 @@ pub fn incrementor(counter: Int, target: Int) -> Int {
}
}
pub const big_a = 5
pub const big_a = 5

View File

@@ -50,7 +50,8 @@ pub type Datum {
}
pub fn spend(datum: Datum, _rdmr: Nil, _ctx: Nil) -> Bool {
let x = Buy1 { signer: #[4, 4, 255], amount: 1000 }
let amount = 1000
let x = Buy1 { signer: #[4, 4, 255], amount }
when x is {
Buy1 { signer, .. } -> signer == #[3, 3, 255]
Stuff(signer, _) -> signer == #[3, 3, 255]