Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes
- Focusing on what is best for the community

Examples of unacceptable behavior:

- The use of sexualized language or imagery
- Trolling, insulting or derogatory comments
- Personal or political attacks
- Public or private harassment
- Publishing others' private information
- Other conduct which could reasonably be considered inappropriate

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action.

## Scope

This Code of Conduct applies within all community spaces and when
an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement.
All complaints will be reviewed and investigated promptly and fairly.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org).
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing to StackChain

We love your input! We want to make contributing to StackChain as easy and transparent as possible.

## Development Process

We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.

1. Fork the repo and create your branch
2. If you've added code that should be tested, add tests
3. If you've changed APIs, update the documentation
4. Ensure the test suite passes
5. Make sure your code lints
6. Issue that pull request!

## Pull Request Process

1. Update the README.md with details of changes to the interface
2. Update the docs/ with any necessary changes
3. The PR will be merged once you have the sign-off of two other developers

## Security Issues

Please review our [Security Policy](SECURITY.md) for reporting security vulnerabilities.

## Any contributions you make will be under the MIT Software License

In short, when you submit code changes, your submissions are understood to be under the same [MIT License](LICENSE) that covers the project.
22 changes: 12 additions & 10 deletions Clarinet.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@

[project]
name = "StackChain"
authors = []
description = ""
telemetry = true
requirements = []
[contracts.stack-chain]
path = "contracts/stack-chain.clar"
depends_on = []

[repl]
costs_version = 2
parser_version = 2

[repl.analysis]
passes = ["check_checker"]

[repl.analysis.check_checker]
# If true, inputs are trusted after tx_sender has been checked.
strict = false
trusted_sender = false
# If true, inputs are trusted after contract-caller has been checked.
trusted_caller = false
# If true, untrusted data may be passed into a private function without a
# warning, if it gets checked inside. This check will also propagate up to the
# caller.
callee_filter = false

# [contracts.counter]
# path = "contracts/counter.clar"
# depends_on = []
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 StackChain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
84 changes: 84 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# StackChain Layer 2 Rollup

A high-performance Layer 2 rollup solution for the Stacks blockchain that enables scalable transactions with security guarantees.

## Features

- High-throughput transaction processing
- Secure state commitment system
- Challenge-response mechanism for dispute resolution
- User deposits and withdrawals
- Internal transfer capabilities
- Operator validation
- Merkle proof verification
- Balance tracking
- Comprehensive access controls

## Architecture

StackChain implements a Layer 2 rollup system with the following components:

- **Operator Management**: Trusted operators who submit state commitments
- **State Commitments**: Periodic submissions of Layer 2 state
- **Challenge System**: Mechanism to dispute invalid state transitions
- **Token Bridge**: Deposit and withdrawal functionality
- **Internal Transfers**: Efficient in-rollup token movements

## Security Features

- Operator validation and registration
- Challenge periods for dispute resolution
- Merkle proof verification for withdrawals
- Balance tracking and validation
- Comprehensive access controls
- Bond requirements for operators and challengers

## Getting Started

### Prerequisites

- Stacks blockchain environment
- Clarity contract deployment tools
- STX tokens for testing

### Deployment

1. Deploy the contract to the Stacks blockchain
2. Register initial operator(s)
3. Configure challenge parameters
4. Begin accepting deposits

### Usage

```clarity
;; Register as an operator (contract owner only)
(contract-call? .stackchain register-operator)

;; Deposit tokens
(contract-call? .stackchain deposit u1000 u1)

;; Transfer within rollup
(contract-call? .stackchain transfer-in-rollup tx-sender 'SP2J6ZY48GV1EZ5V2V5RB9MP66SW86PYKKNRV9EJ7 u100 u1)

;; Withdraw tokens
(contract-call? .stackchain withdraw u100 u1 0x...)
```

## Documentation

Detailed documentation is available in the `/docs` directory:

- [Technical Specification](docs/technical-specification.md)
- [Security Model](docs/security-model.md)

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

## Security

See [SECURITY.md](SECURITY.md) for reporting security vulnerabilities.

## License

This project is licensed under the MIT License - see [LICENSE](LICENSE) file for details.
29 changes: 29 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 1.0.x | :white_check_mark: |

## Reporting a Vulnerability

We take the security of StackChain seriously. If you believe you have found a security vulnerability, please report it to us as described below.

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them via email to saviour101sunday@gmail.com

You should receive a response within 48 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

Please include the requested information listed below to help us better understand the nature and scope of the possible issue:

- Type of issue
- Full paths of source file(s) related to the manifestation of the issue
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- Step-by-step instructions to reproduce the issue
- Proof-of-concept or exploit code (if possible)
- Impact of the issue, including how an attacker might exploit it

We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure.
Loading