Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add CONTRIBUTING and SUPPORT files #815

Merged
merged 8 commits into from
May 15, 2024
Merged
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
86 changes: 86 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Contributing Guidelines

First off, **thank you** for considering contributing to this project!

## Table of contents

- [I Have a Question](#i-have-a-question)
- [I Want to Contribute](#i-want-to-contribute)

## <a name="i-have-a-question">I Have a Question</a>

See our [support guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md). **Do not** use GitHub issues for general support or questions.

## <a name="i-want-to-contribute">I Want to Contribute</a>
### Legal Notice
You will need to agree to [our CLA](https://safe.global/cla) in order to be possible to consider your contribution.
yagopv marked this conversation as resolved.
Show resolved Hide resolved

### Starting Guide

By following the steps bellow you will understand the development process and worflow.
1. [Forking the repository](#forking-the-repository)
2. [Installing Node and Yarn](#installing-node-and-yarn)
3. [Installing dependencies](#installing-dependencies)
4. [Running the tests](#running-the-tests)
5. [Using the playground](#using-the-playground)
6. [Submitting a pull request](#submitting-a-pull-request)

#### Forking the repository

The first step would be to [fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#forking-a-repository). This will allow you to get a current copy of the repository state. Follow the steps to also clone your forked repository locally.

For active development we use the `development` branch. Our `main` branch contains only the currently published code. All new branches should be created from `development`.

#### Installing Node and Yarn

The Safe{Core} SDK uses [Node](https://nodejs.org) as development environment and Yarn to manage the dependencies. You will need to make sure you are using the [latest Node LTS version](https://nodejs.org/en/about/previous-releases) and that you have available Yarn v1.

You can check which versions you are using with:

```bash
node -v
yarn -v
```

#### Installing dependencies

The Safe{Core} SDK uses a mono-repository structure managed by [Yarn Workspaces](https://classic.yarnpkg.com/lang/en/docs/workspaces/) and [Lerna](https://lerna.js.org). From the root of the repository you will need to install the whole dependency stack and do the project build. Some packages depend on each other, so even when modifiying only one package it's better to run the full build.

Install all dependencies and build the whole project by using the following commands at the project root.

```bash
yarn install
yarn build
```

#### Running the tests

There is already a test script that can be launched from the root of the repository and will use [Lerna](https://lerna.js.org) to run all the tests from all the packages.

```bash
yarn test
```

If you would like to test individual packages, **once you make sure you did the build from the root**, you can:

```bash
yarn test --scope=<package-name>
yarn test --scope=@safe-global/protocol-kit
yarn test --scope=@safe-global/api-kit
```

For some packages you may need to fill a .env file with some configuration. In those packages you will be able to find a `.env.example` file specifying the necessary parameters.

#### Using the playground

You can use the playground section to do some manual testing using a specific Safe or configuration. The playground can be run from the root of the project as follow:

```bash
yarn play <playground-command>
```

You can find more information about the available commands [in the specific section.](https://github.com/safe-global/safe-core-sdk/tree/main/playground)

#### Submitting a pull request

From the forked repository you can [open a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) to the original repository. Make sure to select the `safe-global:development` branch as the target branch.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021-2023 Safe Ecosystem Foundation
Copyright (c) 2021-2024 Safe Ecosystem Foundation

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:

Expand Down
39 changes: 34 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,30 @@

![Safe_Logos_Core_SDK_Black](https://github.com/safe-global/safe-core-sdk/assets/6764315/7202a24a-2981-4b31-9cf5-ace1c3b2c4fa)

Software developer tools that facilitate the interaction with the Safe [contracts](https://github.com/safe-global/safe-contracts) and [services](https://github.com/safe-global/safe-transaction-service).
## Table of contents

- [About](#about)
- [Documentation](#documentation)
- [Guides](#guides)
- [Packages](#packages)
- [Need Help or Have Questions?](#need-help-or-have-questions)
- [Contributing](#contributing)
- [Playground](#playground)
- [License](#license)

## About

This is a mono-repository containing Javascript software developer tools that facilitate the interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) and [services](https://github.com/safe-global/safe-transaction-service).

## Documentation

Visit [our documentation site](https://docs.safe.global/sdk/overview) to start developing using our SDK.

## Guides

| Title | Description |
| ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Integrating the Safe Core SDK](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md) | This guide shows how to use the [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) and [API Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/api-kit). |
| [Integrating the Safe{Core} SDK](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md) | This guide shows how to use the [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) and [API Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/api-kit). |

## Packages

Expand All @@ -17,10 +34,22 @@ Software developer tools that facilitate the interaction with the Safe [contract
| [api-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/api-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fapi-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fapi-kit) | [Safe Transaction Service API](https://github.com/safe-global/safe-transaction-service) client library |
| [auth-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/auth-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fauth-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fauth-kit) | Typescript library to create an Ethereum address and authenticating a blockchain account using an email address, social media account, or traditional crypto wallets like Metamask |
| [onramp-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/onramp-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fonramp-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fonramp-kit) | Typescript library that allows users to buy cryptocurrencies using a credit card and other payment options |
| [protocol-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit) | TypeScript library that facilitates the interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts) |
| [relay-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/relay-kit) | ​​​[​![NPM Version](https://badge.fury.io/js/%40safe-global%2Frelay-kit.svg)​](https://badge.fury.io/js/%40safe-global%2Frelay-kit)​ | Library to abstract transaction fees payment (gas fees), allowing the use of native tokens or ERC-20​​ |
| [protocol-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit.svg)](https://badge.fury.io/js/%40safe-global%2Fprotocol-kit) | TypeScript library that facilitates the interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) |
| [relay-kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/relay-kit) | ​​​[​![NPM Version](https://badge.fury.io/js/%40safe-global%2Frelay-kit.svg)​](https://badge.fury.io/js/%40safe-global%2Frelay-kit)​ | Library that lets users to pay transaction fees (gas fees) using the native blockchain token or ERC-20 tokens.​This kit enables the use of ERC-4337 with Safe |
| [safe-core-sdk-types](https://github.com/safe-global/safe-core-sdk/tree/main/packages/safe-core-sdk-types) | [![NPM Version](https://badge.fury.io/js/%40safe-global%2Fsafe-core-sdk-types.svg)](https://badge.fury.io/js/%40safe-global%2Fsafe-core-sdk-types) | Common types extracted from the [Safe Core SDK](https://github.com/safe-global/safe-core-sdk/tree/main/packages) packages |

## Need Help or Have Questions?

If you have any doubts, questions, or need assistance, feel free to reach out! [Here you will find how to get support.](https://github.com/safe-global/safe-core-sdk/tree/main/SUPPORT.md)

## Contributing

If you are interested in contributing, please read the [Contributing Guidelines](https://github.com/safe-global/safe-core-sdk/tree/main/CONTRIBUTING.md) **before opening an issue or submitting a pull request**.

## Playground

This project includes a [playground](https://github.com/safe-global/safe-core-sdk/tree/main/playground/README.md) with a few scripts that can be used as a starting point to use the Safe Core SDK.
This project includes a [playground](https://github.com/safe-global/safe-core-sdk/tree/main/playground/README.md) with a few scripts that can be used as a starting point to use the Safe{Core} SDK.

## License

This library is released under [MIT](https://github.com/safe-global/safe-core-sdk/tree/main/LICENSE.md).
23 changes: 23 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Support Guidelines

We appreciate your interest in our project. If you have questions, need help, or encounter issues, please follow these guidelines:

1. **GitHub Issues**: **Do not** use GitHub issues for general support or questions. Issues are primarily for bug reports, feature requests, and discussions related to code changes.

2. **Stack Exchange**: For support-related questions, we recommend using [Stack Exchange with the appropriate tags](https://ethereum.stackexchange.com/questions/tagged/safe-core). The **safe-core** tag should always be included. Many community members and experts monitor Stack Exchange and can provide timely assistance.

3. **Search First**: Before posting a new question, search existing issues and Stack Exchange to see if your question has already been answered. You might find a solution without waiting for a response.

4. **Be Specific**: When asking for help, provide as much context as possible. Include relevant details such as error messages, steps to reproduce, testing addresses, and the version of our project packages you're using.

5. **Be Respectful**: Treat others with kindness and respect. We're all here to learn and help each other.

## Getting Help

If you need assistance, follow these steps:

1. **Documentation**: Refer to our [project's documentation](https://docs.safe.global/sdk/overview) for usage instructions, FAQs, and troubleshooting tips.

2. **Stack Exchange**: Search for existing answers or ask a new question on Stack Exchange. Use relevant tags as **safe-core**.

Remember that GitHub issues are not the right place for general support. Let's keep our issue tracker focused on improving the project! 😊
6 changes: 3 additions & 3 deletions guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Read about the basics of Safe and how it compares to other solutions [here](http

## Safe Core SDK
yagopv marked this conversation as resolved.
Show resolved Hide resolved

The [Safe Core SDK](https://github.com/safe-global/safe-core-sdk) is a monorepo that contains software developer tools that allows interaction with the [Safe contracts](https://github.com/safe-global/safe-contracts) and the [Safe Transaction Service](https://github.com/safe-global/safe-transaction-service).
The [Safe Core SDK](https://github.com/safe-global/safe-core-sdk) is a monorepo that contains software developer tools that allows interaction with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) and the [Safe Transaction Service](https://github.com/safe-global/safe-transaction-service).

In this guide we will use the following packages to deploy new Safes, create transactions, collect off-chain signatures and execute transactions:
* **safe-core-sdk-types**
Expand All @@ -22,7 +22,7 @@ In this guide we will use the following packages to deploy new Safes, create tra
- Approve Safe transactions on-chain
- Execute Safe transactions once they have the required confirmations

Check the complete [API reference](/packages/protocol-kit#api-reference) for more details.
Check the complete [API reference](https://docs.safe.global/sdk/protocol-kit/reference) for more details.

* **api-kit**

Expand All @@ -33,7 +33,7 @@ In this guide we will use the following packages to deploy new Safes, create tra
- Get the transaction history of a Safe (and filter by pending, incoming, multisig transactions, etc.)
- Get balances, list of tokens, etc.

Check the complete [API reference](/packages/api-kit#api-reference) for more details.
Check the complete [API reference](https://docs.safe.global/sdk/api-kit/reference) for more details.

## Prerequisites

Expand Down
Loading
Loading