Signum is shipped with smart contracts implemented as Automated Transactions (AT). This system, originally developed by CIYAM, is Turing-complete and has an infinite number of use cases. Signum was the first platform to run Turing-complete smart contracts on a public blockchain. The second unique feature of Signum's smart contracts is that they can be programmed to self-execute. Most of today’s available smart contracts only react to the transactions they receive. Signum’s self-running smart contracts provide endless potential for new applications such as for example decentralized trustless lotteries that need to run at a specific time.
If a smart contract gets deployed to the Signum chain the following parameters apply:
Maximum pages for code & data
Cost per page
Maximum steps per block
The smart contract is stored in bytecode on the chain, but the programming will happen in Java via .No extra code language to learn - just code in Java.
With the AT Creation transaction type the smart contract gets uploaded to the Signum chain. Example smart contract creation transaction:
With the creation of a SmartContract the machineData and machineCode is saved to the Signum blockchain.
With introduction of the SIP-30 the machineCode can be loaded from an existing contract by reference over the fullhash of the reference transaction. This has two big advantages: firstly it can be ensured that the smart contract is using the exact same logic as copied from the parent and secondly no extra space is needed on the chain to store the code a second time or x times, as the smart contract is referencing to the code in the reference-transaction.