Skip to content

Commit

Permalink
prep for beta
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahZinsmeister committed Jan 11, 2022
1 parent b50caf8 commit 60bf49a
Show file tree
Hide file tree
Showing 42 changed files with 3,023 additions and 5,260 deletions.
51 changes: 21 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,27 @@
# `web3-react` 🧰 (alpha)
# web3-react (beta)

[![CI](https://github.com/NoahZinsmeister/web3-react/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/NoahZinsmeister/web3-react/actions/workflows/CI.yml)

[Example](https://web3-react-mu.vercel.app/)

Tasks:
- Write other connectors
- WalletConnect V2
- Gnosis Safe
- Other injected connectors?
- Tighten up experimental connectors
- Address remaining TODOs in the code
- More tests
- Docs
- Test Node 12 support
- Add Node 16 support once LTS
## [Example](https://web3-react-mu.vercel.app/)

## Packages

| Package | `@alpha` Version | Size | Description |
| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [`@web3-react/store`](packages/store) | [![npm](https://img.shields.io/npm/v/@web3-react/store/alpha.svg)](https://www.npmjs.com/package/@web3-react/store/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/store/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/store@alpha) | |
| [`@web3-react/types`](packages/types) | [![npm](https://img.shields.io/npm/v/@web3-react/types/alpha.svg)](https://www.npmjs.com/package/@web3-react/types/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/types/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/types@alpha) | |
| [`@web3-react/core`](packages/core) | [![npm](https://img.shields.io/npm/v/@web3-react/core/alpha.svg)](https://www.npmjs.com/package/@web3-react/core/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/core/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/core@alpha) | |
| Package | Version | Size | Description |
|-------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
| [`@web3-react/types`](packages/types) | [![npm](https://img.shields.io/npm/v/@web3-react/types/beta.svg)](https://www.npmjs.com/package/@web3-react/types/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/types/beta.svg)](https://bundlephobia.com/result?p=@web3-react/types@beta) | |
| [`@web3-react/store`](packages/store) | [![npm](https://img.shields.io/npm/v/@web3-react/store/beta.svg)](https://www.npmjs.com/package/@web3-react/store/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/store/beta.svg)](https://bundlephobia.com/result?p=@web3-react/store@beta) | |
| [`@web3-react/core`](packages/core) | [![npm](https://img.shields.io/npm/v/@web3-react/core/beta.svg)](https://www.npmjs.com/package/@web3-react/core/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/core/beta.svg)](https://bundlephobia.com/result?p=@web3-react/core@beta) | |
| **Connectors** | | | |
| [`@web3-react/metamask`](packages/metamask) | [![npm](https://img.shields.io/npm/v/@web3-react/metamask/alpha.svg)](https://www.npmjs.com/package/@web3-react/metamask/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/metamask/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/metamask@alpha) | [MetaMask](https://metamask.io/) |
| [`@web3-react/network`](packages/network) | [![npm](https://img.shields.io/npm/v/@web3-react/network/alpha.svg)](https://www.npmjs.com/package/@web3-react/network/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/network/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/network@alpha) | |
| [`@web3-react/walletconnect`](packages/walletconnect) | [![npm](https://img.shields.io/npm/v/@web3-react/walletconnect/alpha.svg)](https://www.npmjs.com/package/@web3-react/walletconnect/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/walletconnect/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/walletconnect@alpha) | [WalletConnect](https://walletconnect.org/) |
| [`@web3-react/walletlink`](packages/walletlink) | [![npm](https://img.shields.io/npm/v/@web3-react/walletlink/alpha.svg)](https://www.npmjs.com/package/@web3-react/walletlink/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/walletlink/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/walletlink@alpha) | [WalletLink](https://walletlink.org/#/) |
| **Experimental Connectors** | | | ⚠️ Not stable |
| [`@web3-react/frame`](packages/frame) | [![npm](https://img.shields.io/npm/v/@web3-react/frame/alpha.svg)](https://www.npmjs.com/package/@web3-react/frame/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/frame/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/frame@alpha) | [Frame](https://frame.sh/) |
| [`@web3-react/magic`](packages/magic) | [![npm](https://img.shields.io/npm/v/@web3-react/magic/alpha.svg)](https://www.npmjs.com/package/@web3-react/magic/v/alpha) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/magic/alpha.svg)](https://bundlephobia.com/result?p=@web3-react/magic@alpha) | [Magic](https://magic.link/) |
| [`@web3-react/eip1193`](packages/eip1193) | [![npm](https://img.shields.io/npm/v/@web3-react/eip1193/beta.svg)](https://www.npmjs.com/package/@web3-react/eip1193/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/eip1193/beta.svg)](https://bundlephobia.com/result?p=@web3-react/eip1193@beta) | |
| [`@web3-react/empty`](packages/empty) | [![npm](https://img.shields.io/npm/v/@web3-react/empty/beta.svg)](https://www.npmjs.com/package/@web3-react/empty/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/empty/beta.svg)](https://bundlephobia.com/result?p=@web3-react/empty@beta) | |
| [`@web3-react/metamask`](packages/metamask) | [![npm](https://img.shields.io/npm/v/@web3-react/metamask/beta.svg)](https://www.npmjs.com/package/@web3-react/metamask/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/metamask/beta.svg)](https://bundlephobia.com/result?p=@web3-react/metamask@beta) | [MetaMask](https://metamask.io/) |
| [`@web3-react/network`](packages/network) | [![npm](https://img.shields.io/npm/v/@web3-react/network/beta.svg)](https://www.npmjs.com/package/@web3-react/network/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/network/beta.svg)](https://bundlephobia.com/result?p=@web3-react/network@beta) | |
| [`@web3-react/url`](packages/url) | [![npm](https://img.shields.io/npm/v/@web3-react/url/beta.svg)](https://www.npmjs.com/package/@web3-react/url/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/url/beta.svg)](https://bundlephobia.com/result?p=@web3-react/url@beta) | |
| [`@web3-react/walletconnect`](packages/walletconnect) | [![npm](https://img.shields.io/npm/v/@web3-react/walletconnect/beta.svg)](https://www.npmjs.com/package/@web3-react/walletconnect/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/walletconnect/beta.svg)](https://bundlephobia.com/result?p=@web3-react/walletconnect@beta) | [WalletConnect](https://walletconnect.org/) |
| [`@web3-react/walletlink`](packages/walletlink) | [![npm](https://img.shields.io/npm/v/@web3-react/walletlink/beta.svg)](https://www.npmjs.com/package/@web3-react/walletlink/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/walletlink/beta.svg)](https://bundlephobia.com/result?p=@web3-react/walletlink@beta) | [WalletLink](https://walletlink.org/#/) |
| **Experimental Connectors** | | | Not stable |
| [`@web3-react/frame`](packages/frame) | [![npm](https://img.shields.io/npm/v/@web3-react/frame/beta.svg)](https://www.npmjs.com/package/@web3-react/frame/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/frame/beta.svg)](https://bundlephobia.com/result?p=@web3-react/frame@beta) | [Frame](https://frame.sh/) |
| [`@web3-react/magic`](packages/magic) | [![npm](https://img.shields.io/npm/v/@web3-react/magic/beta.svg)](https://www.npmjs.com/package/@web3-react/magic/v/beta) | [![minzip](https://img.shields.io/bundlephobia/minzip/@web3-react/magic/beta.svg)](https://bundlephobia.com/result?p=@web3-react/magic@beta) | [Magic](https://magic.link/) |


## Getting Started
Expand All @@ -39,7 +30,7 @@ Tasks:
- `yarn bootstrap`
- `yarn start`

In addition to compiling each package in watch mode, this will also spin up an example app on [http://localhost:3000/](http://localhost:3000/).
In addition to compiling each package in watch mode, this will also spin up the example app on [http://localhost:3000/](http://localhost:3000/).

## Running Tests

Expand All @@ -49,14 +40,14 @@ In addition to compiling each package in watch mode, this will also spin up an e

### Add a dependency

- `yarn lerna add <DEPENDENCY> --scope <SUBPACKAGE>`
- `yarn lerna add <DEPENDENCY> --scope <PACKAGE>`

### Remove a dependency

- Delete the relevant `package.json` entry

Because of a [lerna bug](https://github.com/lerna/lerna/issues/1883), it's not possible to prune `yarn.lock` programmatically, so regenerate it manually:

- `yarn lerna exec 'rm -f yarn.lock' --scope SUBPACKAGE`
- `yarn clean --scope SUBPACKAGE`
- `yarn lerna exec "rm -f yarn.lock" --scope <SUBPACKAGE>`
- `yarn clean --scope <SUBPACKAGE>`
- `yarn bootstrap`
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"private": true,
"name": "web3-react",
"description": "A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps",
"author": "Noah Zinsmeister <noahwz@gmail.com>",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^14 || ^16"
},
Expand All @@ -25,14 +22,18 @@
"@types/react": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@walletconnect/ethereum-provider": "^1.7.0",
"eslint": "^8.4.1",
"eslint-plugin-react-hooks": "^4.3.0",
"eth-provider": "^0.9.4",
"jest": "^27.2.4",
"lerna": "^4.0.0",
"magic-sdk": "^6.1.0",
"prettier": "2.3.2",
"react": "^17.0.2",
"react-test-renderer": "^17.0.2",
"ts-jest": "^27.0.5",
"typescript": "^4.5.4"
"typescript": "^4.5.4",
"walletlink": "^2.4.0"
}
}
1 change: 1 addition & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @web3-react/core
14 changes: 8 additions & 6 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"name": "@web3-react/core",
"keywords": [
"web3-react"
],
"author": "Noah Zinsmeister <noahwz@gmail.com>",
"license": "GPL-3.0-or-later",
"repository": "github:NoahZinsmeister/web3-react",
"publishConfig": {
"access": "public"
},
Expand All @@ -22,16 +28,12 @@
"start": "tsc --watch"
},
"dependencies": {
"@ethersproject/providers": "^5.5.1",
"@web3-react/store": "^8.0.16-alpha.0",
"@web3-react/types": "^8.0.16-alpha.0",
"zustand": "^4.0.0-beta.0"
},
"peerDependencies": {
"@ethersproject/providers": "^5.4.5",
"react": ">=16.8"
},
"devDependencies": {
"@ethersproject/providers": "^5.4.5"
},
"gitHead": "9461726911d45849d76642bc60fec57e84234cd7"
}
}
26 changes: 13 additions & 13 deletions packages/core/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
integrity sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg==

"@ethersproject/networks@^5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.5.0.tgz#babec47cab892c51f8dd652ce7f2e3e14283981a"
integrity sha512-KWfP3xOnJeF89Uf/FCJdV1a2aDJe5XTN2N52p4fcQ34QhDqQFkgQKZ39VGtiqUgHcLI8DfT0l9azC3KFTunqtA==
version "5.5.2"
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.5.2.tgz#784c8b1283cd2a931114ab428dae1bd00c07630b"
integrity sha512-NEqPxbGBfy6O3x4ZTISb90SjEDkWYDUbEeIFhJly0F7sZjoQMnj5KYzMSkMkLKZ+1fGpx00EDpHQCy6PrDupkQ==
dependencies:
"@ethersproject/logger" "^5.5.0"

Expand All @@ -116,10 +116,10 @@
dependencies:
"@ethersproject/logger" "^5.5.0"

"@ethersproject/providers@^5.4.5":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.5.0.tgz#bc2876a8fe5e0053ed9828b1f3767ae46e43758b"
integrity sha512-xqMbDnS/FPy+J/9mBLKddzyLLAQFjrVff5g00efqxPzcAwXiR+SiCGVy6eJ5iAIirBOATjx7QLhDNPGV+AEQsw==
"@ethersproject/providers@^5.5.1":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.5.2.tgz#131ccf52dc17afd0ab69ed444b8c0e3a27297d99"
integrity sha512-hkbx7x/MKcRjyrO4StKXCzCpWer6s97xnm34xkfPiarhtEUVAN4TBBpamM+z66WcTt7H5B53YwbRj1n7i8pZoQ==
dependencies:
"@ethersproject/abstract-provider" "^5.5.0"
"@ethersproject/abstract-signer" "^5.5.0"
Expand All @@ -142,9 +142,9 @@
ws "7.4.6"

"@ethersproject/random@^5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.5.0.tgz#305ed9e033ca537735365ac12eed88580b0f81f9"
integrity sha512-egGYZwZ/YIFKMHcoBUo8t3a8Hb/TKYX8BCBoLjudVCZh892welR3jOxgOmb48xznc9bTcMm7Tpwc1gHC1PFNFQ==
version "5.5.1"
resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.5.1.tgz#7cdf38ea93dc0b1ed1d8e480ccdaf3535c555415"
integrity sha512-YaU2dQ7DuhL5Au7KbcQLHxcRHfgyNgvFV4sQOo0HrtW3Zkrc9ctWNz8wXQ4uCSfSDsqX2vcjhroxU5RQRV0nqA==
dependencies:
"@ethersproject/bytes" "^5.5.0"
"@ethersproject/logger" "^5.5.0"
Expand Down Expand Up @@ -203,9 +203,9 @@
"@ethersproject/signing-key" "^5.5.0"

"@ethersproject/web@^5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.5.0.tgz#0e5bb21a2b58fb4960a705bfc6522a6acf461e28"
integrity sha512-BEgY0eL5oH4mAo37TNYVrFeHsIXLRxggCRG/ksRIxI2X5uj5IsjGmcNiRN/VirQOlBxcUhCgHhaDLG4m6XAVoA==
version "5.5.1"
resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.5.1.tgz#cfcc4a074a6936c657878ac58917a61341681316"
integrity sha512-olvLvc1CB12sREc1ROPSHTdFCdvMh0J5GSJYiQg2D0hdD4QmJDy8QYDb1CvoqD/bF1c++aeKv2sR5uduuG9dQg==
dependencies:
"@ethersproject/base64" "^5.5.0"
"@ethersproject/bytes" "^5.5.0"
Expand Down
1 change: 1 addition & 0 deletions packages/eip1193/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# @web3-react/eip1193
7 changes: 7 additions & 0 deletions packages/eip1193/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"name": "@web3-react/eip1193",
"keywords": [
"web3-react",
"eip1193"
],
"author": "Noah Zinsmeister <noahwz@gmail.com>",
"license": "GPL-3.0-or-later",
"repository": "github:NoahZinsmeister/web3-react",
"publishConfig": {
"access": "public"
},
Expand Down
Loading

0 comments on commit 60bf49a

Please sign in to comment.