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: