
- About
- Disclaimer
- Dependencies
- Installation
- Implementation specification
- Getting help
- Help make Staking better!
- Contributing
- Security
This repo holds the implementation of Staknet's staking mechanism.
Following Starknet SNIP 18.
Staking is a work in progress.
The project is build with Turbo repo and pnpm.
Turbo's installation process will also install the cairo dependencies such as Scarb and Starknet foundry.
Clone the repo and from within the projects root folder run:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install 20
curl -fsSL https://get.pnpm.io/install.sh | sh -
pnpm install turbo --global
pnpm install
Specs document found here
To ensure that the on-chain class hash corresponds to the code in this repository, follow these steps:
- 🔧 Environment Requirements
- scarb version:
scarb --version
->2.11.2
- if not, install scarb:
asdf install scarb 2.11.2
asdf global scarb 2.11.2
- starkli version:
starkli --version
->0.4.1
- scarb version:
- 🔍 Verification Steps
- Checkout the Correct Code Version
- Make sure you're on the exact Git commit or tag used for deployment:
git checkout <commit-hash-or-tag>
- commit_hash:
06d2fffb288937ed76d58165debe46f1796273c1
- tag:
@staking/contracts-v1.0.1-dev.510
- Make sure you're on the exact Git commit or tag used for deployment:
- Build the Contract
- Use Scarb to compile the contract:
scarb build
- Use Scarb to compile the contract:
- Compute the Local Class Hash
- Use Starkli to calculate the class hash from the compiled contract:
starkli class-hash target/dev/staking_X.contract_class.json
- where
X
is the name of the contract (e.g.Staking
,Attestation
)
- Use Starkli to calculate the class hash from the compiled contract:
- Compare with On-Chain Class Hash
- Checkout the Correct Code Version
Reach out to the maintainer at any of the following:
- GitHub Discussions
- Contact options listed on this GitHub profile
If you want to say thank you or support the active development of Starknet Staking:
- Add a GitHub Star to the project.
- Tweet about Starknet Staking.
- Write interesting articles about the project on Dev.to, Medium, or your personal blog.
Thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make benefit everybody else and are greatly appreciated.
Please read our contribution guidelines, and thank you for being involved!
Starknet Staking follows good practices of security, but 100% security cannot be assured. Starknet Staking is provided "as is" without any warranty. Use at your own risk.
For more information and to report security issues, please refer to our security documentation.