diff --git a/docs/FAQ.md b/docs/FAQ.md
new file mode 100644
index 000000000000..16ce87e803f5
--- /dev/null
+++ b/docs/FAQ.md
@@ -0,0 +1,107 @@
+# FAQ
+
+## How to resolve merge conflicts in `pnpm-lock.yaml`?
+
+Merge the target branch into yours and never mind those conflicts in `pnpm-lock.yaml`. And checkout the file to be the one on the target branch to revert changes your branch took in. Then run `pnpm install` to up the lockfile to date.
+
+E.g., your `feat/fantasy` branch conflicts with `develop` branch.
+
+```bash
+> git branch --show-current
+feat/fantasy
+
+# merge the develop branch and never manually handle the conflicts in lock file
+> git merge develop
+
+# check out the lock file from the base branch
+> git checkout develop -- pnpm-lock.yaml
+
+# up the lockfile to date
+> pnpm install
+```
+
+## Why my Git hooks don't work?
+
+```bash
+npx husky install # on project root directory
+```
+
+## How to fix cspell errors in CI?
+
+This project uses [cspell](https://github.com/streetsidesoftware/cspell) for checking typos. You can add unlisted words into `cspell.json` to bypass cspell checking. After you update the configuration file, you could run checking locally before pushing it to make sure your patch is working.
+
+```bash
+npx cspell lint pattern_that_match_your_files
+
+# e.g. check spell of the RSS3 plugin
+npx cspell lint ./packages/plugins/RSS3/**/*
+```
+
+Learn more: [`cspell.json`](https://cspell.org/configuration/#cspelljson)
+
+## Why were my components rendered many times?
+
+All components should working in [Strict Mode](https://reactjs.org/docs/strict-mode.html) and React 18 new [Strict Effects](https://github.com/reactwg/react-18/discussions/19).
+
+If you found your code not working correctly, please read the documentation above. In addition, you can comment out `` temporarily to verify if it is a problem with your component not supporting Strict Mode.
+
+DO NOT remove ``.
+
+## How to download CI builds?
+
+| Name | Description |
+| ----------------------------- | ----------------------------------------------------------------------- |
+| MaskNetwork.base.zip | The default build, currently is the same as the Chromium build. |
+| MaskNetwork.chromium-beta.zip | Build for Chromium based browsers with some insider features turned on. |
+| MaskNetwork.chromium.zip | Build for Chromium based browsers |
+| MaskNetwork.firefox.zip | Build for Firefox |
+| MaskNetwork.gecko.zip | Build for Android native Mask app |
+| MaskNetwork.iOS.zip | Build for iOS native Mask app |
+
+You can download these builds in two places.
+
+- Github: Open the pull request page, and click the **Actions** tab. Then on the opened page, click the **build** sub-item on the **Compile** item. On the action detailed page, click the **Summary** tab. Now you can download builds on the **Artifacts** section.
+
+ E.g.,
+
+- CircleCI: Open the pull request page, and scroll down to the review status card. Click **Show all checks** to find the **
+ ci/circleci: build** item, and click the **details** link. On the opened CircleCI page, click the **ARTIFACTS** tab.
+
+ E.g.,
+
+## Help! The data service doesn’t return a CORS header.
+
+Please contact the service maintainer to add CORS headers, the extension will send requests in following origins:
+
+| Browser | Origin |
+| -------- | --------------------------------------------------- |
+| Chromium | chrome-extension://jkoeaghipilijlahjplgbfiocjhldnap |
+| Firefox | moz-extension://id |
+
+The Chromium extension has a fixed id, but only on production mode. And the Firefox browser will set a new id each time it boots an extension. So, in summary, it's better to allow all origins which match the regexp below.
+
+```txt
+/.*-extension:\/\/[^\S]+/
+```
+
+If you cannot reach the service maintainer another workaround is to use a proxy server to add CORS headers. To enable it try to change the request URL into `https://cors.r2d2.to/?=[url]`.
+
+```ts
+// before
+fetch('https://api.com')
+
+// after
+fetch('https://cors.r2d2.to/?=https://api.com')
+```
+
+## How to read the local settings?
+
+Open the background.html of the extension and execute the following scripts in the console.
+
+```ts
+// get all storage
+browser.storage.local.get(null).then(console.log)
+
+// clear all storage
+browser.storage.local.clear()
+```
diff --git a/docs/blockchain-integration.md b/docs/blockchain-integration.md
new file mode 100644
index 000000000000..7b625e76c890
--- /dev/null
+++ b/docs/blockchain-integration.md
@@ -0,0 +1 @@
+# Blockchain Integration
diff --git a/docs/bounty-development-guide.md b/docs/bounty-development-guide.md
new file mode 100644
index 000000000000..d52d3b0971a1
--- /dev/null
+++ b/docs/bounty-development-guide.md
@@ -0,0 +1,74 @@
+# Bounty Development Guide
+
+Hi, Awesome people! Welcome to start a bounty task on Mask Network.
+
+## Tech Reqirements
+
+Mask Network extension is written in TypeScript. The UI is written by React and [@mui](https://mui.com/) framework. We write CSS in [CSS-in-JS](css-in-js.md) style.
+
+We prefer widely adopting tech solutions that include:
+
+- [Web3.js](https://web3js.readthedocs.io/) Ethereum JavaScript API
+- [react-use](https://streamich.github.io/react-use/) React Hooks — 👍
+- [bignumber.js](https://mikemcl.github.io/bignumber.js/) A JavaScript library for arbitrary-precision arithmetic.
+- [lodash](https://lodash.com/docs/) A modern JavaScript utility library delivering modularity, performance & extras.
+- [urlcat](https://urlcat.dev/) A URL builder library for JavaScript.
+
+> If your bounty task is related to another project, it could have extra requirements that need to consider.
+
+If you are familiar with these libraries mentioned above, it will take less effort for you to get started.
+The codebase is open-sourced under the AGPLv3 license.
+
+## Packages
+
+After cloning the repository and [set up the development environment](setup.md). The codebase is constructed as a monorepo with many internal packages. Each package serves a specific purpose. Let's take a quick tour.
+
+### Core Packages
+
+- `packages/mask` The main extension which has multiple websites supports, keeps the user's data safe and hosts a plugin system.
+- `packages/encryption` The encryption & decryption of mask network.
+- `packages/plugin-infra` The definition of the plugin system, with a bunch of APIs to expose the core abilities to plugins.
+
+### Plugin Packages
+
+- `packages/plugins/*` All of integrated plugins.
+
+### Shared Packages
+
+- `packages/shared` Shared UI components and utilities.
+- `packages/shared-base` Shared types, constants, and atomic units. Must be as pure as possible and testable.
+
+### Web3 Packages
+
+- `packages/web3-constants` Each Web3 constant must set up for all kowned chain IDs.
+- `packages/web3-contracts` EVM contract ABIs and compiled TypeScript definitions.
+- `packages/web3-provider` A hub of APIs for external data source.
+- `packages/web3-shared-*` Shared hooks, utilities, types for each network.
+
+## Learn Through Examples
+
+Almost all bounty tasks for the Mask Network plugin relate to a plugin. After learning the basics, checkout those pull requests or plugins to learn quick from examples.
+
+### Dapp Plugins
+
+| Plugin | Pull Request Links |
+| ----------- | ----------------------------------------------------------------------------------------------- |
+| Collectible | |
+| Trader | |
+| Savings | |
+
+### Network Plugins
+
+| Plugin | Pull Request Links |
+| ---------- | -------------------------------------------------------------------------------------- |
+| EVM Chains | |
+
+## Pull Request Conversions
+
+After bounty hacker opening a pull request. Reviewer will label it with `Type: Bounty`, and update a status tag while the progress on-going.
+
+| Status | Description |
+| ------------------- | ---------------------------------------------------------------------------- |
+| `Bounty: Started` | The DEV team noticed your request. You will receive comments from reviewers. |
+| `Bounty: Reviewed` | The QA team noticed your request. You will receive bugs from reviewers. |
+| `Bounty: Qualified` | Your request is qualifed. It will ship soon. |
diff --git a/docs/bounty-guide.md b/docs/bounty-guide.md
deleted file mode 100644
index 11b8a3dfeed8..000000000000
--- a/docs/bounty-guide.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# Bounty Developer Guide
-
-## General content
-
-- [Mask Network Architecture Overview](ARCHITECTURE.md)
-- [Caveats for developers](caveats.md)
-- [How to use CSS in JS](css-in-js.md)
-
-## Plugin
-
-If you want's add plugin, then MUST read this file [Plugin Development Guide](plugin-development-guide.md)
-
-## Internationalization (i18n)
-
-If you want's update locale, then MUST read this file [i18n Guide](i18n-guide.md)
diff --git a/docs/caveats.md b/docs/caveats.md
deleted file mode 100644
index 476773684f88..000000000000
--- a/docs/caveats.md
+++ /dev/null
@@ -1,129 +0,0 @@
----
-author: Jack-Works
-maintainer:
- - Jack-Works
- - Septs
----
-
-# Caveats for developers
-
-Hi, Welcome to the Mask Network. Here is some note for developing Mask Network.
-
-Storybooks are deployed to
-
-## Setup
-
-This section is going to help you to set up the development environment of Mask Network.
-
-### Requirements
-
-To develop Mask Network, you need to have ...
-
-- Node 16 or higher
-- [pnpm](https://pnpm.js.org) 6.32.1
-
-## Development
-
-### Install
-
-```bash
-pnpm install
-```
-
-If you encounter with error `EACCES: permission denied, open...'`,
-please run `chown -R $USER /pathToYourProject/Mask` to solve.
-
-### Start the development server
-
-`pnpm start` is a preset of development command for Chromium-based browsers.
-
-If you need to develop in other environments (for example, firefox), please run `pnpm run go`,
-it is an interactive CLI tool to help you to learn out how to compose the build flags.
-
-### Load extension into Chrome
-
-- Open `chrome://extensions`
-- Switch on "**Developer mode**"
-- Click "**Load unpacked version**"
-- Select
- - `project_root/dist` folder (in **development mode**)
- - `project_root/build` folder (after a **production mode** build).
-
-### Load extension into Firefox
-
-- Open `about:debugging#/runtime/this-firefox`
-- Click "**Load Temporary Add-on**"
-- Select any file in the `dist` folder
-
-### Hot Module Reload
-
-This project supports Hot Module Reload which fasten the development process.
-
-To disable HMR, set an environment variable `NO_HMR` to _true_.
-
-### Debug tricks for Chromium-based devtools
-
-#### Debug Background Service
-
-To debug _background service_, click links right after **Inspect views**
-
-![An image displaying Chrome extension manage page](https://user-images.githubusercontent.com/5390719/103509131-5ce0cb00-4e9d-11eb-9aec-b24b9888b863.png)
-
-#### Debug Content Script
-
-To debug _content script_, open the devtools in the web page,
-then you can select context as the following picture describes.
-
-![An image displaying how to select Mask Network as the debug context](https://user-images.githubusercontent.com/5390719/103509436-1a6bbe00-4e9e-11eb-9b18-bde021337944.png)
-
-It's important to select the correct context when you're debugging,
-otherwise you cannot access all the global variables,
-_save as temp variables_ also fails.
-
-#### Use React Devtools
-
-Run the following command to start the React Devtools. It doesn't work if you install it as a browser extension.
-
-> pnpx react-devtools
-
-Due to bug , React Devtools is conflict with React Fast Refresh.
-
-Please use the following command, it will start the development process in profile mode, which disables React Fast Refresh and enables React Devtools.
-
-> pnpx dev profile
-
-## Contribute your working
-
-### Git conversions
-
-`master` branch is our developing branch, `released` branch points to the latest released version.
-[Git flow](https://github.com/nvie/gitflow) is recommended but not enforced.
-
-Please use [Conventional Commits](https://www.conventionalcommits.org) when committing.
-
-### Git hook not working
-
-```bash
-npx husky install # on project root directory
-```
-
-### Using Git
-
-- [Using git rebase on the command line](https://docs.github.com/en/github/getting-started-with-github/using-git-rebase-on-the-command-line)
-- [Configuring a remote for a fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork)
-- [Syncing a fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork)
-
-## Caveats for Library
-
-- `lodash`, List of unavailable functions.
- 1. `_.chain` (not friendly to tree-shake).
- 2. `_.template` (see [#1865](https://github.com/DimensionDev/Maskbook/issues/1865))
-- `crypto`, the Node.js built-in library cannot be used in the project. Please use Web Crypto API instead.
-
-## How to resolve merge conflicts in `pnpm-lock.yaml`?
-
-Do not try to pick either side of the lockfile.
-
-Drop both "ours" and "theirs" version (then the file will be in the base version).
-
-Then run `pnpm install` to up the lockfile to date.
diff --git a/docs/concepts.md b/docs/concepts.md
new file mode 100644
index 000000000000..8f2f9615e826
--- /dev/null
+++ b/docs/concepts.md
@@ -0,0 +1,21 @@
+# Concepts
+
+## Persona
+
+## Post Payload
+
+## Wallet
+
+## Dashboard
+
+## Popup
+
+## SNS Provider
+
+## Wallet Provider
+
+## Plugin
+
+## Network
+
+## ChainId
diff --git a/docs/evm-integration.md b/docs/evm-integration.md
index ebfa0bc488d2..265898a1b8af 100644
--- a/docs/evm-integration.md
+++ b/docs/evm-integration.md
@@ -1,4 +1,4 @@
-# A new EVM-compatible chain to Mask Network
+# EVM Chain Integration
It's easy to integrate an EVM-compatible chain into Mask Network. After you add a new `ChainId` and `NetworkType` in `packages/web3-shared/evm/types/index.ts`. You can follow the TypeScript compiler. By fixing these errors, the integration progress will keep moving forward. Here is a complete instruction list to ensure you wouldn't miss anything.
@@ -57,26 +57,41 @@ If there is no one deployed [these contracts](https://github.com/DimensionDev/mi
- [ ] BalanceChecker
- [ ] Other contracts from the Mask team
+### Translate JSON-RPC
+
+For a chain that follows a different JSON-RPC protocol with the [Ethereum](https://eth.wiki/json-rpc/API), a transactor is used to `encode` and `decode` each request and make the chain just like an EVM-compatible one.
+
+E.g., the CELO chain can pay the transaction fee with non-native tokens. It supports to use [`feeCurrency`](https://docs.celo.org/celo-codebase/protocol/transactions/erc20-transaction-fees) field to set the token address, which doesn't exist in the original [`eth_sendTransaction`](https://eth.wiki/json-rpc/API#eth_sendtransaction) payload. You can fulfill this requirement by a transactor without altering any JSON-RPC facilities.
+
+```ts
+class CeloTranslator extends Base {
+ override encode(context: Context) {
+ context.config = {
+ ...context.config,
+ feeCurrency: '0x0000000000000000000000000000000000000001', // suppose it's a token address
+ }
+ }
+}
+```
+
+### 🎉
+
Congratulation! You have done the coding part.
## Testing Checklist
-Before we ship the chain to the user, we need to do basic ability checks.
+Here is the chain abilities checklist. If you are working on a bounty task, please do each task in list before inviting the team to review your pull request.
- [ ] Check if the asset list and transaction history on the dashboard page work when you choose the chain as the network.
- Setup the chain for DeBank API.
- [ ] Check if the trending view is working. Try to hover a new chain token in any tweets.
+
- Setup the chain for Coingecko API.
- Setup the chain for CoinMarketCap API.
-![image](https://user-images.githubusercontent.com/52657989/144754788-460bad98-bf62-4e5e-8592-ea8580430e63.png)
-
- [ ] Check if the gas estimate dialog is working.
- - Setup the chain for CoinGecko API.
-Goto `chrome-extension://jkoeaghipilijlahjplgbfiocjhldnap/dashboard.html#/wallets/transfer` and check the estimated USD value is working.
-
-![image](https://user-images.githubusercontent.com/52657989/144754866-9c5f389b-6eb4-4325-8f3d-ae53ee6e3b4a.png)
+ - Setup the chain for CoinGecko API.
- [ ] Trade with the DEX on the chain.
@@ -91,7 +106,7 @@ Goto `chrome-extension://jkoeaghipilijlahjplgbfiocjhldnap/dashboard.html#/wallet
- [ ] Transfer token on the transfer page of Dashboard and the wallet tab of the plugin popup.
-## Learn More
+## Examples
| Chain | Pull Request Link |
| --------- | ---------------------------------------------------- |
diff --git a/docs/mask-flavored-jsonrpc-api.md b/docs/mask-flavored-jsonrpc-api.md
new file mode 100644
index 000000000000..0403bdebfe94
--- /dev/null
+++ b/docs/mask-flavored-jsonrpc-api.md
@@ -0,0 +1,113 @@
+
+
+# Mask Flavored JSON RPC API
+
+## Transaction
+
+### `mask_watchTransaction`
+
+Periodically retrieve the transaction receipt and cache the result in the background.
+
+> Note: The [`eth_getTransactionReceipt`](https://eth.wiki/json-rpc/API#eth_gettransactionreceipt) will read receipt from the cache instead of the RPC provider. If you really need the instant receipt you should use `mask_getTransactionReceipt`.
+
+#### Parameters
+
+- `string` the hash of transaction
+- `config` the transaction config object. Learn more: [`eth_sendTransaction`](https://eth.wiki/json-rpc/API#eth_sendtransaction).
+
+#### Returns
+
+- `void`
+
+### `mask_unwatchTransaction`
+
+Stop watching a transaction. It means invoke [`eth_getTransactionReceipt`](https://eth.wiki/json-rpc/API#eth_gettransactionreceipt) with the given hash will always return `null`.
+
+#### Parameters
+
+- `string` the hash of transaction
+
+#### Returns
+
+- `void`
+
+### `mask_getTransactionReceipt`
+
+The non-hijacked version of [`eth_getTransactionReceipt`](https://eth.wiki/json-rpc/API#eth_gettransactionreceipt).
+
+### `mask_replaceTransaction`
+
+Replace a transaction with the given one.
+
+#### Parameters
+
+- `string` the hash of the transaction to be replaced
+- `config` the transaction config object. Learn more: [`eth_sendTransaction`](https://eth.wiki/json-rpc/API#eth_sendtransaction).
+
+#### Returns
+
+- `void`
+
+### `mask_cancelTransaction`
+
+Cancel the given transaction.
+
+#### Parameters
+
+- `string` the hash of the transaction to be canceled
+- `config` the transaction config object. Learn more: [`eth_sendTransaction`](https://eth.wiki/json-rpc/API#eth_sendtransaction).
+
+#### Returns
+
+- `void`
+
+### `mask_confirmTransaction`
+
+Confirm to send a risk transaction.
+
+#### Parameters
+
+- `void`
+
+#### Returns
+
+- `void`
+
+### `mask_rejectTransaction`
+
+Reject to send a risk transaction.
+
+#### Parameters
+
+- `void`
+
+#### Returns
+
+- `void`
+
+## Wallet
+
+### `mask_requestAccounts`
+
+Connect to any wallet on the back of Mask Network.
+
+#### Parameters
+
+- `number` or `void` the chain id of the expected chain
+- `string` or `void` the network id of the expected chain (`NetworkPluginID`)
+
+#### Returns
+
+- `void`
+
+### `mask_dismissAccounts`
+
+Disconnect with the connected wallet.
+
+#### Parameters
+
+- `void`
+
+#### Returns
+
+- `void`
diff --git a/docs/plugin-development-quickstart.md b/docs/plugin-development-quickstart.md
new file mode 100644
index 000000000000..e3a5844467b1
--- /dev/null
+++ b/docs/plugin-development-quickstart.md
@@ -0,0 +1,31 @@
+---
+author: Randolph
+---
+
+# Quickstart for Plugin Development
+
+## 1. Start a plugin file
+
+input following code to start a plugin file
+
+> npx gulp new-pkg
+
+...(a brief introduction about the files generated)
+
+## 2. How to inject ui
+
+1. change definitions in SNSAdaptor to add entry
+2. what is metadata and how to decode and encode metadata
+ if we want to inject ui in a post, we need metadata that contains related infomation
+3. write ui by our component
+
+## 3. How to interact with worker
+
+1. how to write Service to manage data
+2. a brief introduction about backend page
+
+## 4. How to interact with blockchain
+
+1. how to send a transaction
+2. how to get data stored in the blockchain
+3. a brief introduction about transaction process
diff --git a/docs/setup.md b/docs/setup.md
new file mode 100644
index 000000000000..304231c7cde5
--- /dev/null
+++ b/docs/setup.md
@@ -0,0 +1,116 @@
+# Setup
+
+Hi, Welcome to the Mask Network. This guide will quickly take you through setting up the extension development environment.
+
+## Requirements
+
+Here is a snippet of engines requirements in the `package.json` of Mask Network. As you see, `NodeJS` and `pnpm` are required at least a specific version.
+
+```json
+"engines": {
+ "node": ">=16.0.0",
+ "pnpm": ">=6.32.1",
+ }
+```
+
+## Install
+
+### NodeJS
+
+Please install NodeJS from the official document [here](https://nodejs.org/en/). Or install it from a Node version manager, e.g., [nvm](https://github.com/nvm-sh/nvm).
+
+### pnpm
+
+The [pnpm](https://pnpm.io/) is a disk space-efficient package manager. After NodeJS is preinstalled. You could easily get pnpm from
+
+```bash
+npm install -g pnpm
+```
+
+Now, you will need to have packages installed to start development.
+
+```bash
+pnpm install
+```
+
+> If you encounter with error `EACCES: permission denied, open...'`, please run `chown -R $USER /pathToYourProject/Mask` to solve.
+
+### Start the local development server
+
+For Chromium-based browsers (Chrome, Opera, Edge, etc.), please run `pnpm start`. It's preset of many development commands.
+
+If you need to develop in other environments (for example, Firefox), please run `pnpm run go`. It is an interactive CLI tool to help you learn how to compose the build flags.
+
+### Load the extension into your browser
+
+Mask Network has a huge codebase, and it might take time to let the webpack fully startup. It outcomes the `disk/` folder, which contains the unpacked source files of a development version of the Mask Network extension.
+
+For Chrome,
+
+- Open `chrome://extensions` or `Settings -> Extensions`.
+- Turn on the `Developer mode` on the top right corner.
+- It will present a top toolbar with an action button `Load unpacked` on it. Click it and choose the `dist/` folder to load the unpacked version of the Mask Network extension. You can drag and drop the `dist` folder into this page.
+- If everything goes fine. Then, the Mask Network will guide you to the setup process.
+
+For Firefox, it's quite the same process.
+
+- Open `about:debugging#/runtime/this-firefox`
+- Click the `Load Temporary Add-on…` and select the `dist/` folder to load the unpacked extension.
+- If everything goes fine. The Mask Network will start to guide you to the setup process.
+
+## Debugging
+
+There is no difference between extension development and normal web development. In normal web development, you only have a single web page (SPA), but an extension could have more than one page.
+
+There is an invisible "background page" running all the time and an "options page" like a normal web page. Moreover, an extension could inject "content script" into the currently visiting web page.
+
+### Debug the background page
+
+The background page of the Mask Network extension maintains a bunch of fundamental services for front-end functions. Like Crypto Algorithm, Web3 SDKs, APIs to many third-party data providers, etc. They are stand-by all the time, once to be called for a specific task.
+
+To debug _background service_, click links right after **Inspect views**.
+
+![An image displaying Chrome extension manage page](https://user-images.githubusercontent.com/5390719/103509131-5ce0cb00-4e9d-11eb-9aec-b24b9888b863.png)
+
+### Debug the content script
+
+Mask Network only injects content script with permission from the user.
+
+For every new website that Mask Network is going to support, it will show a prompt dialog to ask permission dynamically, rather than asking for all mightly permission at the plugin got installed.
+
+![An image displaying the Mask Network is asking the permission from the user](https://user-images.githubusercontent.com/52657989/158566232-30c52a17-0168-488c-a292-4fc4059ecb9c.png)
+
+To debug _content script_, open the dev tools in the web page, then you can select context as the following picture describes.
+
+![An image displaying how to select Mask Network as the debug context](https://user-images.githubusercontent.com/5390719/103509436-1a6bbe00-4e9e-11eb-9b18-bde021337944.png)
+
+It's important to select the correct context when you're debugging,
+otherwise, you cannot access all the global variables,
+_save as temp variables_ also fails.
+
+### Use React Devtools
+
+Run the following command to start the React Devtools. It doesn't work if you install it as a browser extension.
+
+> pnpx react-devtools
+
+Due to bug , React Devtools conflicts with React Fast Refresh.
+
+Please use the following command, and it will start the development process in profile mode, which disables React Fast Refresh and enables React Devtools.
+
+> pnpx dev --profile
+
+## Contribute your working
+
+### Git conversions
+
+The `develop` branch is our developing branch, and the `released` branch points to the latest released version.
+[Git flow](https://github.com/nvie/gitflow) is recommended but not enforced.
+
+Your commit message should follow [Conventional Commits](https://www.conventionalcommits.org).
+
+### Using Git
+
+- [Using git rebase on the command line](https://docs.github.com/en/github/getting-started-with-github/using-git-rebase-on-the-command-line)
+- [Configuring a remote for a fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork)
+- [Syncing a fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests)
diff --git a/docs/toc.md b/docs/toc.md
new file mode 100644
index 000000000000..f7c90098a1f4
--- /dev/null
+++ b/docs/toc.md
@@ -0,0 +1,59 @@
+# TOC
+
+## Quick Start
+
+## Setup
+
+[setup](./setup.md)
+
+## Concepts
+
+- Persona
+- Post Payload
+- Wallet
+- Dashboard
+- Pop up
+- SNS Provider
+- Wallet Provider
+- Plugin
+- Network (Network as Plugin)
+- ChainID
+
+## Guides
+
+- [Bounty Development Guide](./bounty-development-guide.md)
+- [Plugin Development Guide](./plugin-development-guide.md)
+- Website Integration Guide
+- Blockchain Integration Guide
+- [Wallet Integration Guide](./wallet-integration.md)
+- i18n
+- Form Guide
+
+## UI Components
+
+- shared
+- Mask Icons
+
+## Ecosystem
+
+- [MaskBox](https://box.mask.io/)
+- [MaskBridge](http://bridge.mask.io/)
+
+## Reference
+
+- TypedMessage
+- [Mask Flavored EVM JSON RPC methods](./mask-flavored-jsonrpc-api.md)
+- @mask/plugin-infra
+- @mask/web3-constants
+- @mask/web3-contracts
+- @mask/web3-shared
+- @mask/web3-providers
+
+## FAQ
+
+- Why there are two plugins folder in the codebase?
+- How to bypass the CSP constraint?
+- Help! My API server doesn’t return a CORS header.
+- How to read and clean my local settings?
+- How to fix cspell errors?
+- How to close react strict mode?
diff --git a/docs/wallet-integration.md b/docs/wallet-integration.md
new file mode 100644
index 000000000000..fafa581c988e
--- /dev/null
+++ b/docs/wallet-integration.md
@@ -0,0 +1,105 @@
+# Wallet Integration
+
+Any wallet available in a browser environment can integrate into Mask Network. Well know wallets like [MetaMask](https://metamask.io/), [WalletConnect](https://docs.walletconnect.com/) and [Fortmatic](https://fortmatic.com/) have already been integrated. Besides that, Mask Network is also able to host accounts by itself.
+
+## Overview
+
+```txt
+ Front End Page Background Page
++------------------+ +-----------------+
+| User | - Messaging API ---------- | RPC Composer |
++------------------+ +-----------------+
+ | |
++------------------+ +-----------------+ +-----------------+
+| Bridge Component | - Event Emitter-- | Other Wallets | | Mask Wallet |
++------------------+ +-----------------+ +-----------------+
+ | |
++------------------+ |
+| Wallet SDK | |
++------------------+ |
+ | |
+ +------------------------- Network --------------------------+
+```
+
+Above is an architecture overview illustrating how Mask Network integrates multiple wallets simultaneously. Roughly speaking, it includes two parts: the bridge component on the front end, and the JSON-RPC composer on the background end. They communicate with each other by leveraging the [Messaging Passing API](https://developer.chrome.com/docs/extensions/mv3/messaging/).
+
+As a quick example to let you know how all stuff spins. Here is a UI button that will emit an `eth_getBlockNumber` request once it is clicked.
+
+```tsx
+import { useWeb3 } from '@masknet/web3-shared-evm'
+
+function Example() {
+ const web3 = useWeb3()
+ const onClick = useCallback(async () => {
+ const blockNumber = await web3.eth.getBlockNumber()
+ console.log(`The current block number is ${blockNumber}.`)
+ }, [web3])
+ return
+}
+```
+
+First of all, it creates a [Web3](https://web3js.readthedocs.io/) instance which redirects all JSON-RPC requests to the [request](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/extension/background-script/EthereumServices/request.ts) service on the background page. If you'd like to read the source code, you will realise that there is a [Koa.js](https://koajs.com/) styled [composer](https://github.com/koajs/compose) built-in. A list of middleware is used and serve different purposes: a middleware stores transactions into DB, a middleware watches transaction status, a middleware notifies transaction progress, and so on.
+
+At the current stage, there are two kinds of wallets: Mask Wallet and other wallets.
+
+Mask Wallet sends requests to the network directly on the background page. If the request takes the response, then the user will get notified.
+
+But it's not that simple for other wallets. They are supported only on the front end. E.g., the [Fortmatic](https://docs.fortmatic.com/) SDK injects an iframe on the currently visiting page. Mask Network cannot invoke those SDKs on the background page as an extension. Because of that, they should take their requests to the front end and handle them there. Many mounted components, so-called `ProviderBridge`, listen to the `PROVIDER_RPC_REQUEST` event and call the corresponding SDK once they receive any request from the background. After the SKD finishes the work, they return the result to the bridged provider on the background page with the `PROVIDER_RPC_RESPONSE` event.
+
+It takes a quite long detour, but the benefit is all requests can leverage Mask Wallet abilities.
+
+## A Wallet on a bridged provider
+
+If the wallet that only works on the front end. It needs to use the bridged provider way.
+
+On the front end:
+
+- create a bridged provider by implementing the [`EIP1193Provider`](https://github.com/DimensionDev/Maskbook/blob/develop/packages/web3-shared/evm/types/index.ts) interface.
+- instantiate the bridged provider in [useBridgedProvider](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/plugins/EVM/hooks/useBridgedProvider.ts) which was used by [``](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/plugins/EVM/UI/components/ProviderBridge.tsx).
+- add a new `` in the [EVM](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/plugins/EVM/UI/SNSAdaptor/index.tsx) plugin to receive events from the background page.
+
+On the background page:
+
+- instantiate a [BridgedProvider](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/extension/background-script/EthereumServices/providers/Bridged.ts) and add it into the supported list in [getProvider](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/extension/background-script/EthereumServices/provider.ts).
+
+## A wallet without any UI
+
+If the wallet is totally UI free and can connect/disconnect by calling some APIs. It can send requests to those APIs directly.
+
+On the background page:
+
+- create a provider to extend from the [BaseProvider](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/extension/background-script/EthereumServices/providers/MaskWallet.ts) interface and add it into the supported list in [getProvider](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/extension/background-script/EthereumServices/provider.ts).
+
+## Interceptor
+
+The implementation of Ethereum JSON-RPC may very different between wallets. Those JSON-RPC requests will need some preprocessing before sending to the real wallet. Nevertheless, the Mask Network flavors a bunch of self-known RPC methods that were unknown to other wallets. Bypassing a such request will hit an unimplemented error.
+
+
+
+For this sake, the [`composer`](https://github.com/DimensionDev/Maskbook/blob/develop/packages/mask/src/extension/background-script/EthereumServices/composer.ts) creates a middleware for intercepting JSON-RPC requests. Here is a quick example that converts the Mask Network flavored [`mask_requestAccounts`](./mask-flavored-**jsonrpc**-api.md#mask_requestaccounts) into an Ethereum styled [`eth_accounts`](https://eth.wiki/json-rpc/API#eth_accounts).
+
+```ts
+export class Example implements Middleware {
+ async fn(context: Context, next: () => Promise) {
+ switch (context.method) {
+ case EthereumMethodType.MASK_REQUEST_ACCOUNTS:
+ context.requestArguments = {
+ ...context.requestArguments,
+ method: EthereumMethodType.ETH_ACCOUNTS,
+ }
+ break
+ default:
+ break
+ }
+ await next()
+ }
+}
+```
+
+## Examples
+
+| Wallet | Implementation |
+| ------------- | -------------- |
+| MetaMask | \- |
+| WalletConnect | \- |
+| Fortmatic | \- |
diff --git a/packages/mask/src/components/CompositionDialog/CompositionUI.tsx b/packages/mask/src/components/CompositionDialog/CompositionUI.tsx
index 18bb65e04ecd..7da4567a6222 100644
--- a/packages/mask/src/components/CompositionDialog/CompositionUI.tsx
+++ b/packages/mask/src/components/CompositionDialog/CompositionUI.tsx
@@ -106,8 +106,7 @@ export const CompositionDialogUI = forwardRef(
})
}, [])
- useImperativeHandle(
- ref,
+ const refItem = useMemo(
(): CompositionRef => ({
setMessage: (msg) => {
if (Editor.current) Editor.current.value = msg
@@ -119,6 +118,8 @@ export const CompositionDialogUI = forwardRef(
[reset],
)
+ useImperativeHandle(ref, () => refItem, [refItem])
+
const context = useMemo(
(): CompositionContext => ({
attachMetadata: (meta, data) => Editor.current?.attachMetadata(meta, data),
diff --git a/packages/mask/src/components/CompositionDialog/PluginEntryRender.tsx b/packages/mask/src/components/CompositionDialog/PluginEntryRender.tsx
index 5d9e55775a7a..5db488b0ef98 100644
--- a/packages/mask/src/components/CompositionDialog/PluginEntryRender.tsx
+++ b/packages/mask/src/components/CompositionDialog/PluginEntryRender.tsx
@@ -12,7 +12,7 @@ import { RedPacketPluginID } from '../../plugins/RedPacket/constants'
import { ITO_PluginID } from '../../plugins/ITO/constants'
import { ClickableChip } from '../shared/SelectRecipients/ClickableChip'
import { makeStyles } from '@masknet/theme'
-import { useCallback, useState, useRef, forwardRef, memo, useImperativeHandle } from 'react'
+import { useCallback, useState, useRef, forwardRef, memo, useImperativeHandle, useMemo } from 'react'
import { useChainId } from '@masknet/web3-shared-evm'
import { Trans } from 'react-i18next'
const useStyles = makeStyles()({
@@ -60,8 +60,7 @@ export const PluginEntryRender = memo(
function useSetPluginEntryRenderRef(ref: React.ForwardedRef) {
const pluginRefs = useRef>({})
- useImperativeHandle(
- ref,
+ const refItem: PluginEntryRenderRef = useMemo(
() => ({
openPlugin: function openPlugin(id: string, tryTimes = 4) {
const ref = pluginRefs.current[id]
@@ -74,13 +73,15 @@ function useSetPluginEntryRenderRef(ref: React.ForwardedRef refItem, [refItem])
const trackPluginRef = (pluginID: string) => (ref: PluginRef | null) => {
pluginRefs.current = { ...pluginRefs.current, [pluginID]: ref }
}
return [trackPluginRef]
}
function useSetPluginRef(ref: React.ForwardedRef, onClick: () => void) {
- useImperativeHandle(ref, () => ({ open: onClick }), [onClick])
+ const refItem = useMemo(() => ({ open: onClick }), [onClick])
+ useImperativeHandle(ref, () => refItem, [refItem])
}
type PluginRef = { open(): void }
diff --git a/packages/mask/src/components/CompositionDialog/TypedMessageEditor.tsx b/packages/mask/src/components/CompositionDialog/TypedMessageEditor.tsx
index d8c2b2541e77..0e1f0d9da9f5 100644
--- a/packages/mask/src/components/CompositionDialog/TypedMessageEditor.tsx
+++ b/packages/mask/src/components/CompositionDialog/TypedMessageEditor.tsx
@@ -8,7 +8,7 @@ import {
} from '@masknet/typed-message'
import { makeStyles } from '@masknet/theme'
import { InputBase, Alert, Button } from '@mui/material'
-import { useCallback, useImperativeHandle, useState, useRef, forwardRef, memo } from 'react'
+import { useCallback, useImperativeHandle, useState, useRef, forwardRef, memo, useMemo } from 'react'
import { useI18N } from '../../utils'
import { BadgeRenderer } from './BadgeRenderer'
@@ -81,30 +81,27 @@ export const TypedMessageEditor = memo(
},
[setMessage],
)
- useImperativeHandle(
- ref,
- (): TypedMessageEditorRef => {
- return {
- get estimatedLength() {
- // TODO: we should count metadata into the estimated size
- if (isTypedMessageText(currentValue.current)) return currentValue.current.content.length
- return 0
- },
- get value() {
- return currentValue.current
- },
- set value(val) {
- setMessage(val)
- },
- reset: () => setMessage(emptyMessage),
- attachMetadata(meta, data) {
- setMessage(editTypedMessageMeta(currentValue.current, (map) => map.set(meta, data)))
- },
- dropMetadata: deleteMetaID,
- }
- },
- [setMessage, deleteMetaID],
- )
+ const refItem = useMemo((): TypedMessageEditorRef => {
+ return {
+ get estimatedLength() {
+ // TODO: we should count metadata into the estimated size
+ if (isTypedMessageText(currentValue.current)) return currentValue.current.content.length
+ return 0
+ },
+ get value() {
+ return currentValue.current
+ },
+ set value(val) {
+ setMessage(val)
+ },
+ reset: () => setMessage(emptyMessage),
+ attachMetadata(meta, data) {
+ setMessage(editTypedMessageMeta(currentValue.current, (map) => map.set(meta, data)))
+ },
+ dropMetadata: deleteMetaID,
+ }
+ }, [setMessage, deleteMetaID])
+ useImperativeHandle(ref, () => refItem, [refItem])
if (!isTypedMessageText(value)) {
const reset = () => setAsText('')
diff --git a/packages/mask/src/components/shared/Image.tsx b/packages/mask/src/components/shared/Image.tsx
index 00da7a77d999..38e79eb2aedf 100644
--- a/packages/mask/src/components/shared/Image.tsx
+++ b/packages/mask/src/components/shared/Image.tsx
@@ -1,4 +1,4 @@
-import { useRef, useEffect, forwardRef, useImperativeHandle, useState } from 'react'
+import { useRef, useEffect, forwardRef, useImperativeHandle, useState, useMemo } from 'react'
import { useAsync } from 'react-use'
import Services from '../../extension/service'
import { Skeleton, SkeletonProps } from '@mui/material'
@@ -78,7 +78,8 @@ export const Image = forwardRef(function Image(props, outg
const url: string | undefined = blobURL || (typeof src === 'string' ? src : undefined)
useEffect(() => void (url && onURL?.(url)), [onURL, url])
- useImperativeHandle(outgoingRef, () => ({ canvas: canvasRef.current, img: imgRef.current }), [])
+ const outgoingRefItem = useMemo(() => ({ canvas: canvasRef.current, img: imgRef.current }), [])
+ useImperativeHandle(outgoingRef, () => outgoingRefItem, [outgoingRefItem])
// TODO: handle image loading error
const { loading, error, value } = useAsync(
diff --git a/packages/mask/src/plugins/ITO/SNSAdaptor/RegionSelect.tsx b/packages/mask/src/plugins/ITO/SNSAdaptor/RegionSelect.tsx
index b53d0080d8f9..780fe7f27453 100644
--- a/packages/mask/src/plugins/ITO/SNSAdaptor/RegionSelect.tsx
+++ b/packages/mask/src/plugins/ITO/SNSAdaptor/RegionSelect.tsx
@@ -1,4 +1,4 @@
-import { useState, useRef, useCallback, forwardRef, useImperativeHandle } from 'react'
+import { useState, useRef, useCallback, forwardRef, useImperativeHandle, useMemo } from 'react'
import type { InputBaseComponentProps } from '@mui/material'
import { makeStyles } from '@masknet/theme'
import { useDebounce } from 'react-use'
@@ -80,11 +80,15 @@ export const RegionSelect = forwardRef(({ value = [], onRegionChange, ...props }
}, [])
const [minPopoverWidth, setMinPopoverWidth] = useState(0)
- useImperativeHandle(ref, () => ({
- focus: () => {
- displayRef.current?.focus()
- },
- }))
+ const refItem = useMemo(
+ () => ({
+ focus: () => {
+ displayRef.current?.focus()
+ },
+ }),
+ [],
+ )
+ useImperativeHandle(ref, () => refItem, [refItem])
const [filterText, setFilterText] = useState('')
const [filteredRegions, setFilteredRegions] = useState(allRegions)
diff --git a/packages/mask/src/plugins/MaskPluginWrapper.tsx b/packages/mask/src/plugins/MaskPluginWrapper.tsx
index e193ca16bf5c..a029e4439a42 100644
--- a/packages/mask/src/plugins/MaskPluginWrapper.tsx
+++ b/packages/mask/src/plugins/MaskPluginWrapper.tsx
@@ -7,7 +7,13 @@ import { isTwitter } from '../social-network-adaptor/twitter.com/base'
import { usePersonaConnectStatus } from '../components/DataSource/usePersonaConnectStatus'
import { useI18N } from '../utils'
import { Box } from '@mui/system'
-import { usePluginI18NField, PluginI18NFieldRender, PluginWrapperComponent, Plugin } from '@masknet/plugin-infra'
+import {
+ usePluginI18NField,
+ PluginI18NFieldRender,
+ PluginWrapperComponent,
+ Plugin,
+ PluginWrapperMethods,
+} from '@masknet/plugin-infra'
interface PluginWrapperProps extends React.PropsWithChildren<{}> {
title: string
@@ -137,7 +143,15 @@ export const MaskPostExtraPluginWrapper: PluginWrapperComponent(false)
const [title, setTitle] = useState(undefined)
- useImperativeHandle(ref, () => ({ setWidth, setWrap: setOpen, setWrapperName: setTitle }), [])
+ const refItem = useMemo((): PluginWrapperMethods => {
+ return {
+ setWidth,
+ setWrap: setOpen,
+ setWrapperName: setTitle,
+ }
+ }, [])
+
+ useImperativeHandle(ref, () => refItem, [refItem])
if (!open) return <>{props.children}>
return (
diff --git a/packages/mask/src/social-network-adaptor/twitter.com/utils/selector.ts b/packages/mask/src/social-network-adaptor/twitter.com/utils/selector.ts
index 7382fbb7032f..f74e52a042c2 100644
--- a/packages/mask/src/social-network-adaptor/twitter.com/utils/selector.ts
+++ b/packages/mask/src/social-network-adaptor/twitter.com/utils/selector.ts
@@ -157,7 +157,7 @@ export const bioPageUserNickNameSelector = () =>
.map((x) => x.parentElement?.parentElement?.previousElementSibling)
.querySelector('div[dir]')
export const bioPageUserIDSelector = (selector: () => LiveSelector) =>
- selector().map((x) => (x.parentElement?.nextElementSibling as HTMLElement).innerText.replace('@', ''))
+ selector().map((x) => (x.parentElement?.nextElementSibling as HTMLElement)?.innerText?.replace('@', ''))
export const floatingBioCardSelector = () =>
querySelector(
'[style~="left:"] a[role=link] > div:first-child > div:first-child > div:first-child[dir="auto"]',
diff --git a/packages/plugin-infra/src/utils/createInjectHooksRenderer.tsx b/packages/plugin-infra/src/utils/createInjectHooksRenderer.tsx
index 5264eb6cfa97..2da5547361b3 100644
--- a/packages/plugin-infra/src/utils/createInjectHooksRenderer.tsx
+++ b/packages/plugin-infra/src/utils/createInjectHooksRenderer.tsx
@@ -3,7 +3,7 @@ import { ErrorBoundary } from '@masknet/shared-base-ui'
import { ShadowRootIsolation } from '@masknet/theme'
import type { Plugin } from '../types'
import { usePluginI18NField, PluginWrapperComponent, PluginWrapperMethods } from '../hooks'
-import { emptyPluginWrapperMethods, PluginWrapperMethodsContext } from '../hooks/usePluginWrapper'
+import { PluginWrapperMethodsContext } from '../hooks/usePluginWrapper'
type Inject = Plugin.InjectUI
type Raw = Plugin.InjectUIRaw
@@ -18,10 +18,12 @@ export function createInjectHooksRenderer(null)
if (PluginWrapperComponent) {
return (
- (ref === r ? void 0 : setRef(ref))}>
-
- {element}
-
+
+ {ref ? (
+
+ {element}
+
+ ) : null}
)
}
diff --git a/packages/web3-constants/evm/airdrop.json b/packages/web3-constants/evm/airdrop.json
index dea740de6813..2566ed59620b 100644
--- a/packages/web3-constants/evm/airdrop.json
+++ b/packages/web3-constants/evm/airdrop.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/artblocks.json b/packages/web3-constants/evm/artblocks.json
index 02d6db284972..4ccaffde0743 100644
--- a/packages/web3-constants/evm/artblocks.json
+++ b/packages/web3-constants/evm/artblocks.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/cryptoartai.json b/packages/web3-constants/evm/cryptoartai.json
index b6125a9d733a..89be7ea46979 100644
--- a/packages/web3-constants/evm/cryptoartai.json
+++ b/packages/web3-constants/evm/cryptoartai.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"ARTIST_ACCEPTING_BIDS_V2": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"CANFT_MARKET": {
@@ -60,6 +62,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/dhedge.json b/packages/web3-constants/evm/dhedge.json
index 9976a38f8648..beb09185c108 100644
--- a/packages/web3-constants/evm/dhedge.json
+++ b/packages/web3-constants/evm/dhedge.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"API_URL": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/explorer.json b/packages/web3-constants/evm/explorer.json
index 1f9887e08a81..cfc555c4cbac 100644
--- a/packages/web3-constants/evm/explorer.json
+++ b/packages/web3-constants/evm/explorer.json
@@ -18,6 +18,7 @@
"Fantom": ["AST4WWPNEYDURUXG2GH32JZMYWEFDP999S"],
"Aurora": [],
"Aurora_Testnet": [],
+ "Conflux": [],
"Moonbeam": []
},
"EXPLORER_API": {
@@ -39,6 +40,7 @@
"Fantom": "https://api.ftmscan.com/api",
"Aurora": "https://explorer.mainnet.aurora.dev/api",
"Aurora_Testnet": "https://explorer.testnet.aurora.dev/api",
+ "Conflux": "",
"Moonbeam": "https://api-moonbeam.moonscan.io/api?"
}
}
diff --git a/packages/web3-constants/evm/gitcoin.json b/packages/web3-constants/evm/gitcoin.json
index f0105137920c..b2349f10a986 100644
--- a/packages/web3-constants/evm/gitcoin.json
+++ b/packages/web3-constants/evm/gitcoin.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"BULK_CHECKOUT_ADDRESS": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"GITCOIN_ETH_ADDRESS": {
@@ -60,6 +62,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"GITCOIN_TIP_PERCENTAGE": {
@@ -81,6 +84,7 @@
"Fantom": 0,
"Aurora": 0,
"Aurora_Testnet": 0,
+ "Conflux": 0,
"Moonbeam": 0
}
}
diff --git a/packages/web3-constants/evm/good-ghosting.json b/packages/web3-constants/evm/good-ghosting.json
index ce65c967a2f4..517f0a3e2113 100644
--- a/packages/web3-constants/evm/good-ghosting.json
+++ b/packages/web3-constants/evm/good-ghosting.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"GOOD_GHOSTING_INCENTIVES_CONTRACT_ADDRESS": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/lbp.json b/packages/web3-constants/evm/lbp.json
index f1bd4d7f795e..beb8a2fbe6f8 100644
--- a/packages/web3-constants/evm/lbp.json
+++ b/packages/web3-constants/evm/lbp.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/mask-box.json b/packages/web3-constants/evm/mask-box.json
index 97401206bc5b..a09ecb8b7de4 100644
--- a/packages/web3-constants/evm/mask-box.json
+++ b/packages/web3-constants/evm/mask-box.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "0xf5056B96ab242C566002852d0b98ce0BcDf1af51",
"Aurora_Testnet": "0xB4D669bc117735FdA44e90e52795132187705B21",
+ "Conflux": "",
"Moonbeam": ""
},
"MASK_BOX_CONTRACT_FROM_BLOCK": {
@@ -39,6 +40,7 @@
"Fantom": 0,
"Aurora": 57259004,
"Aurora_Testnet": 77919118,
+ "Conflux": 0,
"Moonbeam": 0
}
}
diff --git a/packages/web3-constants/evm/openocean.json b/packages/web3-constants/evm/openocean.json
index f9c90534fcf8..d4eaa7552445 100644
--- a/packages/web3-constants/evm/openocean.json
+++ b/packages/web3-constants/evm/openocean.json
@@ -18,6 +18,7 @@
"Fantom": "0x934B510D4C9103E6a87AEf13b816fb080286D649",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/opensea-api.json b/packages/web3-constants/evm/opensea-api.json
index e24db6214106..b7ea1c9db9b1 100644
--- a/packages/web3-constants/evm/opensea-api.json
+++ b/packages/web3-constants/evm/opensea-api.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"GET_SINGLE_ASSET_URL": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"GET_ASSETS_URL": {
@@ -60,6 +62,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/pooltogether.json b/packages/web3-constants/evm/pooltogether.json
index e80ee0c11b0d..9fcf75cb6ff4 100644
--- a/packages/web3-constants/evm/pooltogether.json
+++ b/packages/web3-constants/evm/pooltogether.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"MASK_POOL_ADDRESS": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/savings.json b/packages/web3-constants/evm/savings.json
index 4925b89295fa..651fb2e1db11 100644
--- a/packages/web3-constants/evm/savings.json
+++ b/packages/web3-constants/evm/savings.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"LIDO_STETH": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"LIDO_REFERRAL_ADDRESS": {
@@ -60,6 +62,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/space-station-galaxy.json b/packages/web3-constants/evm/space-station-galaxy.json
index cc1bbc8a7f70..4005e8598364 100644
--- a/packages/web3-constants/evm/space-station-galaxy.json
+++ b/packages/web3-constants/evm/space-station-galaxy.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"SUBGRAPH_URL": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/packages/web3-constants/evm/trending.json b/packages/web3-constants/evm/trending.json
index 7e786339de55..67b57545c294 100644
--- a/packages/web3-constants/evm/trending.json
+++ b/packages/web3-constants/evm/trending.json
@@ -18,6 +18,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"UNISWAP_V2_HEALTH_URL": {
@@ -39,6 +40,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
},
"ETHEREUM_BLOCKS_SUBGRAPH_URL": {
@@ -60,6 +62,7 @@
"Fantom": "",
"Aurora": "",
"Aurora_Testnet": "",
+ "Conflux": "",
"Moonbeam": ""
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e7dfa2ba128d..562f36236d13 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23427,7 +23427,7 @@ packages:
safe-buffer: 5.2.1
tough-cookie: 2.5.0
tunnel-agent: 0.6.0
- uuid: 3.3.2
+ uuid: 3.4.0
dev: false
/require-directory/2.1.1: