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:
| Property | Type |
|---|---|
| Recipient | User |
| Shipping address | Address |
| Tracking code | Text |
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:
- Parameters — information the user provides (e.g. the tracking code).
- Access restrictions — who is allowed to run it (e.g. only the courier).
- Payments, validation, conditions and calculations — for anything more advanced.
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.
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.