This DFINITY Canister Software Development Kit (SDK) provides tools, sample code, and documentation to help you create canister smart contract dapps and deploy them on the Internet Computer blockchain mainnet. The Quick Start tutorial assumes that you are installing the DFINITY Canister SDK for the first time and illustrates how to create, build, and deploy your first dapp.
To keep the instructions simple and focused on the task at hand, the Quick start is split into two scenarios:
In the Local development scenario, you create and deploy the sample dapp with processes that run in a local canister execution environment.
In the On-chain deployment scenario, you create the sample dapp locally but connect to the Internet Computer blockchain running on node machines in independent data centers and deploy the dapp there.
If you need some help setting up your development environment—for example, if you aren’t sure how to open a new terminal, install packages, or create folders and navigate between directories—you might want to start with the Preliminary steps for newcomers.
Both scenarios build and deploy a simple Hello canister smart contract that has just one function—called
greet function accepts one text argument and returns the result with a greeting similar to Hello, everyone! in a terminal if you run the canister using the command-line or in an alert pop-up window if you access the dapp in a browser.
The default dapp consists of back-end code written in Motoko, a programming language specifically designed for interacting with the Internet Computer, and a simple webpack-based front-end.
As discussed in Tokens and cycles, cycles are required to power canister smart contract operations for dapps running on the Internet Computer blockchain. As a developer, you have a few different options for acquiring and managing cycles for your dapps:
Purchase or claim ICP tokens through an exchange that lists ICP tokens available for trade, then convert your tokens to cycles using the DFINITY Canister SDK command-line interface or the Network Nervous System application.
Register for cycles by signing up for an account or cycles wallet through a provider offering those services.
Because only canisters require and consume cycles—to perform operations and to pay for the resources they use—cycles are always transferred between canisters and not to users or developers. You can manage the distribution of cycles, however, through a cycles wallet created for you or using a similar dapp.
If you are looking for more information before getting started or want to view a demonstration of how to deploy before you try it for yourself, check out the following related resources: