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

docs: update CONTRIBUTING guide, fix PR template, and clean up README #290

Merged
merged 4 commits into from
Nov 29, 2023
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Pull Request Checklist

- [ ] Did you add new tests and confirm existing tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, see guidleines below)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md))
- [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples? (e.g. `feat!: breaking change`)
- [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`)
- [ ] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:fix`)
- [ ] Is the base branch you're merging into `development` and not `main`?
- [ ] Did you follow the [contribution guidelines](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)?
66 changes: 50 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,58 @@
# Contributing

We welcome any and all contributions. To get started,
We're excited to have you contribute to the `aa-sdk`. Here's a step-by-step guide to help you get started.

1. Make sure you have `yarn` installed. We are still using version 1.x. The installation instructions can be found here: https://classic.yarnpkg.com/lang/en/docs/install
2. [Fork](https://github.com/alchemyplatform/aa-sdk/fork) this repo
3. Run `yarn` to install dependencies
4. Make changes to packages
## Getting Started

## Pull Request Checklist
1. **Fork and Clone**: First, [fork the `aa-sdk` repository](https://github.com/alchemyplatform/aa-sdk/fork). Then, clone your forked repo to your local machine.

- [ ] Did you add new tests and confirm existing tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, see guidleines below)
- [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples? (e.g. `feat!: breaking change`)
- [ ] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:fix`)
- [ ] Is the base branch you're merging into `development` and not `main`?
2. **Install Dependencies**: Ensure you have `yarn` installed (we use version 1.x). Installation instructions are available [here](https://classic.yarnpkg.com/lang/en/docs/install). Run `yarn` in the project root to install all necessary dependencies.

## Docs guidelines
3. **Testing Environment**: Before making changes, make sure to verify the testing environment.

We leverage `vitepress` to build our docs. You can find the docs in the `site` folder. To run the docs locally, run `yarn docs:dev` from the `site` folder. To build the docs, run `yarn docs:build`. Docs are automatically deployed with each package published.
- Use the Node version specified in `package.json` (currently 18.16.0). Run `node -v` to check your version.
- Build the project with `yarn build`.
- Run existing tests using `yarn test` to ensure everything is working correctly.

When updating code, be sure to update the relevant doc within `site/packages/*`. The `packages` directory is broken down by the relevant package found within this repository. When adding new functionality, be sure to add a new doc outlining the method or class that you've added!
4. **Make Changes**: Now, you can start making changes to the packages or docs. When updating or adding new functionality, update or add a new doc in `site/packages/*` corresponding to the package you've worked on to document the changes.

5. **Re-verify Tests**: After making your changes, re-run `yarn test` to ensure all tests still pass.

6. **Code Formatting**:

- Format your code changes with `yarn run lint:write`.
- Confirm that your code passes format checks with `yarn run lint:check`.

7. **Docs Changes**:

- We use `vitepress` for our docs located in the `site` folder.
- To run docs locally: `yarn dev` from the `site` folder.
- To build docs: `yarn build` from the `site` folder.
- When editing or adding new docs, make sure you follow the guidelines mentioned below:
- Follow the [Google style guidelines](https://developers.google.com/style) for docs content.
- Additional Guidelines:
- Use terms consistently (e.g., "smart account", not "Smart Account").
- Refer to "Account Kit" correctly, without "the" or "AccountKit".
- Use `LightAccount` for code references, "Light Account" in text.
- Use "gasless" over "gas-less".
- Write documentation in the [second person voice](https://developers.google.com/style/person).
- Use "aa-sdk" or "Account Kit" depending on context, not "Account Kit SDK".
- Capitalize "Gas Manager API" and "Bundler API".
- Capitalize definitions for type primitives like `Provider`, `Signer`, `Account`.

8. **Committing Changes**: Commit your changes using a standardized message format.

- Format: `[subject-type]: [description starting with lowercase letters] (#[issue number])`.
- For breaking changes, clearly reflect in your commit message (e.g., `feat!: breaking change`).
- Example: `feat: add sanity check on provider connect for clearer error message (#181)`.
- Example: `docs: add new section on gasless transactions (#189)`.
- Use `git log` to see more examples and acceptable subject-types.
- For more details on semantic PR titles, refer to [Flank's guide on PR titles](https://flank.github.io/flank/pr_titles/).

9. **Creating a Pull Request**:

- Push your changes to your GitHub fork.
- Create a pull request against the original `aa-sdk` repository's `development` branch.
- Ensure the pull request title follows the Enforce PR Title Format: `[subject-type]: [description starting with lowercase letters]`. You can check this using `echo "[YOUR_PR_TITLE_HERE] | yarn commitlint`.

10. **Celebrate** your contribution!
43 changes: 4 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,15 @@
# Account Abstraction SDK (aa-sdk)
# aa-sdk

The `aa-sdk` is a type-safe and performant TypeScript library built on top of [viem](https://viem.sh/) to provide ergonomic methods for sending user operations, sponsoring gas, and deploying smart accounts. It handles all the complexity of ERC-4337 under the hood to make account abstraction simple.

The SDK also implements an EIP-1193 provider interface to easily plug into any popular dapp or wallet connect libraries such as RainbowKit, Wagmi, and Web3Modal. It also includes ethers.js adapters to provide full support for ethers.js apps.

The `aa-sdk` is modular at every layer of the stack and can be easily extended to fit your custom needs. You can plug in any [smart account](https://accountkit.alchemy.com/smart-accounts/accounts/using-your-own) implementation, [Signer](https://accountkit.alchemy.com/smart-accounts/signers/overview), [Gas Manager API](https://accountkit.alchemy.com/overview/introduction.html#gas-manager-api), RPC provider.
The `aa-sdk` is modular at every layer of the stack and can be easily extended to fit your custom needs. You can plug in any [smart account](https://accountkit.alchemy.com/smart-accounts/accounts/using-your-own) implementation, [Signer](https://accountkit.alchemy.com/smart-accounts/signers/overview), [Gas Manager API](https://accountkit.alchemy.com/overview/introduction.html#gas-manager-api) and RPC Provider.

## Getting Started

### Install the Packages

```bash [yarn]
yarn add @alchemy/aa-accounts @alchemy/aa-core
```

### [Light Account Example](https://accountkit.alchemy.com/overview/getting-started#a-simple-light-account-example)

## Docs

The `aa-sdk` is part of Account Kit. For more information, check out the [Account Kit docs](https://accountkit.alchemy.com).
The `aa-sdk` is part of [Account Kit](https://accountkit.alchemy.com). Check out this [quickstart guide](https://accountkit.alchemy.com/getting-started.html) to get started.

## Contributing

1. clone the repo
2. run `yarn`
3. verify tests pass
- be sure to use the node version specified in package.json, currently 18.16
- run `node -v`
- run `yarn build`
- run `yarn test`
4. make changes to packages
5. reverify that all tests pass
6. format code changes
- run `yarn run lint:write`
7. confirm code passes format checks
- run `yarn run lint:check`
8. commit code with a standardized commit message
- format: `[subject-type]: [description starting with lowercase letters] (#[issue number])`
- example: `feat: add sanity check on provider connect for clearer error message (#181)`
- note: run `git log` to see more examples and acceptable subject-types
9. push to your github fork
10. create a pull request with the original github repo

- note: pull request title must pass the Enforce PR Title Format
- format: `[subject-type]: [description starting with lowercase letters]`
- run `echo "[YOUR_PR_TITLE_HERE] | yarn commitlint`
- passing example: run `echo "docs: add build and test documentation update (#195)" | yarn commitlint`

11. celebrate
We welcome contributions to `aa-sdk`. Please see our [contributing guidelines](CONTRIBUTING.md) for more information.
Loading