object ErgoScriptPredef
- Alphabetic
- By Inheritance
- ErgoScriptPredef
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val FalseProp: ErgoTree
- val TrueProp: ErgoTree
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
boxCreationHeight(box: Value[SBox.type]): Value[SInt.type]
Creation height of a box
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def compileWithCosting(env: ScriptEnv, code: String, networkPrefix: NetworkPrefix)(implicit IR: IRContext): Value[SType]
-
def
emissionBoxProp(s: MonetarySettings): ErgoTree
A contract that only allows to collect emission reward by a box with miner proposition.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
expectedMinerOutScriptBytesVal(delta: Int, minerPkBytesVal: Value[SByteArray]): Value[SByteArray]
Byte array value of the serialized reward output script proposition with pk being substituted with given pk
Byte array value of the serialized reward output script proposition with pk being substituted with given pk
- delta
- number of blocks for which miner should hold this box before spending it
- minerPkBytesVal
- byte array val for pk to substitute in the reward script
-
def
feeProposition(delta: Int = 720): ErgoTree
Proposition that allows to send coins to a box which is protected by the following proposition: prove dlog of miner's public key and height is at least
delta
blocks bigger then the current one. -
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
foundationScript(s: MonetarySettings): ErgoTree
Script for Ergo foundation box.
Script for Ergo foundation box. The script allows to spend a box, if: - first transaction output contains at least EmissionRules.remainingFoundationAtHeight coins in it - first transaction output is protected by this script - conditions from the first non-mandatory register (R4) are satisfied
Thus, this script always controls the level of emission and does not allow to take more coinы than prescribed by emission rules. In addition, it is protected by custom proposition in R4 which is assumed to be a simple 2-of-3 multisignature with public keys of foundation members in the beginning. When foundation members spend this box, they are free to put any new proposition to the R4 register, thus they may add or remove members, or change it to something more complicated like
tokenThresholdScript
. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
rewardOutputScript(delta: Int, minerPk: ProveDlog): ErgoTree
Required script of the box, that collects mining rewards
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tokenThresholdScript(tokenId: Array[Byte], thresholdAmount: Long, networkPrefix: NetworkPrefix)(implicit IR: IRContext): SigmaPropValue
Proposition of the box that may be spent by a transaction which inputs contains at least
thresholdAmount
of token with idtokenId
.Proposition of the box that may be spent by a transaction which inputs contains at least
thresholdAmount
of token with idtokenId
. The logic of this script is following (v1) INPUTS.flatMap(box => box.tokens.filter(t => t._1 == tokenId).map(t => t._2)).sum >= thresholdAmount (v2) INPUTS.flatMap(box => box.tokens).filter(t => t._1 == tokenId).sum >= thresholdAmount (v3) INPUTS.map(box => box.tokens.find(t => t._1 == tokenId).map(t => t._2).getOrElse(0)).sum >= thresholdAmount -
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()