Skip to main content

Info

Each CIDL file we create must define some basic information. These pieces of information will help other developers understand what the contract is about and will help our generators.

tip

Is good CIDL development practice to define a descriptive and detailed summary. This will help your team and other developers that may consume your smart contract understand its capabilities.

Definition

info is an object through which we define the metadata of the smart contract.

cidl: 0.9
info:
name: counter
title: Counter Program
version: 0.1.0
summary: |-
Counter program that defined two methods. One for incrementing
the counter and another for decreasing it.
contact:
name: Example LLC
web: https://example.com
email: [email protected]
git: https://example.com/repo
license:
name: MIT
identifier: MIT
KeywordTypeOptionalityDescription
infoInfoBodyRequired

Info Body

The info object contains general information about the contract

KeywordTypeOptionalityDescription
namestringRequiredThe smart contract name. This name will be used to generate the smart contract and client libraries projects
titlestringRequiredThe title will be used to generate the web-based documentation for the smart contract
versionstringRequiredThe smart contract semantic version
summarystringRecommendedThe summary will be used to generate the web-based documentation for the smart contract. Supports markdown
contactContactBodyOptional
licenseLicenseBodyRequired
Contact Body

The contact object defines the owner of the CIDL and its contact information

KeywordTypeOptionalityDescription
namestringRecommendedName of the CIDL maintainer
webUrlRecommendedWebsite URL of the CIDL maintainer
emailEmailRecommendedEmail of the CIDL maintainer
gitUrlRecommendedGit URL of this CIDL repository
License Body

The license object defines the license governing this CIDL.

KeywordTypeOptionalityDescription
namestringRequiredThe license name used for the CIDL
identifierSPDXMutually exclusiveAn SPDX license expression
urlUrlMutually exclusiveA URL to the license used
info

Between identifier and url, only one is required.

Web-based documentation

The info object can be visualized in the CIDL web-based doc. The documentation is automatically generated from our vscode-codigo extension.

CIDL Web-based doc

Next steps

Is important for you to have a well-defined knowledge about data types, read about native and extended data type here. If you have already read it, continue your learning path in the following links:

Join the Código community 💚

Código is a growing community of developers. Join us on Discord and GitHub