How do I create a new canister smart contract?

When you are doing local development, the most common way to create a canister smart contract involves creating a new project, writing the front-end and back-end code, then running the dfx deploy command to register, build, and deploy your project.

Behind the scenes, the dfx deploy command performs the following steps:

  1. Creates one or more canister identifiers for your project.
  2. Compiles one or more program files for your project into WebAssembly.
  3. Deploys the code to the local version of the Internet Computer.

If you are deploying on the network, you can use your cycles wallet to create a canister by registering a new canister identifier before writing any code. The cycles wallet can load cycles, which can then be used to create and register canisters.

For more information, check out various topics on the Internet Computer Docs or the Internet Computer Wiki.