fix: record formatting

This commit is contained in:
rvcas
2022-11-05 17:28:32 -04:00
parent 9d14acbe0a
commit 809d5ea5c5
6 changed files with 86 additions and 58 deletions

View File

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

View File

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

View File

@@ -1,6 +1,11 @@
use sample/context
pub type Mint { currency_symbol: ByteArray, thing: Int, thing: Int, thing: Int }
pub type Mint {
currency_symbol: ByteArray,
thing: Int,
thing: Int,
thing: Int,
}
pub type ScriptContext =
context.ScriptContext(Mint)

View File

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

View File

@@ -1,11 +1,13 @@
use sample/mint
use sample/spend
pub type Datum { something: String }
pub type Datum {
something: String,
}
pub type Redeemer {
Buy
Sell
Buy { id: Int }
Sell(Int)
}
pub fn spend(datum: Datum, rdmr: Redeemer, ctx: spend.ScriptContext) -> Bool {