Skip to main content

Function and keyword reference

Pact is a smart contract programming language that's specifically designed for correct, transactional execution on the Kadena blockchain network. The language includes many native, built-in functions to perform many types of common programming tasks and to perform operations that are unique to the Pact programming language. Pact also provides functions for specialized use cases. The built-in functions are grouped into several categories to make them easier to navigate.

Common operations

The built-in functions for the most common operations are grouped into the following categories:

Click a category to see a complete list of the functions in that category. Within each category, you can click individual function names to see more information, including function signatures and examples. You can also view information about built-in functions using the Pact command-line interpreter and interactive REPL. Pact provides a variety of operators for performing calculations, comparisons, and logical operations. For convenience, the most common operations and operators are listed in this overview.

Read operations

Arithmetic operators

  • +: Addition
  • -: Subtraction
  • *: Multiplication
  • /: Division
  • ^: Exponentiation

Comparison operators

  • =: Equality
  • !=: Inequality
  • <: Less than
  • <=: Less than or equal to
  • >: Greater than
  • >=: Greater than or equal to

Logical operators

  • and: Logical AND
  • or: Logical OR
  • not: Logical NOT

Bitwise operators

  • &: Bitwise AND
  • |: Bitwise OR
  • ~: Bitwise NOT
  • xor: Bitwise XOR
  • shift: Bitwise shift

Other operators

Specialized use cases

Pact includes several built-in functions that are intended for very specific use cases, such as integrating with other tools and working with zero knowledge proofs. For more information about these specialized functions, see Specialized functions.

We use cookies to enhance your experience. By continuing to browse, you consent to our use of analytics cookies.