Publish Smart Contract
Although, it is not possible to compile Smart Contracts with SignumJS, it is possible to deploy them. Usually, you'll need to deploy Smart Contracts only programmatically, if you need to create many instances of the same contract. This examples shows how to deploy a contract by its reference.
Deploying Smart Contracts by reference is a very efficient way, as no redundant space in the chain is occupied, it is cheaper and more contracts per block can be deployed. This feature is unique to Signum and called Green Contracts.
For this example, we assume a ficticious contract. The crucial part is the use of the referencedTransactionHash - The hash is available inside the transaction of the first deployment of the contracts code, which should be done before using either SmartJ or SmartC. Use the explorer to get the full hash of the deployed contract.