Skip to main content

Create a smart contract template

Follow these steps to create a smart contract template using MARCO Console.

Before you begin

Before you start, you must have:

1. Register the smart contract template

To register the smart contract template:

  1. Open MARCO Console.
  2. On the left sidebar, go to Smart Contracts Templates > Create Template.
  3. Enter the smart contract template name and a description. Smart contract template
  4. Click on Create Template.

The smart contract template is registered on MARCO. Now, you can add a specification to the smart contract template.

2. Add a specification

To add a specification to a smart contract template:

  1. On the left sidebar, go to Smart Contracts > Templates > List template.

  2. Select the smart contract template you want to add a specification to. Smart contract instance

  3. Click Add Specification. Smart contract template

  4. Enter the specification details: Smart contract template

    • Tag: The version of the smart contract specification using semantic versioning. Choose a version in the format MAJOR.MINOR.PATCH to avoid errors.
    • Compilation language: The programming language used to write the smart contract specification.
    • Description: A description of the smart contract specification.
  5. Next to the Select your file label, click Upload source code and select the smart contract specification compressed in ZIP format.

    info

    To learn more about the smart contract specification format, see Smart contracts templates.

  6. Click Create Specification.

  7. Wait for the smart contract specification to be Compiled.

    The compilation process can take a few minutes, and you need to refresh the page to see the updated status.

    Smart contract template

Next steps

Now that you have deployed a smart contract template, you can deploy a smart contract instance to a ledger.