Socket
Book a DemoInstallSign in
Socket

@crunchdao/crunch-client

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@crunchdao/crunch-client

Crunch DAO SDK

Source
npmnpm
Version
0.9.6
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

CrunchDAO Protocol

CrunchDAO Protocol enables decentralised coordination for data science competitions. The platform consists of two main components:

  • Coordinator Program: Manages the registration and organization of "Crunches" (data science competitions). Coordinators can sign up to create and manage competitions on the platform.

  • Staking Program: Handles staking pools and reward emissions, allowing participants to stake tokens and earn rewards based on their contributions and performance.

The platform is built using:

  • Solana blockchain for decentralized execution
  • Anchor framework for smart contract development
  • React-based frontend for user interaction
  • CLI tools for administrative functions

Project Structure

├── .github
│   └── workflows: Contains GitHub Actions workflow configurations
├── programs: Contains the Solana programs/smart contracts
│   └── coordinator: Coordinator app to sign up coordinators and organise Crunches
│   └── staking: Staking pools and reward emissions
├── tests: Integration tests and e2e tests
├── cli: Command-line interface tools
│   ├── commands: CLI command implementations
│   └── utils: CLI utility functions
├── app: Frontend application code
│   ├── setup: Setup scripts for provisioning contracts
│   └── utils: Client side utility functions
├── accounts: Canned accounts and keys used for testing and devneet
├── scripts: Utility scripts
└── target: Build output directory

Install

Prerequisites

  • Node v18.18.0 or higher
  • Rust v1.84.0 or higher
  • Anchor CLI 0.31.0 or higher
  • Solana CLI 2.1.16 or higher
  • Add Prettier and Prettier - Code formatter (Rust) to your IDE.
  • PNPM (install instructions)

Setup

pnpm install

Running Tests

anchor test

Local debugging of js package

  • in the root dir: npm link
  • in the client root dir: npm link @crunchdao/crunch-client
  • build the js package: yarn tsup
  • start the client application
  • make changes, run 3 again
  • yarn tsup: build js dist
  • yarn changeset: create a new js client changeset

Release rust onchain coordinator program on devnet

If you want a new programId run step 2 and step 6

[!WARNING]

When deploying with a new program id, update the github secret containing the keypair of the program, PROGRAM_ADDRESS_KEYPAIR here https://github.com/crunchdao/crunchdao-protocol/settings/secrets/actions

see https://github.com/solana-developers/github-workflows/issues/2

  • create a branch/pr
sh scripts/new_coordinator_programId.sh
  • update CHANGELOG.coordinator.md
  • update version in programs/coordinator/Cargo.toml
  • merge pr
  • potentially update PROGRAM_ADDRESS_KEYPAIR github secret, see warning
  • airdrop on the the deploy keypar
solana airdrop 5 4xnqERu669swTYSTn37XU5ou44Bn9B8HrKXt2XfjcDvj

Release js package

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts