Supercontracts
Supercontracts are advanced blockchain-based contracts stored on drives, capable of executing specific functions automatically or upon certain triggers. These contracts utilize virtual machines for execution, where each has its own set of executors, varying with the number of replicators on the storage layer. Super contracts can interact with the internet, download data, and release transactions based on their code logic. The execution process involves multiple parties: the drive owner who deploys the super contract, replicators (executors) who execute the contract, and harvesters who manage financial transactions. Super contracts can also auto-execute based on predefined conditions, enhancing their functionality. Supercontract is a file generated by Supercontract SDK that contains a user algorithm which should be executed by executors. Every new SC is a new multisig account created by the client while deploying a new SC. All executors perform SC operations on VM.
Function (func) - some function that is contained in a SC and invoked by name.
Operation is called any one action. A function can consist of many operations. For example, one function can include two operations: create a file and move it to some dir.
Every "super file" is uploaded by the ordinary way on an earlier created Drive and stored by Storage Replicator Nodes as an ordinary file. The main difference is that the file must have the *.wat extension. When SC starts all Storage Replicator Nodes become executors. Each of them has a virtual machine (VM) that executes the SCs. Every SC should be attached to the Drive where it is stored and where it is executed.