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,36 @@
pub type Signer {
hash: Int,
}
pub type ScriptContext {
signer: Signer,
}
pub type Redeem {
Buy
Sell
}
pub type Datum {
fin: Int,
sc: ScriptContext,
rdmr: Redeem,
}
pub fn eqInt(a: Int, b: Int) {
a == b
}
pub fn eqString(a: ByteArray, b: ByteArray) {
a == b
}
pub type Thing {
Some
None
}
pub type Other {
Wow
Yes
}

View File

@@ -0,0 +1,8 @@
pub type ScriptContext(purpose) {
tx_info: TxInfo,
script_purpose: purpose,
}
pub type TxInfo {
idk: Int,
}

View File

@@ -0,0 +1,8 @@
use sample/context
pub type Mint {
currency_symbol: ByteArray,
}
pub type ScriptContext =
context.ScriptContext(Mint)

View File

@@ -0,0 +1,8 @@
use sample/context
pub type Spend {
idk: Int,
}
pub type ScriptContext =
context.ScriptContext(Spend)