Skip to content

Latest commit

 

History

History

hello-world

Print Hello World in Clarity

The primary intent of this example is to demonstrate printing "Hello World" within a Clarity function. The example also demonstrates both read-only and public functions, simple handling of function parameters, and throwing an error within a function.

Know your Contract

Review the hello-world.clar contract.

You can interact with this sample by commenting/uncommenting respective functions, altering the behavior, and running them through Clarinet or unit tests.

To add new contracts, follow detailed instructions at Add new Contract.

NOTE: To use this example with Clarinet inside Hiro Platform, you can open the terminal session inside VS code by navigating to File -> View -> Terminal.

Test your Contract

  • You can manually test your your contracts in the Clarinet console.
  • You can programmatically test your contracts with unit tests.