Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 3.11 KB

File metadata and controls

66 lines (46 loc) · 3.11 KB

Labs

Chainstack is the leading suite of services connecting developers with Web3 infrastructure

         

Supported protocolsChainstack blogChainstack docsBlockchain API referenceStart for free

Create and deploy a smart contract on StarkNet

This tutorial will show you how to create a simple smart contract in Cairo to save and retrieve a variable and then deploy it on the StarkNet testnet using ProtoStar.

Cairo is a relatively new language that powers StarkNet's smart contracts; it is worth learning more about it!

In this repo you will find the project with the smart contract and the compiled files in the protostar-project directory.

See Deploy a simple storage smart contract on StarkNet for the entire tutorial.

Requirements

Quick start

To use this Protostar project:

curl -L https://raw.githubusercontent.com/software-mansion/protostar/master/install.sh | bash
  • Clone this repository.

  • Go into the Protostar project's directory:

cd protostar-project
  • Compile the smart contract
protostar build
  • Deploy the smart contract
protostar deploy ./build/main.json --network testnet

Now the smart contract is deployed and you can interact with it. See the interact with the deployed contract section of the tutorial for instructions.