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
52 changes: 52 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior:

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

## Enforcement Responsibilities

Project maintainers are responsible for clarifying and enforcing standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies 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 project maintainers. 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),
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to Asset Tokenization Protocol

We love your input! We want to make contributing to the Asset Tokenization Protocol as easy and transparent as possible, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

## We Develop with Github

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

## Pull Requests Process

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!

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

When you submit code changes, your submissions are understood to be under the same [MIT License](LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.

## Report bugs using Github's [issue tracker]

We use GitHub issues to track public bugs. Report a bug by [opening a new issue]().

## Write bug reports with detail, background, and sample code

**Great Bug Reports** tend to have:

- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)

## Development Process

1. Clone the repository
2. Create a new branch for your feature/fix
3. Write tests for your changes
4. Implement your changes
5. Run the test suite
6. Submit a Pull Request

## Testing

We use Clarinet for testing. To run tests:

```bash
clarinet test
```

## License

By contributing, you agree that your contributions will be licensed under its MIT License.
22 changes: 12 additions & 10 deletions Clarinet.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@

[project]
name = "AssetStack"
authors = []
description = ""
telemetry = true
requirements = []
[contracts.asset-stack]
path = "contracts/asset-stack.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 Gideon

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.
111 changes: 111 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Asset Tokenization Protocol

A robust smart contract implementation for tokenizing real-world assets with fractional ownership capabilities, built on the Stacks blockchain.

## Overview

The Asset Tokenization Protocol enables the creation and management of tokenized real-world assets with features including:

- Asset creation with configurable supply and metadata
- Fractional ownership management
- Built-in compliance checks
- Secure ownership transfers
- Administrative controls
- Comprehensive event logging

## Features

- **Asset Creation**: Create new tokenized assets with customizable total supply and fractional shares
- **Fractional Ownership**: Enable partial ownership of assets through divisible shares
- **Compliance Management**: Built-in compliance checks and status management
- **Secure Transfers**: Protected ownership transfer mechanisms with validation
- **Event Tracking**: Comprehensive event logging for all major operations
- **Administrative Controls**: Secure admin functions for compliance management

## Getting Started

### Prerequisites

- [Clarinet](https://github.com/hirosystems/clarinet) for local development
- [Stacks Wallet](https://www.hiro.so/wallet) for contract interaction
- Basic understanding of Clarity smart contracts

### Installation

1. Clone the repository:

```bash
git clone https://github.com/gid-ctl/AssetStack.git
```

2. Install dependencies:

```bash
clarinet requirements
```

3. Run tests:

```bash
clarinet test
```

### Usage

#### Creating a New Asset

```clarity
(contract-call? .asset-tokenization-protocol create-asset
u1000000 ;; total supply
u1000 ;; fractional shares
"https://metadata.example.com/asset/1" ;; metadata URI
)
```

#### Transferring Shares

```clarity
(contract-call? .asset-tokenization-protocol transfer-fractional-ownership
u1 ;; asset-id
tx-sender ;; to-principal
u100 ;; amount
)
```

#### Checking Compliance Status

```clarity
(contract-call? .asset-tokenization-protocol get-compliance-details
u1 ;; asset-id
tx-sender ;; user
)
```

## Architecture

The protocol is built on several key components:

1. **Asset Registry**: Stores core asset information and configuration
2. **Share Management**: Handles fractional ownership accounting
3. **Compliance System**: Manages user compliance status
4. **Event System**: Tracks all significant protocol actions
5. **NFT Layer**: Represents primary asset ownership

## Security

- Built-in authorization checks
- Comprehensive input validation
- Protected admin functions
- Event logging for audit trails

## Contributing

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

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

For support, please open an issue in the GitHub repository or contact the maintainers.
Loading