feat: rework how modules are loaded

This commit is contained in:
rvcas
2022-11-10 10:27:03 -05:00
committed by Lucas
parent 7b5763edeb
commit c9da049712
9 changed files with 22 additions and 28 deletions

View File

@@ -0,0 +1,23 @@
use sample
use sample/mint
use sample/spend
pub type Redeemer {
Buy { id: Int }
Sell(Int)
}
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
}
}