add wallet connect plugin

add-wallet-connect
yann300 2 years ago
parent 8510fc2544
commit c0715053f6
  1. 13
      apps/wallet-connect/.babelrc
  2. 16
      apps/wallet-connect/.browserslistrc
  3. 18
      apps/wallet-connect/.eslintrc
  4. 169
      apps/wallet-connect/src/app/RemixClient.ts
  5. 13
      apps/wallet-connect/src/app/app.css
  6. 97
      apps/wallet-connect/src/app/app.tsx
  7. 1
      apps/wallet-connect/src/app/logo.svg
  8. 11
      apps/wallet-connect/src/app/star.svg
  9. 0
      apps/wallet-connect/src/assets/.gitkeep
  10. 3
      apps/wallet-connect/src/environments/environment.prod.ts
  11. 6
      apps/wallet-connect/src/environments/environment.ts
  12. BIN
      apps/wallet-connect/src/favicon.ico
  13. 14
      apps/wallet-connect/src/index.html
  14. 7
      apps/wallet-connect/src/main.tsx
  15. 7
      apps/wallet-connect/src/polyfills.ts
  16. 1
      apps/wallet-connect/src/styles.css
  17. 14
      apps/wallet-connect/tsconfig.app.json
  18. 18
      apps/wallet-connect/tsconfig.json
  19. 42
      nx.json
  20. 9
      package.json
  21. 499
      workspace.json
  22. 2735
      yarn.lock

@ -0,0 +1,13 @@
{
"presets": [
[
"@nrwl/react/babel", {
"runtime": "automatic"
}
]
],
"plugins": [
]
}

@ -0,0 +1,16 @@
# This file is used by:
# 1. autoprefixer to adjust CSS to support the below specified browsers
# 2. babel preset-env to adjust included polyfills
#
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
#
# If you need to support different browsers in production, you may tweak the list below.
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major version
last 2 iOS major versions
Firefox ESR
not IE 9-11 # For IE 9-11 support, remove 'not'.

@ -0,0 +1,18 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": "../../.eslintrc.json",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
},
"rules": {
"standard/no-callback-literal": "off"
}
}

