did hacky way for scope level, but now i know how it works and how to fix
This commit is contained in:
@@ -6,6 +6,7 @@ pub type Datum {
|
||||
something: String,
|
||||
}
|
||||
|
||||
pub fn thing(a: Datum, b){
|
||||
a.something == b
|
||||
pub fn thing(a: Bool) {
|
||||
a
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,11 @@ pub type Redeemer {
|
||||
Sell(Int)
|
||||
}
|
||||
|
||||
pub fn spend(datum: Datum, rdmr: Redeemer, ctx: spend.ScriptContext) -> Bool {
|
||||
if datum.something == "Aiken" {
|
||||
True
|
||||
} else if datum.something == "Wow" {
|
||||
True
|
||||
} else {
|
||||
False
|
||||
}
|
||||
|
||||
pub fn spend(datum: sample.Datum, rdmr: Redeemer, ctx: spend.ScriptContext) -> Bool {
|
||||
let a = True
|
||||
let b = sample.thing(a)
|
||||
let c = sample.thing(b)
|
||||
|
||||
c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user