feat: output build assets

This commit is contained in:
rvcas
2022-11-08 22:08:19 -05:00
committed by Lucas
parent 4db0c93061
commit 7e0767ef74
14 changed files with 248 additions and 115 deletions

View File

@@ -1,38 +1,36 @@
pub type Signer {
hash: Int
hash: Int,
}
pub type ScriptContext {
signer: Signer
signer: Signer,
}
pub type Redeem {
Buy
Sell
Buy
Sell
}
pub type Datum {
fin: Int,
sc: ScriptContext,
rdmr: Redeem,
fin: Int,
sc: ScriptContext,
rdmr: Redeem,
}
pub fn eqInt(a: Int, b: Int) {
a == b
a == b
}
pub fn eqString(a: ByteArray, b: ByteArray) {
a == b
a == b
}
pub type Thing {
Some
None
Some
None
}
pub type Other {
Wow
Yes
Wow
Yes
}

View File

@@ -7,16 +7,17 @@ pub type Redeemer {
Sell(Int)
}
pub fn spend(datum: sample.Datum, rdmr: Redeemer, ctx: spend.ScriptContext) -> Bool {
pub fn spend(
datum: sample.Datum,
rdmr: Redeemer,
ctx: spend.ScriptContext,
) -> Bool {
let y = 2
let x = datum.sc.signer
let a = datum.sc.signer.hash
let b = datum.rdmr
when b is {
sample.Buy -> 1 == 1
sample.Sell -> 5 == 1
sample.Sell -> 5 == 1
}
}