@ -0,0 +1,169 @@
import {
PluginClient
} from '@remixproject/plugin';
import {
createClient
} from '@remixproject/plugin-webview';
import WalletConnectProvider from "@walletconnect/web3-provider";
import Torus from "@toruslabs/torus-embed";
import Authereum from "authereum";
import Web3Modal, { local } from "web3modal";
import BurnerConnectProvider from "@burner-wallet/burner-connect-provider";
import MewConnect from "@myetherwallet/mewconnect-web-client";
import EventManager from "events"
export const INFURA_ID_KEY = 'INFURA_ID_KEY'
export class RemixClient extends PluginClient {
provider: any
web3Modal: Web3Modal
internalEvents: EventManager
infuraId: string
constructor() {
super();
createClient(this);
this.methods = ["sendAsync"];
this.internalEvents = new EventManager()
this.infuraId = ''
this.onload()
}
/**
* Connect wallet button pressed.
*/
async onConnect(infuraId: string) {
// set infura id
this.infuraId = infuraId
try {
this.web3Modal = new Web3Modal({
providerOptions: this.getProviderOptions() // required
})
this.provider = await this.web3Modal.connect();
} catch (e) {
console.error("Could not get a wallet connection", e);
return;
}
this.internalEvents.emit('accountsChanged', this.provider.accounts || [])
this.internalEvents.emit('chainChanged', await this.detectNetwork(this.provider.chainId))
// Subscribe to accounts change
this.provider.on("accountsChanged", (accounts: Array<string>) => {
this.internalEvents.emit('accountsChanged', accounts || [])
});
// Subscribe to chainId change
this.provider.on("chainChanged", async (chainId: string) => {
this.internalEvents.emit('chainChanged', await this.detectNetwork(chainId))
});
// Subscribe to networkId change
this.provider.on("networkChanged", (networkId: string) => {
this.internalEvents.emit('networkChanged', networkId)
});
// Subscribe to networkId change
this.provider.on("disconnect", () => {
this.internalEvents.emit('disconnect')
});
}
async detectNetwork(id: string) {
let networkName = null;
let idNumber = parseInt(id)
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
if (idNumber === 1) networkName = "Main";
else if (idNumber === 2) networkName = "Morden (deprecated)";
else if (idNumber === 3) networkName = "Ropsten";
else if (idNumber === 4) networkName = "Rinkeby";
else if (idNumber === 5) networkName = "Goerli";
else if (idNumber === 42) networkName = "Kovan";
else networkName = "Custom";
return networkName
}
getInfuraId () {
return this.infuraId
}
/**
* Disconnect wallet button pressed.
*/
async onDisconnect() {
// TODO: Which providers have close method?
if (this.provider && this.provider.close) {
await this.provider.close();
// If the cached provider is not cleared,
// WalletConnect will default to the existing session
// and does not allow to re-scan the QR code with a new wallet.
// Depending on your use case you may want or want not his behavir.
await this.web3Modal.clearCachedProvider();
this.provider = null;
} else {
this.internalEvents.emit('disconnect')
}
this.web3Modal = null
}
getProviderOptions() {
const providerOptions = {
walletconnect: {
package: WalletConnectProvider,
options: {
infuraId: this.getInfuraId(),
bridge: 'https://wallet-connect-bridge.dyn.plugin.remixproject.org:8080/'
}
},
torus: {
package: Torus, // required
options: {}
},
authereum: {
package: Authereum
},
burnerconnect: {
package: BurnerConnectProvider, // required
options: {
defaultNetwork: "100"
}
},
mewconnect: {
package: MewConnect, // required
options: {
infuraId: this.getInfuraId() // required
}
}
};
return providerOptions;
};
sendAsync = (data: any) => {
return new Promise(async (resolve, reject) => {
if (this.provider) {
this.provider.sendAsync(data, (error: any, message: any) => {
if (error) return reject(error)
resolve(message)
})
} else {
const infuraKey = window.localStorage.getItem(INFURA_ID_KEY)
if (infuraKey) {
await this.onConnect(infuraKey)
if (this.provider) {
this.provider.sendAsync(data, (error: any, message: any) => {
if (error) return reject(error)
resolve(message)
})
} else {
resolve({"jsonrpc": "2.0", "result": [], "id": data.id})
}
} else {
resolve({"jsonrpc": "2.0", "result": [], "id": data.id})
}
}
})
}
}

@ -0,0 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

@ -0,0 +1,97 @@
import React, { useState } from 'react';
import './app.css';
import '@fortawesome/fontawesome-free/css/all.css'
import { RemixClient, INFURA_ID_KEY } from './RemixClient'
const p = new RemixClient()
function App() {
const [connected, setConnected] = useState(false)
const [accounts, setAccounts] = useState<Array<string>>([])
const [chainId, setChainId] = useState(' - ')
const [infuraId, setinfuraId] = useLocalStorage(
INFURA_ID_KEY,
''
);
const openModal = () => {
p.onConnect(infuraId)
}
const disconnect = () => {
p.onDisconnect()
}
p.internalEvents.on('accountsChanged', (accounts: Array<string>) => {
setAccounts(accounts)
})
p.internalEvents.on('chainChanged', (chain: string) => {
setChainId(chain)
setConnected(true)
})
p.internalEvents.on('disconnect', () => {
setChainId(' - ')
setAccounts([])
setConnected(false)
})
return (
<div className="App">
<div className="btn-group-vertical mt-5 w-25" role="group">
<div className="text-center w-100">
<i className="fas fa-info-circle mr-2 bg-light" title="Wallet connect requires an Infura ID in order to make a request to the network."/><a target="_blank" href="https://infura.io/dashboard/ethereum">INFURA settings</a>
<input value={infuraId} onChange={(e) => { setinfuraId(e.target.value)}} id="input-infura-id" placeholder="Please provide an Infura ID" className="form-control mt-2 mb-2"></input>
{!connected && <button disabled={!infuraId} id="connectbtn" type="button" onClick={openModal} className="btn btn-primary w-100">Connect to a wallet</button>}
{connected && <button id="disconnectbtn" type="button" onClick={disconnect} className="btn btn-primary mt-2 w-100">Disconnect</button>}
</div>
</div>
<div id='accounts-container'>
<div><label><b>Accounts: </b></label><br></br><ul className="list-group list-group-flush" id="accounts">
{accounts.map((account) => {
return (
<li className="list-group-item">${account}</li>
)
})}
</ul></div>
<div><label><b>Network: </b></label><label className="ml-1" id="chain">{chainId}</label></div>
</div>
</div>
);
}
export default App;
export const useLocalStorage = (key: string, initialValue: any) => {
// State to store our value
// Pass initial state function to useState so logic is only executed once
const [storedValue, setStoredValue] = useState(() => {
try {
// Get from local storage by key
const item = window.localStorage.getItem(key);
// Parse stored json or if none return initialValue
return item ? JSON.parse(item) : initialValue;
} catch (error) {
// If error also return initialValue
return initialValue;
}
});
// Return a wrapped version of useState's setter function that ...
// ... persists the new value to localStorage.
const setValue = (value: any) => {
try {
// Allow value to be a function so we have same API as useState
const valueToStore =
value instanceof Function ? value(storedValue) : value;
// Save state
setStoredValue(valueToStore);
// Save to local storage
window.localStorage.setItem(key, JSON.stringify(valueToStore));
} catch (error) {
// A more advanced implementation would handle the error case
}
};
return [storedValue, setValue];
}

