Migrate to Latest Version
Starknet.js LogoStarknet.js Logo
Home
APIGuides
9.2.1
  • Next
  • 9.2.1
  • 8.6.0
  • 7.6.4
  • 6.24.1
GitHub
  • API
  • Guides
    • Why Starknet JS
    • Getting Started
    • Configuration
    • Provider
    • Account
    • Contracts
      • Deploy
      • Contract Instance
      • Interact with your contract
      • Data types
      • Enum type
      • ERC20 tokens
      • TypeScript Integration with Cairo ABIs
      • Interact with Multiple Contracts
      • Messages L1 - L2
      • Events
    • WebSocket Channel
    • Migrate from v8 to v9
  • Guides
  • Contracts
Version: 9.2.1

Contracts

Learn how to interact with smart contracts on Starknet using Starknet.js

📄️ Deploy

Overview

📄️ Contract Instance

This guide explains how to connect to and interact with smart contracts on Starknet using Starknet.js.

📄️ Interact with your contract

Once your contract is connected (see Contract Instance guide), you can interact with it:

📄️ Data types

This guide is the most important of all this documentation. Take your time, and read it carefully...

📄️ Enum type

Cairo Enums usage

📄️ ERC20 tokens

Based on what has been seen in the previous pages of this guide, we will use an ERC20 contract.

📄️ TypeScript Integration with Cairo ABIs

Starknet.js provides seamless TypeScript integration for Cairo smart contracts through Abi-Wan-Kanabi. This powerful feature enables:

📄️ Interact with Multiple Contracts

Interacting with more than one contract with one transaction is one of Starknet's features. To use this feature, two contracts are required.

📄️ Messages L1 - L2

This guide explains how to handle communication between Ethereum (Layer 1) and Starknet (Layer 2) using Starknet.js. Messages can be exchanged between:

📄️ Events

A contract may emit events throughout its execution. Each event contains the following fields:

Docs
  • API
  • Guides
  • Migrate to v9
Community
  • Twitter
  • Discord
More
  • GitHub
Copyright © 2025 StarkWare