Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Aug 28, 2023
1 parent 4b549da commit 4aef07c
Show file tree
Hide file tree
Showing 29 changed files with 161 additions and 129 deletions.
18 changes: 9 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Thanks for your interest in contributing to wagmi! Please take a moment to review this document **before submitting a pull request.**
Thanks for your interest in contributing to Wagmi! Please take a moment to review this document **before submitting a pull request.**

If you want to contribute, but aren't sure where to start, you can create a [new discussion](https://github.com/wagmi-dev/wagmi/discussions/new/choose). If you are looking to add a connector or chain, check out the following guides:

Expand Down Expand Up @@ -58,7 +58,7 @@ gh repo clone wagmi-dev/wagmi

## Installing Node.js and pnpm

wagmi uses [pnpm workspaces](https://pnpm.io/workspaces) to manage multiple projects. You need to install **Node.js v16 or higher** and **pnpm v7 or higher**.
Wagmi uses [pnpm workspaces](https://pnpm.io/workspaces) to manage multiple projects. You need to install **Node.js v16 or higher** and **pnpm v7 or higher**.

You can run the following commands in your terminal to check your local Node.js and npm versions:

Expand Down Expand Up @@ -107,7 +107,7 @@ Once the dev server is running, you can make changes to any of the package sourc

## Running the test suite

wagmi uses [Vitest](https://vitest.dev) to run tests and [anvil.js](https://github.com/wagmi-dev/anvil.js) to execute tests against a local Ethereum node. First, install [Anvil](https://github.com/foundry-rs/foundry/tree/master/anvil) via [Foundry](https://book.getfoundry.sh/getting-started/installation).
Wagmi uses [Vitest](https://vitest.dev) to run tests and [anvil.js](https://github.com/wagmi-dev/anvil.js) to execute tests against a local Ethereum node. First, install [Anvil](https://github.com/foundry-rs/foundry/tree/master/anvil) via [Foundry](https://book.getfoundry.sh/getting-started/installation).

Next, copy over the environment variables from `.env.example` to `.env`, and fill them out. Now you are ready to run the tests! You have the following options for running tests:

Expand All @@ -123,7 +123,7 @@ When adding new features or fixing bugs, it's important to add test cases to cov

## Writing documentation

Documentation is crucial to helping developers of all experience levels use wagmi. wagmi uses [VitePress](https://vitepress.dev) for the documentation site (located at [`docs`](../docs)). To start the site in dev mode, run:
Documentation is crucial to helping developers of all experience levels use Wagmi. Wagmi uses [VitePress](https://vitepress.dev) for the documentation site (located at [`docs`](../docs)). To start the site in dev mode, run:

```bash
pnpm docs:dev
Expand Down Expand Up @@ -155,7 +155,7 @@ When you submit a pull request, GitHub will automatically lint, build, and test
---

<div align="center">
✅ Now you're ready to contribute to wagmi! Follow the next steps if you need more advanced instructions.
✅ Now you're ready to contribute to Wagmi! Follow the next steps if you need more advanced instructions.
</div>

---
Expand Down Expand Up @@ -296,7 +296,7 @@ If you followed all the instructions, you can submit a pull request and the new

> **Warning** **Please ask first before starting work on a new connector.**
>
> To avoid having your pull request declined after investing time and effort into a new connector, we ask that contributors create a [Connector Request](https://github.com/wagmi-dev/wagmi/discussions/new?category=connector-request) before starting work on new Connectors. This helps ensure the connector solves for an important or general use-case of interest to wagmi users.
> To avoid having your pull request declined after investing time and effort into a new connector, we ask that contributors create a [Connector Request](https://github.com/wagmi-dev/wagmi/discussions/new?category=connector-request) before starting work on new Connectors. This helps ensure the connector solves for an important or general use-case of interest to Wagmi users.
#### 0. Follow the [Basic Guide](#basic-guide).

Expand Down Expand Up @@ -358,7 +358,7 @@ The type error should tell you what properties are missing from `createConnector
`createConnector` also has the following config properties you can use within the connector:

- `chains`: List of chains configured by the user.
- `emitter`: Emitter for emitting events. Used to sync connector state with wagmi config. The following events are available:
- `emitter`: Emitter for emitting events. Used to sync connector state with Wagmi `Config`. The following events are available:
- `change`: Emitted when the connected accounts or chain changes.
- `connect`: Emitted when the connector connects.
- `disconnect`: Emitted when the connector disconnects.
Expand All @@ -376,7 +376,7 @@ export { fooBarBaz } from './fooBarBaz.js'

#### 5. Try out your connector and add tests.

While building a connector, it can be useful to try it out with wagmi. You can follow the setup [guide in the wagmi repo](https://github.com/wagmi-dev/wagmi/blob/main/.github/CONTRIBUTING.md), to use the local development playground for testing your changes.
While building a connector, it can be useful to try it out with Wagmi. You can follow the setup [guide in the Wagmi repo](https://github.com/wagmi-dev/wagmi/blob/main/.github/CONTRIBUTING.md), to use the local development playground for testing your changes.

Ideally, you should also be able to add tests for your connector in a `connectorName.test.ts` file. This isn't always easy so at a minimum please create a test file with instructions for how to test your connector manually. The test file should include actual tests or "instruction tests" for the following:

Expand All @@ -394,7 +394,7 @@ pnpm test:update packages/connectors/src/index.test.ts

#### 6. Add your team to CODEOWNERS.

It is critical connectors are updated in a timely manner and actively maintained so that users of wagmi can rely on them in production settings. The wagmi core team will provide as much assistance as possible to keep connectors up-to-date with breaking changes from wagmi, but it is your responsibility to ensure that any dependencies and issues/discussions related to the connector are handled in a timely manner.
It is critical connectors are updated in a timely manner and actively maintained so that users of Wagmi can rely on them in production settings. The Wagmi core team will provide as much assistance as possible to keep connectors up-to-date with breaking changes from Wagmi, but it is your responsibility to ensure that any dependencies and issues/discussions related to the connector are handled in a timely manner.

In support of this goal, add at least one member of your team to the [CODEOWNERS](./CODEOWNERS) file so that you get notified of pull requests, issues, etc. related to your connector. You can add your team like this:

Expand Down
193 changes: 101 additions & 92 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</p>

<p align="center">
Reactivity for Ethereum apps
Reactive primitives for building modern Ethereum apps
<p>

<p align="center">
Expand All @@ -22,12 +22,6 @@
<img src="https://img.shields.io/npm/l/wagmi?colorA=f6f8fa&colorB=f6f8fa&style=flat" alt="MIT License">
</picture>
</a>
<a href="https://app.codecov.io/gh/wagmi-dev/wagmi">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/codecov/c/github/wagmi-dev/wagmi?colorA=21262d&colorB=21262d&style=flat">
<img src="https://img.shields.io/codecov/c/github/wagmi-dev/wagmi?colorA=f6f8fa&colorB=f6f8fa&style=flat" alt="Code coverage">
</picture>
</a>
<a href="https://www.npmjs.com/package/wagmi">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/npm/dm/wagmi?colorA=21262d&colorB=21262d&style=flat">
Expand All @@ -42,19 +36,29 @@
</a>
</p>

<br>
---

## Documentation

For documentation and examples, visit [wagmi.sh](https://wagmi.sh).
For documentation, visit [wagmi.sh](https://wagmi.sh).

## Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

[Discuss Wagmi on GitHub](https://github.com/wagmi-dev/wagmi/discussions)

For casual chit-chat with others using the framework:

[Join the Wagmi Slack](https://join.slack.com/t/wagmi-community/shared_invite/zt-21zxb2mhv-EcN32c1Qx4Z3vRAfEKbbJw)

## Contributing

Contributions to Wagmi are greatly appreciated! To get started, please read our [Contributing Guide](contributing). Then, check out the list of [Good First Issues](https://github.com/wagmi-dev/wagmi/contribute). Let us know if you have any questions!
Contributions to Wagmi are greatly appreciated! If you're interested in contributing to Wagmi, please read our [contributing docs](https://github.com/wagmi-dev/wagmi/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.

## Sponsors

If you find wagmi useful, please consider [supporting development](https://github.com/sponsors/wagmi-dev?metadata_campaign=gh_readme_support). Thank you 🙏
If you find Wagmi useful or use it at work, please consider [supporting development](https://github.com/sponsors/wagmi-dev?metadata_campaign=gh_readme_support). Thank you 🙏

<a href="https://paradigm.xyz">
<picture>
Expand All @@ -65,91 +69,96 @@ If you find wagmi useful, please consider [supporting development](https://githu

<br>

<a href="https://twitter.com/family">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/family-dark.svg">
<img alt="family logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/family-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://twitter.com/context">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/context-dark.svg">
<img alt="context logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/context-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://walletconnect.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/walletconnect-dark.svg">
<img alt="WalletConnect logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/walletconnect-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://twitter.com/prtyDAO">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/partydao-dark.svg">
<img alt="PartyDAO logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/partydao-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://dynamic.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/dynamic-dark.svg">
<img alt="Dynamic logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/dynamic-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://sushi.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/sushi-dark.svg">
<img alt="Sushi logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/sushi-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://stripe.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-dark.svg">
<img alt="Stripe logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://bitkeep.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/bitkeep-dark.svg">
<img alt="BitKeep logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/bitkeep-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://www.privy.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/privy-dark.svg">
<img alt="Privy logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/privy-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://www.spruceid.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/spruce-dark.svg">
<img alt="Spruce logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/spruce-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://rollup.id">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/rollup.id-dark.svg">
<img alt="rollup.id logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/rollup.id-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://pancakeswap.finance/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/pancake-dark.svg">
<img alt="pancake logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/pancake-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://celo.org/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/celo-dark.svg">
<img alt="celo logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/celo-light.svg" width="auto" height="50">
</picture>
</a>
<p>
<a href="https://twitter.com/family">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/family-dark.svg">
<img alt="family logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/family-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://twitter.com/context">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/context-dark.svg">
<img alt="context logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/context-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://walletconnect.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/walletconnect-dark.svg">
<img alt="WalletConnect logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/walletconnect-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://twitter.com/prtyDAO">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/partydao-dark.svg">
<img alt="PartyDAO logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/partydao-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://dynamic.xyz">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/dynamic-dark.svg">
<img alt="Dynamic logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/dynamic-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://sushi.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/sushi-dark.svg">
<img alt="Sushi logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/sushi-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://stripe.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-dark.svg">
<img alt="Stripe logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/stripe-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://bitkeep.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/bitkeep-dark.svg">
<img alt="BitKeep logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/bitkeep-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://www.privy.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/privy-dark.svg">
<img alt="Privy logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/privy-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://www.spruceid.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/spruce-dark.svg">
<img alt="Spruce logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/spruce-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://rollup.id">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/rollup.id-dark.svg">
<img alt="rollup.id logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/rollup.id-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://pancakeswap.finance/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/pancake-dark.svg">
<img alt="pancake logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/pancake-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://celo.org">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/celo-dark.svg">
<img alt="celo logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/celo-light.svg" width="auto" height="50">
</picture>
</a>
<a href="https://zora.co">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/zora-dark.svg">
<img alt="zora logo" src="https://raw.githubusercontent.com/wagmi-dev/.github/main/content/sponsors/zora-light.svg" width="auto" height="50">
</picture>
</a>
</p>

<br />
<br />

<a href="https://vercel.com/?utm_source=wagmi-dev&utm_campaign=oss">
<img src="https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg" alt="Powered by Vercel" height="35">
</a>

[docs]: https://wagmi.sh
[contributing]: https://github.com/wagmi-dev/wagmi/blob/main/.github/CONTRIBUTING.md
27 changes: 26 additions & 1 deletion docs/core/actions.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# Actions
<script setup>
import { getSidebar } from '../.vitepress/sidebar'

const actions = getSidebar()['/core']
.find(x => x.text === 'API').items
.find(x => x.link === '/core/actions').items
.sort((a, b) => a.text.localeCompare(b.text))
</script>

# Actions

Actions for accounts, wallets, contracts, transactions, signing, ENS, and more.

## Import

```ts
import { getAccount } from '@wagmi/core'
```

## All Actions

<ul>
<li v-for="action of actions">
<a :href="action.link">{{ action.text }}</a>
</li>
</ul>
Loading

1 comment on commit 4aef07c

@vercel
Copy link

@vercel vercel bot commented on 4aef07c Aug 28, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

wagmi-v2 – ./docs

wagmi-v2.vercel.app
wagmi-v2-wagmi-dev.vercel.app
alpha.wagmi.sh
wagmi-v2-git-alpha-wagmi-dev.vercel.app

Please sign in to comment.