@ -0,0 +1 @@
<svg id="Ebene_2" data-name="Ebene 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 100"><title>remix_logo1</title><path d="M91.84,35a.09.09,0,0,1-.1-.07,41,41,0,0,0-79.48,0,.09.09,0,0,1-.1.07C9.45,35,1,35.35,1,42.53c0,8.56,1,16,6,20.32,2.16,1.85,5.81,2.3,9.27,2.22a44.4,44.4,0,0,0,6.45-.68.09.09,0,0,0,.06-.15A34.81,34.81,0,0,1,17,45c0-.1,0-.21,0-.31a35,35,0,0,1,70,0c0,.1,0,.21,0,.31a34.81,34.81,0,0,1-5.78,19.24.09.09,0,0,0,.06.15,44.4,44.4,0,0,0,6.45.68c3.46.08,7.11-.37,9.27-2.22,5-4.27,6-11.76,6-20.32C103,35.35,94.55,35,91.84,35Z"/><path d="M52,74,25.4,65.13a.1.1,0,0,0-.1.17L51.93,91.93a.1.1,0,0,0,.14,0L78.7,65.3a.1.1,0,0,0-.1-.17L52,74A.06.06,0,0,1,52,74Z"/><path d="M75.68,46.9,82,45a.09.09,0,0,0,.08-.09,29.91,29.91,0,0,0-.87-6.94.11.11,0,0,0-.09-.08l-6.43-.58a.1.1,0,0,1-.06-.18l4.78-4.18a.13.13,0,0,0,0-.12,30.19,30.19,0,0,0-3.65-6.07.09.09,0,0,0-.11,0l-5.91,2a.1.1,0,0,1-.12-.14L72.19,23a.11.11,0,0,0,0-.12,29.86,29.86,0,0,0-5.84-4.13.09.09,0,0,0-.11,0l-4.47,4.13a.1.1,0,0,1-.17-.07l.09-6a.1.1,0,0,0-.07-.1,30.54,30.54,0,0,0-7-1.47.1.1,0,0,0-.1.07l-2.38,5.54a.1.1,0,0,1-.18,0l-2.37-5.54a.11.11,0,0,0-.11-.06,30,30,0,0,0-7,1.48.12.12,0,0,0-.07.1l.08,6.05a.09.09,0,0,1-.16.07L37.8,18.76a.11.11,0,0,0-.12,0,29.75,29.75,0,0,0-5.83,4.13.11.11,0,0,0,0,.12l2.59,5.6a.11.11,0,0,1-.13.14l-5.9-2a.11.11,0,0,0-.12,0,30.23,30.23,0,0,0-3.62,6.08.11.11,0,0,0,0,.12l4.79,4.19a.1.1,0,0,1-.06.17L23,37.91a.1.1,0,0,0-.09.07A29.9,29.9,0,0,0,22,44.92a.1.1,0,0,0,.07.1L28.4,47a.1.1,0,0,1,0,.18l-5.84,3.26a.16.16,0,0,0,0,.11,30.17,30.17,0,0,0,2.1,6.76c.32.71.67,1.4,1,2.08a.1.1,0,0,0,.06,0L52,68.16H52l26.34-8.78a.1.1,0,0,0,.06-.05,30.48,30.48,0,0,0,3.11-8.88.1.1,0,0,0-.05-.11l-5.83-3.26A.1.1,0,0,1,75.68,46.9Z"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg
className="material-icons"
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
>
<path d="M0 0h24v24H0z" fill="none" />
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" />
</svg>

