Object

org.ergoplatform

ErgoScriptPredef

Related Doc: package ergoplatform

Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val FalseProp: ErgoTree

    Permalink
  5. val TrueProp: ErgoTree

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def boxCreationHeight(box: Value[SBox.type]): Value[SInt.type]

    Permalink

    Creation height of a box

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compileWithCosting(env: ScriptEnv, code: String, networkPrefix: NetworkPrefix)(implicit IR: IRContext): Value[SType]

    Permalink
  10. def emissionBoxProp(s: MonetarySettings): ErgoTree

    Permalink

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

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def expectedMinerOutScriptBytesVal(delta: Int, minerPkBytesVal: Value[SByteArray]): Value[SByteArray]

    Permalink

    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

    Permalink

    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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def foundationScript(s: MonetarySettings): ErgoTree

    Permalink

    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[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def rewardOutputScript(delta: Int, minerPk: ProveDlog): ErgoTree

    Permalink

    Required script of the box, that collects mining rewards

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def tokenThresholdScript(tokenId: Array[Byte], thresholdAmount: Long, networkPrefix: NetworkPrefix)(implicit IR: IRContext): SigmaPropValue

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped