๐งช An open-source, up-to-date toolkit for building decentralized applications (dapps) on Starknet blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
โ๏ธ Built using NextJS, Starknet.js, Scarb, Starknet-React, Starknet Foundry and Typescript.
Before you begin, you need to install the following tools:
To ensure the proper functioning of scaffold-stark, your local starknet-devnet
version must be 0.0.4
. To accomplish this, first check your local starknet-devnet version:
starknet-devnet --version
If your local starknet-devnet version is not 0.0.4
, you need to install it.
cargo install starknet-devnet --version 0.0.4
To ensure the proper functioning of scaffold-stark, your local Scarb
version must be 2.6.5
. To accomplish this, first check your local Scarb version:
scarb --version
If your local Scarb version is not 2.6.5
, you need to install it.
2.6.5
via asdf
(instructions).To ensure the proper functioning of the tests on scaffold-stark, your Starknet Foundry version must be 0.27.0. To accomplish this, first check your Starknet Foundry version:
snforge --version
If your Starknet Foundry version is not 0.27.0
, you need to install it.
0.27.0
via asdf
(instructions).To get started with Scaffold-Stark, follow the steps below:
git clone https://github.com/Scaffold-Stark/scaffold-stark-2.git
cd scaffold-stark-2
yarn install
yarn chain
This command starts a local Starknet network using Devnet. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in scaffold.config.ts
for your nextjs app.
yarn deploy
This command deploys a sample smart contract to the local network. The contract is located in packages/snfoundry/contracts/src
and can be modified to suit your needs. The yarn deploy
command uses the deploy script located in packages/snfoundry/scripts-ts/deploy.ts
to deploy the contract to the network. You can also customize the deploy script.
By default Scaffold-Stark
takes the first prefunded account from starknet-devnet
as a deployer address,
yarn start
Visit your app on: http://localhost:3000
. You can interact with your smart contract using the Debug Contracts
page. You can tweak the app config in packages/nextjs/scaffold.config.ts
.
YourContract.cairo
in packages/snfoundry/contracts/src
packages/nextjs/app/page.tsx
. For guidance on routing and configuring pages/layouts checkout the Next.js documentation.packages/snfoundry/script-ts/deploy.ts
packages/snfoundry/contracts/src/test
. To run tests use yarn test
Visit our docs to learn how to start building with Scaffold-Stark.
To know more about its features, check out our website
We welcome contributions to Scaffold-Stark!
Please see CONTRIBUTING.MD for more information and guidelines for contributing to Scaffold-Stark.