After

Width:  |  Height:  |  Size: 347 B

@ -0,0 +1,3 @@
export const environment = {
production: true
};

@ -0,0 +1,6 @@
// This file can be replaced during build by using the `fileReplacements` array.
// When building for production, this file is replaced with `environment.prod.ts`.
export const environment = {
production: false
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>WalletConnect</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<div id="root"></div>
</body>
</html>

@ -0,0 +1,7 @@
import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom';
import App from './app/app';
ReactDOM.render(<StrictMode><App /></StrictMode>, document.getElementById('root'));

@ -0,0 +1,7 @@
/**
* Polyfill stable language features. These imports will be optimized by `@babel/preset-env`.
*
* See: https://github.com/zloirock/core-js#babel
*/
import 'core-js/stable';
import 'regenerator-runtime/runtime';

@ -0,0 +1 @@
/* You can add global styles to this file, and also import other style files */

@ -0,0 +1,14 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node"]
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": ["**/*.spec.ts", "**/*.spec.tsx"],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}

@ -0,0 +1,18 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"jsx": "react",
"allowJs": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"types": ["node", "jest"],
"resolveJsonModule": true
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.app.json"
}
]
}

@ -15,7 +15,12 @@
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
"cacheableOperations": [
"build",
"lint",
"test",
"e2e"
]
}
}
},
@ -25,27 +30,43 @@
},
"remix-astwalker": {
"tags": [],
"implicitDependencies": ["remix-lib"]
"implicitDependencies": [
"remix-lib"
]
},
"remix-analyzer": {
"tags": [],
"implicitDependencies": ["remix-astwalker", "remix-lib"]
"implicitDependencies": [
"remix-astwalker",
"remix-lib"
]
},
"remix-debug": {
"tags": [],
"implicitDependencies": ["remix-astwalker", "remix-lib"]
"implicitDependencies": [
"remix-astwalker",
"remix-lib"
]
},
"remix-simulator": {
"tags": [],
"implicitDependencies": ["remix-lib"]
"implicitDependencies": [
"remix-lib"
]
},
"remix-solidity": {
"tags": [],
"implicitDependencies": ["remix-lib"]
"implicitDependencies": [
"remix-lib"
]
},
"remix-tests": {
"tags": [],
"implicitDependencies": ["remix-lib", "remix-simulator", "remix-solidity"]
"implicitDependencies": [
"remix-lib",
"remix-simulator",
"remix-solidity"
]
},
"remix-url-resolver": {
"tags": []
@ -69,7 +90,9 @@
},
"remix-ide-e2e": {
"tags": [],
"implicitDependencies": ["remix-ide"]
"implicitDependencies": [
"remix-ide"
]
},
"remixd": {
"tags": []
@ -172,6 +195,9 @@
},
"remix-ui-tooltip-popup": {
"tags": []
},
"wallet-connect": {
"tags": []
}
},
"targetDependencies": {

@ -146,6 +146,7 @@
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@burner-wallet/burner-connect-provider": "^0.1.1",
"@erebos/bzz-node": "^0.13.0",
"@ethereumjs/block": "^3.5.1",
"@ethereumjs/common": "^2.5.0",
@ -154,6 +155,7 @@
"@ethersphere/bee-js": "^3.2.0",
"@isomorphic-git/lightning-fs": "^4.4.1",
"@monaco-editor/react": "^4.3.1",
"@myetherwallet/mewconnect-web-client": "^2.2.0-beta.16",
"@remixproject/engine": "^0.3.31",
"@remixproject/engine-web": "^0.3.31",
"@remixproject/plugin": "^0.3.31",
@ -161,8 +163,11 @@
"@remixproject/plugin-utils": "^0.3.31",
"@remixproject/plugin-webview": "^0.3.31",
"@remixproject/plugin-ws": "^0.3.31",
"@toruslabs/torus-embed": "^1.27.0",
"@walletconnect/web3-provider": "^1.7.8",
"ansi-gray": "^0.1.1",
"async": "^2.6.2",
"authereum": "^0.1.14",
"axios": ">=0.26.0",
"bootstrap": "^5.1.3",
"brace": "^0.8.0",
@ -210,6 +215,7 @@
"ts-loader": "^9.2.6",
"tslib": "^2.3.0",
"web3": "^1.5.1",
"web3modal": "^1.9.8",
"winston": "^3.3.3",
"ws": "^7.3.0"
},
@ -333,5 +339,8 @@
"worker-loader": "^2.0.0",
"yo-yo": "github:ioedeveloper/yo-yo",
"yo-yoify": "^3.7.3"
},
"browser": {
"crypto": false
}
}

