Skip to main content

Build a contract from scratch

Sometimes you want full control — or you simply want to understand exactly what you're shipping. Building a workflow by hand is straightforward, and it's the best way to learn how Toolblox thinks. In this guide we build a simple parcel delivery workflow from an empty canvas.

The seven steps

Every workflow moves through the same seven steps, shown as a progress bar across the top of the editor:

You mostly work in the first four — Details → Asset → Build → Test — and then Publish (deploy). Audit is an optional security review and Summary is a final overview.

Step 1 — Details

On the home screen open the New… menu and choose Smart-contract, then Use wizard instead to start from an empty workflow. In the Details step give your workflow a name ("Parcel delivery"), an optional description and some tags. Toolblox reserves a public web address for it automatically.

Step 2 — Asset

Define the thing the workflow tracks. Name the asset Parcel and give it a 3-letter symbol such as PCL. Then add its properties — the data each parcel carries:

PropertyType
RecipientUser
Shipping addressAddress
Tracking codeText

See Items for every available property type and what each one does.

Step 3 — Build

This is where you draw the lifecycle in the visual editor. Add the states a parcel passes through, then draw the transitions that move it along:

For each transition you can add inputs and rules:

Reorder states

Use the move buttons on a state to change its position until the flow reads naturally from left to right.

Step 4 — Test

Click Test. Toolblox validates the workflow and flags anything that needs attention before you can deploy. Fix any warnings — a common one is a transition that hasn't been given proper access restrictions.

Step 5 — Deploy

When Test passes you're ready to go live. Continue to Deploy your smart contract to pick a network and deploy — free on a testnet to start.

tip

Not sure where to begin? Let AI draft the first version for you with Create with AI, then come back here to understand and adjust each piece.