Skip to content

Pulsefy/starkpulse-contract

Repository files navigation

StarkPulse Contract ⚡🔒

StarkPulse is a cutting-edge, decentralized crypto news aggregator and portfolio management platform built on the StarkNet ecosystem. This repository contains the smart contract code that powers the StarkPulse platform.

Overview

The StarkPulse contract provides the backbone for secure user authentication, portfolio tracking, transaction monitoring, and decentralized data management. Built with Cairo, it leverages StarkNet's scalability and security to deliver a robust foundation for the StarkPulse ecosystem.

Key Features

  • Secure User Authentication 🔐: Robust user management with password hashing and session control
  • Portfolio Tracking System 📊: Track and manage crypto assets with real-time updates
  • Transaction Monitoring 🔍: Comprehensive transaction history and status tracking
  • Notification Management 📱: Real-time alerts for important portfolio events
  • Access Control System 🛡️: Fine-grained permissions and security controls
  • Contract Interaction Utilities 🔄: Seamless integration with other StarkNet contracts

Tech Stack

  • Cairo 2.x: StarkNet's secure smart contract language
  • Scarb: Package manager for Cairo projects
  • StarkNet: Layer 2 scaling solution for Ethereum

Project Structure

contracts/
 ├── src/
 │   ├── auth/ - User authentication and session management
 │   ├── portfolio/ - Portfolio tracking and asset management
 │   ├── transactions/ - Transaction monitoring and notifications
 │   ├── utils/ - Utility functions and access control
 │   └── interfaces/ - Contract interfaces
 ├── tests/ - Test files for all modules
 ├── scripts/ - Deployment and verification scripts
 ├── deployments/ - Deployment addresses for different networks
 ├── abis/ - Contract ABIs
 ├── Scarb.toml - Project configuration
 └── README.md - Project documentation

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/Pulsefy/starkpulse-contract.git
cd starkpulse-contract
  1. Build the contracts:
scarb build
  1. Run tests:
scarb test

Deployment

Use the deployment scripts in the scripts/ directory:

./scripts/deploy.sh

Connecting to Frontend

This contract repository powers the StarkPulse frontend application. See the frontend repository for integration details and setup instructions.

Contributing

We welcome contributions to StarkPulse! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add some amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Maintainers

  • Divineifed1 👨‍💻
  • Cedarich 👨‍💻

Built with ❤️ by the StarkPulse Team

Simulation & Scenario Testing Utilities

The StarkPulse contract suite includes advanced simulation tools for pre-deployment testing and contract interaction analysis. These utilities are located in contracts/src/simulation/ and provide:

  • Transaction Simulation: Emulate contract calls and predict outcomes before actual execution.
  • State Manipulation: Take and restore contract state snapshots, or set state for testing.
  • Scenario Orchestration: Define and run sequences of contract interactions to validate complex workflows.
  • Result Analysis & Reporting: Capture events, estimate gas, and generate detailed simulation reports.

Usage Example

  1. Simulate a Transaction

    • Use simulate_transaction_full from transaction_simulator.cairo to emulate a contract call and get a detailed report.
  2. Manipulate State

    • Use state_manipulator.cairo to snapshot, restore, or set contract state for comprehensive scenario coverage.
  3. Run a Scenario

    • Use scenario_runner.cairo to define a sequence of contract calls and analyze the results for all steps.
  4. View Reports

    • Simulation reports include transaction results, events, and gas usage for easy debugging and optimization.

See the contracts/src/simulation/ directory and test files for more detailed examples and integration patterns.

About

StarkPulse is a pioneering decentralized platform that delivers a reliable and comprehensive source of crypto news, trends, and insights. By harnessing the scalability, security, and decentralization of StarkNet, StarkPulse curates news from trusted sources, promotes active community participation, and rewards valuable content contributions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors