Question
Smart contracts in Corda are defined using JVM bytecode as specified in “The Java Virtual Machine Specification SE 8 Edition” 4 , with some small differences that are described in a later section. A contract is [...]
Answer
Smart contracts in Corda are defined using JVM bytecode as specified in “The Java Virtual Machine Specification SE 8 Edition” 4 , with some small differences that are described in a later section. A contract is simply a class that implements the Contract interface, which in turn exposes a single function called verify. The verify function is passed a transaction and either throws an exception if the transaction is considered to be invalid, or returns with no result if the transaction is valid. The set of verify functions to use is the union of the contracts specified by each state