StarkWager is a decentralized application (dApp) designed to leverage the StarkNet ecosystem, enabling users to place wagers on simple agreements or competitions with minimal transaction fees. This app ensures a seamless experience for users to deposit, withdraw, and interact with wagers through smart contracts.
- In-App Wallet: Users can create an in-app wallet that can be funded and used to place wagers. It can be easily funded and withdrawn from using existing wallets such as Argent and Braavos. 🚧
- Create/Join Wagers: All operations are securely handled through smart contracts. 🚧
- Invite Others: Invite other users to join a wager. 🚧
- Fair Distribution: Rewards are distributed proportionally based on the stake. 🚧
- Smart Contracts: Cairo (StarkNet's native smart contract language)
- Blockchain: StarkNet
Follow the steps below to set up, build, and test the StarkWager smart contracts locally:
The project uses scarb
as the package manager for Cairo.
asdf plugin add scarb
asdf install scarb latest
asdf global scarb latest
Installing via the installation script is the fastest way to get Scarb up and running. This method works on macOS and Linux.
- To install the latest stable release:
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh
- To install the latest nightly release:
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v nightly
- To install a specific version (e.g., preview or nightly version):
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.10.0-rc.1
Before running any scarb
commands, ensure you are in the contracts directory:
cd contracts
To build the Cairo contracts:
scarb build
The compiled contracts will be located in the target/dev
directory.
Ensure consistent code style by formatting the contracts:
scarb fmt
To run tests for the smart contracts:
scarb test
StarkWager simplifies the process of creating and participating in wagers on the blockchain. By leveraging StarkNet's low transaction costs and scalability, it provides a secure and efficient platform for users. The core functionality includes an in-app wallet that can be easily funded and withdrawn from using existing wallets like Argent and Braavos.