object VersionContext extends Serializable
- Alphabetic
- By Inheritance
- VersionContext
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 JitActivationVersion: Byte
The first version of ErgoTree starting from which the JIT costing interpreter is used.
- val MaxSupportedScriptVersion: Byte
Maximum version of ErgoTree supported by this interpreter release.
Maximum version of ErgoTree supported by this interpreter release. See version bits in
ErgoTree.header
for more details. This value should be increased with each new protocol update via soft-fork. The following values are used for current and upcoming forks: - version 3.x this value must be 0 - in v4.0 must be 1 - in v5.x must be 2 etc. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkVersions(activatedVersion: Byte, ergoTreeVersion: Byte): Unit
Checks the version context has the given versions
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def current: VersionContext
Returns the current VersionContext attached to the current thread.
Returns the current VersionContext attached to the current thread. Each thread can have only one current version context at any time, which can be changed using
withVersions
method.- See also
withVersions()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withVersions[T](activatedVersion: Byte, ergoTreeVersion: Byte)(block: => T): T
Executes the given block under the given version context attached to the current thread.
Executes the given block under the given version context attached to the current thread.
The typical usage is to use
VersionContext.withVersions(activatedVersion, treeVersion) {...}
when the block of code needs to be executed with the given versions.For example, sigmastate.Interpreter uses it to execute operations according to the necessary versions of Ergo protocol and ErgoTree.
- activatedVersion
Currently activated script version == Block.headerVersion - 1
- ergoTreeVersion
ErgoTree version to be set on the current thread
- block
block of code to execute
- returns
result of block execution