o

org.ergoplatform

ErgoScriptPredef

object ErgoScriptPredef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErgoScriptPredef
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val FalseProp: ErgoTree
  5. val TrueProp: ErgoTree
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def boxCreationHeight(box: Value[SBox.type]): Value[SInt.type]

    Creation height of a box

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def compileWithCosting(env: ScriptEnv, code: String, networkPrefix: NetworkPrefix)(implicit IR: IRContext): Value[SType]
  10. def emissionBoxProp(s: MonetarySettings): ErgoTree

    A contract that only allows to collect emission reward by a box with miner proposition.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. 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

  14. 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.

  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. 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.

  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def rewardOutputScript(delta: Int, minerPk: ProveDlog): ErgoTree

    Required script of the box, that collects mining rewards

  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. 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 id tokenId.

    Proposition of the box that may be spent by a transaction which inputs contains at least thresholdAmount of token with id tokenId. 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

  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped