Skip to content
SmartPySmartPySmartPy
Main NavigationManualGuidesReleasesIDE
Twitter

Appearance

Twitter
Sidebar Navigation

๐Ÿš€ Getting started

Overview

Project management

Expressions

Entrypoints

Contracts

Types

Meta-programming

Constants vs expressions

General

Typing

Variables

Control statements

Checking condition

Raising exceptions

Global properties

Code inlining

Flags

Importing code

Views

Types and operations

BLS12-381

Booleans

Bytes

Chain id

Comparison operators

Contracts and addresses

Events

Integers

Keys

Lambdas

Lists

Maps and big maps

Mutez

Never

Operations and transactions

Options

Pairs

Records

Sets

Signatures

Strings

Tickets

Timestamps

Unit

Variants

Voting power

Other operations

Bounded types

Hashing functions

Pack and unpack

Returning and binding data

Sapling integration

Tests and scenarios

Overview

Testing contracts

Mutation testing

Custom targets

Simulation targets

Cryptography

Helpers

Metadata builder

Utils

Debugging contracts

Compilation targets

> CLI

๐Ÿงช Experimental features

Global constants

Michelson code inlining

Timelock

On this page
Table of Contents for current page

Unit โ€‹

The type of unit values in SmartPy is sp.TUnit.

The corresponding type in Michelson is

Michelson unit.

It is the return type of commands and the input types of entrypoints with empty parameters.

sp.unit
The unique value of type sp.TUnit.

Example โ€‹

python
unitValue = sp.unit
Michelson UNIT
Previous pageTimestamps
Next pageVariants

Copyright 2022-2023 Morum LLC
Copyright 2019-2022 Smart Chain Arena LLC