feat: change project structure

This commit is contained in:
rvcas
2022-10-24 00:03:02 -04:00
committed by Lucas
parent 825783ca61
commit a41d05f7b6
4 changed files with 21 additions and 6 deletions

View File

@@ -0,0 +1,3 @@
pub type ScriptContext {
thing: String
}

View File

@@ -0,0 +1,7 @@
pub type ScriptContext {
idk: Int
}
pub fn append(a: ByteArray, b: ByteArray) -> ByteArray {
todo
}

View File

@@ -0,0 +1,24 @@
use sample
use sample/syntax.{append}
pub type Datum {
something: String,
}
pub type Redeemer {
Buy
Sell
}
pub fn validate(datum: Datum, rdmr: Redeemer, ctx: sample.ScriptContext) -> Bool {
let thing = if True {
3
} else {
"thing"
}
when rdmr is {
Buy -> True
Sell -> datum.something == "Aiken"
}
}