The repository consists of two parts:
This repository uses asdf
for managing tool versions. Ensure you have asdf
installed before proceeding.
The following tools and versions are required:
Clone the repository:
git clone https://github.com/KapiSolutions/starknet-test.git
cd starknet-test
Install dependencies using asdf
:
asdf install
Build the project:
scarb build
Run tests:
scarb test
To demonstrate the functionality, follow these steps:
Start a local Starknet development environment:
starknet-devnet --seed 0
Declare and deploy contracts:
sncast declare --contract-name Counter
sncast deploy --class-hash <hash> --constructor-calldata <calldata>
Perform operations:
sncast call --contract-address <address> --function get_counter
sncast invoke --contract-address <address> --function increase_counter
sncast invoke --contract-address <address> --function decrease_counter
sncast invoke --contract-address <address> --function set_counter --calldata <calldata>
sncast invoke --contract-address <address> --function reset_counter
Ensure you have Node.js
installed and pnpm
or npm
(or any other similiar package manager) installed before proceeding.
Open terminal in web
directory:
cd web
Install dependencies using pnpm
or npm
:
pnpm install
or
npm install
Start dev:
pnpm dev
or
npm run dev