clean up some unused parts in created hashmaps

This commit is contained in:
Kasey White
2022-11-12 17:39:00 -05:00
committed by Lucas
parent b450c41438
commit d11b8858ba
3 changed files with 70 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
pub type Signer {
hash: Int,
hash: ByteArray,
}
pub type ScriptContext {

View File

@@ -16,13 +16,28 @@ pub type Reen {
}
pub fn twice(f: fn(Int) -> Int, x: Int) -> Int {
f(f(x))
}
pub fn add_one(x: Int) -> Int {
x + 1
}
pub fn add_two(x: Int) -> Int {
twice(add_one, x)
}
pub fn spend(
datum: sample.Datum,
rdmr: Redeemer,
ctx: spend.ScriptContext,
) -> Bool {
1 % 2 != 3 || 5 / 4 - 2 != 0
let x = rdmr.signer
let z = datum.sc.signer.hash
let y = datum.sc
let a = datum.fin
a > 0 && z == x
True
}