@ -1,5 +1,37 @@
{
"version": 1,
"cli": {
"defaultCollection": "@nrwl/react"
},
"defaultProject": "remix-ide",
"schematics": {
"@nrwl/workspace": {
"library": {
"linter": "eslint"
}
},
"@nrwl/react": {
"application": {
"style": "css",
"linter": "eslint",
"strict": true,
"babel": true
},
"component": {
"style": "css"
},
"library": {
"style": "css",
"linter": "eslint",
"strict": true
}
},
"@nrwl/nx-plugin": {
"plugin": {
"linter": "eslint"
}
}
},
"projects": {
"remix-ide": {
"root": "apps/remix-ide",
@ -75,7 +107,9 @@
"options": {
"linter": "eslint",
"config": "apps/remix-ide/.eslintrc",
"files": ["apps/remix-ide/src/**/*.js"],
"files": [
"apps/remix-ide/src/**/*.js"
],
"exclude": [
"**/node_modules/**",
"apps/remix-ide/src/app/editor/mode-solidity.js",
@ -94,8 +128,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["apps/remix-ide-e2e/tsconfig.e2e.json"],
"exclude": ["**/node_modules/**", "!apps/remix-ide-e2e/**/*"]
"tsConfig": [
"apps/remix-ide-e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**",
"!apps/remix-ide-e2e/**/*"
]
}
}
}
@ -111,14 +150,21 @@
"options": {
"linter": "eslint",
"config": "libs/remix-analyzer/.eslintrc",
"tsConfig": ["libs/remix-analyzer/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "libs/remix-analyzer/test/**/*"]
"tsConfig": [
"libs/remix-analyzer/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-analyzer/test/**/*"
]
}
},
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["./../../node_modules/.bin/npm-run-all test"],
"commands": [
"./../../node_modules/.bin/npm-run-all test"
],
"cwd": "libs/remix-analyzer"
}
},
@ -129,7 +175,9 @@
"tsConfig": "libs/remix-analyzer/tsconfig.lib.json",
"packageJson": "libs/remix-analyzer/package.json",
"main": "libs/remix-analyzer/src/index.ts",
"assets": ["libs/remix-analyzer/*.md"]
"assets": [
"libs/remix-analyzer/*.md"
]
}
}
}
@ -145,14 +193,21 @@
"options": {
"linter": "eslint",
"config": "libs/remix-astwalker/.eslintrc",
"tsConfig": ["libs/remix-astwalker/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "libs/remix-astwalker/tests/**/*"]
"tsConfig": [
"libs/remix-astwalker/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-astwalker/tests/**/*"
]
}
},
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["./../../node_modules/.bin/npm-run-all test"],
"commands": [
"./../../node_modules/.bin/npm-run-all test"
],
"cwd": "libs/remix-astwalker"
}
},
@ -163,7 +218,9 @@
"tsConfig": "libs/remix-astwalker/tsconfig.lib.json",
"packageJson": "libs/remix-astwalker/package.json",
"main": "libs/remix-astwalker/src/index.ts",
"assets": ["libs/remix-astwalker/*.md"]
"assets": [
"libs/remix-astwalker/*.md"
]
}
}
}
@ -179,14 +236,21 @@
"options": {
"linter": "eslint",
"config": "libs/remix-debug/.eslintrc",
"tsConfig": ["libs/remix-debug/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "libs/remix-debug/test/**/*"]
"tsConfig": [
"libs/remix-debug/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-debug/test/**/*"
]
}
},
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["./../../node_modules/.bin/npm-run-all test"],
"commands": [
"./../../node_modules/.bin/npm-run-all test"
],
"cwd": "libs/remix-debug"
}
},
@ -224,14 +288,21 @@
"options": {
"linter": "eslint",
"config": "libs/remix-lib/.eslintrc",
"tsConfig": ["libs/remix-lib/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "libs/remix-lib/test/**/*"]
"tsConfig": [
"libs/remix-lib/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-lib/test/**/*"
]
}
},
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["./../../node_modules/.bin/npm-run-all test"],
"commands": [
"./../../node_modules/.bin/npm-run-all test"
],
"cwd": "libs/remix-lib"
}
},
@ -242,7 +313,9 @@
"tsConfig": "libs/remix-lib/tsconfig.lib.json",
"packageJson": "libs/remix-lib/package.json",
"main": "libs/remix-lib/src/index.ts",
"assets": ["libs/remix-lib/*.md"]
"assets": [
"libs/remix-lib/*.md"
]
}
}
}
@ -258,14 +331,21 @@
"options": {
"linter": "eslint",
"config": "libs/remix-simulator/.eslintrc",
"tsConfig": ["libs/remix-simulator/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "libs/remix-simulator/test/**/*"]
"tsConfig": [
"libs/remix-simulator/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-simulator/test/**/*"
]
}
},
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["./../../node_modules/.bin/npm-run-all test"],
"commands": [
"./../../node_modules/.bin/npm-run-all test"
],
"cwd": "libs/remix-simulator"
}
},
@ -303,8 +383,12 @@
"options": {
"linter": "eslint",
"config": "libs/remix-solidity/.eslintrc",
"tsConfig": ["libs/remix-solidity/tsconfig.lib.json"],
"exclude": ["**/node_modules/**"]
"tsConfig": [
"libs/remix-solidity/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"test": {
@ -321,7 +405,9 @@
"tsConfig": "libs/remix-solidity/tsconfig.lib.json",
"packageJson": "libs/remix-solidity/package.json",
"main": "libs/remix-solidity/src/index.ts",
"assets": ["libs/remix-solidity/*.md"]
"assets": [
"libs/remix-solidity/*.md"
]
}
}
}
@ -337,7 +423,9 @@
"options": {
"linter": "eslint",
"config": "libs/remix-tests/.eslintrc",
"tsConfig": ["libs/remix-tests/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-tests/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-tests/tests/**/*",
@ -386,7 +474,9 @@
"options": {
"linter": "eslint",
"config": "libs/remix-url-resolver/.eslintrc",
"tsConfig": ["libs/remix-url-resolver/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-url-resolver/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-url-resolver/tests/**/*"
@ -396,7 +486,9 @@
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["./../../node_modules/.bin/npm-run-all test"],
"commands": [
"./../../node_modules/.bin/npm-run-all test"
],
"cwd": "libs/remix-url-resolver"
}
},
@ -407,7 +499,9 @@
"tsConfig": "libs/remix-url-resolver/tsconfig.lib.json",
"packageJson": "libs/remix-url-resolver/package.json",
"main": "libs/remix-url-resolver/src/index.ts",
"assets": ["libs/remix-url-resolver/*.md"]
"assets": [
"libs/remix-url-resolver/*.md"
]
}
}
}
@ -426,7 +520,10 @@
"libs/remixd/tsconfig.lib.json",
"libs/remixd/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**", "!libs/remixd/**/*"]
"exclude": [
"**/node_modules/**",
"!libs/remixd/**/*"
]
}
},
"test": {
@ -444,7 +541,10 @@
"tsConfig": "libs/remixd/tsconfig.lib.json",
"packageJson": "libs/remixd/package.json",
"main": "libs/remixd/src/index.ts",
"assets": ["libs/remixd/*.md", "libs/remixd/src/origins.json"]
"assets": [
"libs/remixd/*.md",
"libs/remixd/src/origins.json"
]
}
}
}
@ -463,7 +563,10 @@
"libs/remix-ui/tree-view/tsconfig.lib.json",
"libs/remix-ui/tree-view/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**", "!libs/remix-ui/tree-view/**/*"]
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/tree-view/**/*"
]
}
},
"test": {
@ -490,7 +593,10 @@
"libs/remix-ui/debugger-ui/tsconfig.lib.json",
"libs/remix-ui/debugger-ui/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**", "!libs/remix-ui/debugger-ui/**/*"]
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/debugger-ui/**/*"
]
}
},
"test": {
@ -517,7 +623,10 @@
"libs/remix-ui/utils/tsconfig.lib.json",
"libs/remix-ui/utils/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**", "!libs/remix-ui/utils/**/*"]
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/utils/**/*"
]
}
},
"test": {
@ -544,7 +653,10 @@
"libs/remix-ui/clipboard/tsconfig.lib.json",
"libs/remix-ui/clipboard/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**", "!libs/remix-ui/clipboard/**/*"]
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/clipboard/**/*"
]
}
},
"test": {
@ -597,8 +709,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/toaster/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/toaster/**/*"]
"tsConfig": [
"libs/remix-ui/toaster/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/toaster/**/*"
]
}
}
}
@ -666,8 +783,13 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["apps/debugger/tsconfig.app.json"],
"exclude": ["**/node_modules/**", "!apps/debugger/**/*"]
"tsConfig": [
"apps/debugger/tsconfig.app.json"
],
"exclude": [
"**/node_modules/**",
"!apps/debugger/**/*"
]
}
}
}
@ -682,8 +804,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/workspace/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/workspace/**/*"]
"tsConfig": [
"libs/remix-ui/workspace/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/workspace/**/*"
]
}
}
}
@ -698,8 +825,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/settings/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/settings/**/*"]
"tsConfig": [
"libs/remix-ui/settings/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/settings/**/*"
]
}
}
}
@ -714,7 +846,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/static-analyser/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/static-analyser/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/static-analyser/**/*"
@ -733,8 +867,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/checkbox/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/checkbox/**/*"]
"tsConfig": [
"libs/remix-ui/checkbox/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/checkbox/**/*"
]
}
}
}
@ -749,8 +888,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/terminal/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/terminal/**/*"]
"tsConfig": [
"libs/remix-ui/terminal/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/terminal/**/*"
]
}
}
}
@ -765,7 +909,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/plugin-manager/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/plugin-manager/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/plugin-manager/**/*"
@ -784,8 +930,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-core-plugin/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-core-plugin/**/*"]
"tsConfig": [
"libs/remix-core-plugin/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-core-plugin/**/*"
]
}
},
"build": {
@ -809,7 +960,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/solidity-compiler/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/solidity-compiler/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/solidity-compiler/**/*"
@ -828,7 +981,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/publish-to-storage/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/publish-to-storage/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/publish-to-storage/**/*"
@ -847,8 +1002,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/renderer/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/renderer/**/*"]
"tsConfig": [
"libs/remix-ui/renderer/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/renderer/**/*"
]
}
}
}
@ -872,7 +1032,9 @@
"apps/solidity-compiler/src/assets",
"apps/solidity-compiler/src/index.html"
],
"styles": ["apps/solidity-compiler/src/styles.css"],
"styles": [
"apps/solidity-compiler/src/styles.css"
],
"scripts": [],
"webpackConfig": "apps/solidity-compiler/webpack.config.js",
"maxWorkers": 2
@ -917,8 +1079,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["apps/solidity-compiler/tsconfig.app.json"],
"exclude": ["**/node_modules/**", "!apps/solidity-compiler/**/*"]
"tsConfig": [
"apps/solidity-compiler/tsconfig.app.json"
],
"exclude": [
"**/node_modules/**",
"!apps/solidity-compiler/**/*"
]
}
}
}
@ -941,7 +1108,9 @@
"apps/remix-ide-e2e/src/local-plugin/src/favicon.ico",
"apps/remix-ide-e2e/src/local-plugin/src/assets"
],
"styles": ["apps/remix-ide-e2e/src/local-plugin/src/styles.css"],
"styles": [
"apps/remix-ide-e2e/src/local-plugin/src/styles.css"
],
"scripts": [],
"webpackConfig": "@nrwl/react/plugins/webpack"
},
@ -1007,8 +1176,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/home-tab/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/home-tab/**/*"]
"tsConfig": [
"libs/remix-ui/home-tab/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/home-tab/**/*"
]
}
}
}
@ -1023,8 +1197,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/editor/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/editor/**/*"]
"tsConfig": [
"libs/remix-ui/editor/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/editor/**/*"
]
}
}
}
@ -1038,8 +1217,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/editor/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/editor/**/*"]
"tsConfig": [
"libs/remix-ui/editor/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/editor/**/*"
]
}
}
}
@ -1054,8 +1238,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/app/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/app/**/*"]
"tsConfig": [
"libs/remix-ui/app/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/app/**/*"
]
}
}
}
@ -1070,8 +1259,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/helper/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/helper/**/*"]
"tsConfig": [
"libs/remix-ui/helper/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/helper/**/*"
]
}
}
}
@ -1085,8 +1279,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/tabs/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/tabs/**/*"]
"tsConfig": [
"libs/remix-ui/tabs/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/tabs/**/*"
]
}
}
}
@ -1120,8 +1319,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/search/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/search/**/*"]
"tsConfig": [
"libs/remix-ui/search/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/search/**/*"
]
}
}
}
@ -1135,8 +1339,13 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/panel/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/panel/**/*"]
"tsConfig": [
"libs/remix-ui/panel/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/panel/**/*"
]
}
}
}
@ -1170,7 +1379,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/editor-context-view/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/editor-context-view/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/editor-context-view/**/*"
@ -1188,7 +1399,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/run-tab/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/run-tab/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-ui/run-tab/**/*.d.ts",
@ -1207,7 +1420,9 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/permission-handler/tsconfig.lib.json"],
"tsConfig": [
"libs/remix-ui/permission-handler/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"libs/remix-ui/permission-handler/**/*.d.ts",
@ -1227,8 +1442,12 @@
"options": {
"linter": "eslint",
"config": "libs/remix-ws-templates/.eslintrc",
"tsConfig": ["libs/remix-ws-templates/tsconfig.lib.json"],
"exclude": ["**/node_modules/**"]
"tsConfig": [
"libs/remix-ws-templates/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"build": {
@ -1241,7 +1460,9 @@
"assets": [
{
"glob": "templates/**/*",
"ignore": ["templates/**/*/index.ts"],
"ignore": [
"templates/**/*/index.ts"
],
"input": "libs/remix-ws-templates/src/",
"output": "src/"
},
@ -1265,41 +1486,95 @@
"options": {
"linter": "eslint",
"config": "libs/remix-ui/tooltip-popup/.eslintrc.json",
"tsConfig": ["libs/remix-ui/tooltip-popup/tsconfig.lib.json"],
"exclude": ["**/node_modules/**"]
"tsConfig": [
"libs/remix-ui/tooltip-popup/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"cli": {
"defaultCollection": "@nrwl/react"
},
"schematics": {
"@nrwl/workspace": {
"library": {
"linter": "eslint"
}
},
"@nrwl/react": {
"application": {
"style": "css",
"linter": "eslint",
"babel": true
},
"component": {
"style": "css"
},
"library": {
"style": "css",
"linter": "eslint"
}
},
"@nrwl/nx-plugin": {
"plugin": {
"linter": "eslint"
"wallet-connect": {
"root": "apps/wallet-connect",
"sourceRoot": "apps/wallet-connect/src",
"projectType": "application",
"architect": {
"build": {
"builder": "@nrwl/web:build",
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/apps/wallet-connect",
"index": "apps/wallet-connect/src/index.html",
"main": "apps/wallet-connect/src/main.tsx",
"polyfills": "apps/wallet-connect/src/polyfills.ts",
"tsConfig": "apps/wallet-connect/tsconfig.app.json",
"assets": [
"apps/wallet-connect/src/favicon.ico",
"apps/wallet-connect/src/assets"
],
"styles": [
"apps/wallet-connect/src/styles.css"
],
"scripts": [],
"webpackConfig": "@nrwl/react/plugins/webpack"
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/wallet-connect/src/environments/environment.ts",
"with": "apps/wallet-connect/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
}
]
}
}
},
"serve": {
"builder": "@nrwl/web:dev-server",
"options": {
"buildTarget": "wallet-connect:build",
"hmr": true
},
"configurations": {
"production": {
"buildTarget": "wallet-connect:build:production",
"hmr": false
}
}
},
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "apps/wallet-connect/.eslintrc",
"files": [
"apps/wallet-connect/src/**/*.js",
"apps/wallet-connect/src/**/*.ts"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "remix-ide"
}
}
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save