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
39 changes: 39 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 and unwelcome sexual attention
* 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

Community leaders are responsible for clarifying and enforcing our 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 community leaders responsible for enforcement at hello@injectivelabs.org. 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.
121 changes: 121 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Contributing to Injective SDK Go

Thank you for your interest in contributing to the Injective Protocol Golang SDK! We welcome contributions from the community.

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Development Setup](#development-setup)
- [How to Contribute](#how-to-contribute)
- [Pull Request Process](#pull-request-process)
- [Coding Standards](#coding-standards)

## Code of Conduct

Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md) to help maintain a welcoming and inclusive community.

## Getting Started

1. Fork the repository on GitHub
2. Clone your fork locally:
```bash
git clone git@github.com:YOUR_USERNAME/sdk-go.git
cd sdk-go
```
3. Add the upstream repository:
```bash
git remote add upstream https://github.com/InjectiveLabs/sdk-go.git
```

## Development Setup

### Prerequisites

- Go 1.21 or later
- Make
Comment on lines +35 to +36
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat go.mod | grep -E '^go\s+'

Repository: InjectiveLabs/sdk-go

Length of output: 73


Update Go version requirement to match go.mod.

The CONTRIBUTING.md states "Go 1.21 or later," but go.mod declares go 1.23.9. Update the prerequisite to "Go 1.23 or later" for accuracy.

🤖 Prompt for AI Agents
In `@CONTRIBUTING.md` around lines 35 - 36, Update the Go prerequisite in
CONTRIBUTING.md: replace the string "Go 1.21 or later" with "Go 1.23 or later"
so it matches the go directive in go.mod (which currently reads "go 1.23.9");
leave other entries (e.g., "Make") unchanged.

- Git

### Installation

```bash
go mod download
```

### Running Tests

```bash
make tests
```

### Running Linter

```bash
make lint
```

## How to Contribute

### Reporting Bugs

- Check if the bug has already been reported in [Issues](https://github.com/InjectiveLabs/sdk-go/issues)
- If not, create a new issue with a clear title and description
- Include steps to reproduce the bug
- Add relevant code samples or error messages

### Suggesting Enhancements

- Open a new issue describing your enhancement
- Explain why this enhancement would be useful
- Provide examples of how it would work

### Code Contributions

1. Create a new branch from `dev`:
```bash
git checkout -b feature/your-feature-name
```
Comment on lines +74 to +77
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Branch base likely incorrect.

The guide says to branch from dev, but this repo appears to target master. This will misdirect contributors.

✅ Suggested fix
-1. Create a new branch from `dev`:
+1. Create a new branch from `master`:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. Create a new branch from `dev`:
```bash
git checkout -b feature/your-feature-name
```
1. Create a new branch from `master`:
🤖 Prompt for AI Agents
In `@CONTRIBUTING.md` around lines 74 - 77, The CONTRIBUTING.md currently
instructs contributors to create a branch from `dev` using the example `git
checkout -b feature/your-feature-name`; update that instruction to use the
repo's actual base branch (replace `dev` with `master` or the correct default
branch name) and adjust the example branch command and any surrounding text to
consistently reference `master` (or the correct default) so contributors are
directed to the proper base branch.

2. Make your changes
3. Write or update tests as needed
4. Run tests and linter
5. Commit your changes with a descriptive message
6. Push to your fork and submit a pull request

## Pull Request Process

1. Ensure your code follows the project's coding standards
2. Update documentation if needed
3. Add tests for new functionality
4. Ensure all tests pass
5. Update the README.md if necessary
6. Request review from maintainers

### Commit Message Guidelines

- Use clear, descriptive commit messages
- Start with a verb in the present tense (e.g., "Add", "Fix", "Update")
- Reference issues when applicable (e.g., "Fix #123")

Examples:
```
feat: add new market query method
fix: resolve connection timeout issue
docs: update README with new examples
```

## Coding Standards

- Follow Go best practices and idioms
- Use `gofmt` to format your code
- Write clear comments for exported functions
- Keep functions focused and concise
- Handle errors appropriately

## Questions?

If you have questions, feel free to:
- Open an issue
- Reach out on [Twitter](https://twitter.com/InjectiveLabs)
- Visit [injective.com](https://injective.com)

Thank you for contributing! 🚀
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2020 - 2022 Injective Labs Inc. (https://injectivelabs.org/)
Copyright © 2020 - 2025 Injective Labs Inc. (https://injectivelabs.org/)

<a href="https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP"><img src="https://drive.google.com/uc?export=view&id=1-fPQRh_D_dnun2yTtSsPW5MypVBOVYJP" style="width: 300px; max-width: 100%; height: auto" />

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,11 @@ Originally released by Injective Labs Inc. under: <br />
Apache License <br />
Version 2.0, January 2004 <br />
http://www.apache.org/licenses/

---

## Contributing

We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on how to get started.

Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.