Smart Contract
A contract is a collection of code (its functions) and data (its state) which resides at a specific address on CuriumVerse. Contracts are stored on the blockchain in a Java bytecode. But the state of Smart Contract is stored separately in the binary representation. It allows skipping contract execution on nodes which are not Active Delegates, such a principle helps to increase the efficiency of the entire network. The code of a smart contract is loaded and executed in a Java Virtual Machine (JVM). The usage of a JVM makes it possible to write contracts in any JVM language: Java, Clojure, Groovy, Kotlin, Scala etc. Nevertheless, the number of classes and methods allowed to be used in smart contracts is limited to primitives, arrays, ArrayList, HashSet, HashMap and StrictMath. Executing of a contract code is a part of the block validation process. It means that if a transaction is added into block B the code execution spawned by that transaction will be executed by all Active Delegates which have a right to validate block B.
Last updated