Skip to main content

Develop a blueprint

Introduction

This article is the pathway for developers creating blueprints — the smart contract models that power nano contracts on Hathor.

By the end of this pathway you will have the resources to design, implement, test, and deploy a blueprint on Hathor Network, using the Python v3.11 blueprint SDK.

info

You must develop your blueprint using Python 3.11. Support for other Python versions and additional programming languages may be added in the future.

Prerequisites

  • Python 3.11 installed locally.
  • Familiarity with Python development and unit testing.
  • A basic understanding of nano contracts. If you are new to this, start with Everything about nano contracts.

Understand

Before you start developing your blueprints, you need to understand nano contracts. See:

Implement

Test

The blueprint SDK is embedded in Hathor core, so testing your blueprint requires a local Hathor core installation. Start by installing Hathor core from source code — this gives you the hathor-cli and the full test runner environment.

Once installed, the SDK provides a testing framework that lets you write unit tests against your blueprint methods without deploying to a live network. For the full testing API and examples, see:

  • Blueprint SDK — tests: all testing utilities provided by the SDK, including how to set up a test environment, invoke methods, and assert contract state.

Deploy

Examples

Blueprint 'Bet' is provided as a complete example (source code, tests, and documentation):