fix: constr issue
- also fixed constant parsing - added new cbor flag to eval Co-authored-by: rvcas <x@rvcas.dev>
This commit is contained in:
@@ -1,49 +1,7 @@
|
||||
pub type Signer {
|
||||
hash: ByteArray,
|
||||
}
|
||||
|
||||
pub type ScriptContext {
|
||||
signer: Signer,
|
||||
}
|
||||
|
||||
pub type Redeem {
|
||||
Buy { tipo: ByteArray, fin: Int }
|
||||
Sell { twice: ByteArray, find: Int }
|
||||
Hold(Int)
|
||||
pub type Redeemer {
|
||||
signer: ByteArray,
|
||||
}
|
||||
|
||||
pub type Datum {
|
||||
fin: Int,
|
||||
sc: ScriptContext,
|
||||
rdmr: Redeem,
|
||||
random: ByteArray,
|
||||
}
|
||||
|
||||
pub fn eqIntPlusOne(a: Int, b: Int) {
|
||||
a + 1 == b
|
||||
}
|
||||
|
||||
pub fn eqString(a: ByteArray, b: ByteArray) {
|
||||
a == b
|
||||
}
|
||||
|
||||
pub type Thing {
|
||||
Some
|
||||
None
|
||||
}
|
||||
|
||||
pub type Other {
|
||||
Wow
|
||||
Yes
|
||||
}
|
||||
|
||||
pub fn incrementor(counter: Int, target: Int) -> Int {
|
||||
if counter == target {
|
||||
counter
|
||||
} else if counter > target {
|
||||
counter - target
|
||||
} else {
|
||||
incrementor(counter + 1, target)
|
||||
}
|
||||
}
|
||||
|
||||
pub const big_a = 5
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
pub type ScriptContext(purpose) {
|
||||
tx_info: TxInfo,
|
||||
script_purpose: purpose,
|
||||
}
|
||||
|
||||
pub type TxInfo {
|
||||
idk: Int,
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
use sample/context
|
||||
|
||||
pub type Mint {
|
||||
currency_symbol: ByteArray,
|
||||
}
|
||||
|
||||
pub type ScriptContext =
|
||||
context.ScriptContext(Mint)
|
||||
@@ -1,8 +0,0 @@
|
||||
use sample/context
|
||||
|
||||
pub type Spend {
|
||||
idk: Int,
|
||||
}
|
||||
|
||||
pub type ScriptContext =
|
||||
context.ScriptContext(Spend)
|
||||
Reference in New Issue
Block a user