diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 7134590..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ '*' ] - pull_request: - branches: [ master ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '12.16' - - # Runs a set of commands using the runners shell - - name: yarn install, yarn lint, yarn build - run: | - yarn install - yarn lint - yarn build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..026a0a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:12 + +WORKDIR /plugin + +COPY package.json . +COPY lerna.json . +COPY yarn.lock . +COPY tsconfig.json . +COPY my-plugin/package.json ./my-plugin/ +COPY wallet/package.json ./wallet/ +RUN yarn install + +COPY ./my-plugin ./my-plugin +RUN yarn build + +COPY ./wallet ./wallet diff --git a/README.md b/README.md index 08217ed..46908d4 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,58 @@ -# Sample Burner Wallet 2 Plugin +# TokenBridge Burner Wallet 2 Plugin Sample -This repo provides a boilerplate for building a new plugin for the Burner Wallet 2. +This sample plugin defines a mediator extension exchange pair to be used in the Exchange Plugin in the burner wallet. +It uses the resources from the `tokenbridge-plugin` package to define new assets and exchange pairs. -## Setup +### Clone the sample repo +Clone the sample repo to create a plugin project that uses the TokenBridge plugin. This sample repo containes a ready to publish plugin for a ERC677 to ERC677 bridge extension, but you can later modify it to define your own resources. -1. Clone the repo -2. Run `yarn install`. This repo uses Lerna and Yarn Workspaces, so `yarn install` will install - all dependencies and link modules in the repo -3. To connect to mainnet & most testnets, you'll need to provide an Infura key. Create a file - named `.env` in the `basic-wallet` folder and set the contents to `REACT_APP_INFURA_KEY=` -4. Run `yarn start-local` to start the wallet while connected to Ganache, or run `yarn start-basic` - to start the wallet connected to Mainnet & xDai +#### Project structure +There are two main folders in the project: +- `wallet` - is a burner wallet instance ready to test your plugin +- `my-plugin` - is the folder where the plugin code is located. To change the name of the plugin it is necessary to update the folder name `my-plugin` and all mentions to `my-plugin` to the new name of your plugin. -## Renaming the plugin +Inside `my-plugin` you can find the files that defines the resources to be exposed by the plugin to be used by the burner wallet in order to interact with the ERC677 to ERC677 bridge extension: +- `sUSD` - extends from `ERC677Asset` defined in `tokenbridge-plugin` +- `xsUSD` - extends from `ERC677Asset` defined in `tokenbridge-plugin` +- `SUSDBridge` - extends from `Mediator` defined in `tokenbridge-plugin` -To rename the plugin from "MyPlugin" to your own plugin name, you must update the following locations: +You can extend or replace these resources based on your use case. -1. Rename the `my-plugin` directory -2. Change `my-plugin` in `lerna.json` and the root `package.json` -3. Change the name field in `package.json` in your plugin's `package.json` file -4. Rename `MyPlugin.ts` -5. Change `MyPlugin.js` and `MyPlugin.d.ts` in the plugin `package.json` file -6. Change the class name in the main plugin file -7. Change rename `my-plugin` dependency in `basic-wallet/package.json` & `local-wallet/package.json` -8. In `basic-wallet/src/index.tsx` and `local-wallet/src/index.tsx`, update the import - `import MyPlugin from 'my-plugin';` as well as the `new MyPlugin()` constructor. -9. Finally, run `yarn install` in the root to re-link the packages +### Install dependencies +Run `yarn install`. This repo uses Lerna and Yarn Workspaces, so `yarn install` will install all dependencies and link modules in the repo. + +### Build +To build the plugin package, from the root folder of project, you need to run the following command: +``` +yarn build +``` + +### Test +The project includes a burner wallet instance where you can test the implementation of the plugin. For that, you have to make sure that the build step was performed and that the plugin resources you modified are correctly imported and used in the `src/index.tsx` file of the `wallet` folder. + +1. Create `.env` file in `wallet` folder and set: +``` +REACT_APP_INFURA_KEY= +``` + +2. To start the burner wallet instances run: +``` +yarn start-wallet +``` + +### Publish to npm +In order to make the plugin accessible it needs to be published in the npm registry. For that, you can follow these steps: + +1. Create account in https://www.npmjs.com/ + +2. Go to `my-plugin` folder + +3. Run `yarn build`. Make sure it generates the `dist` folder + +4. Update `version` in `my-plugin/package.json` + +5. Run `yarn publish` and fill login information if required. +The prompt will ask for the new version, complete it with the version from `my-plugin/package.json` + + +More information in https://classic.yarnpkg.com/en/docs/publishing-a-package/ diff --git a/amb-mediator/src/AmbMediator.ts b/amb-mediator/src/AmbMediator.ts deleted file mode 100644 index fcd7ad8..0000000 --- a/amb-mediator/src/AmbMediator.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BurnerPluginContext, Plugin } from '@burner-wallet/types' - -export default class AmbMediator implements Plugin { - private pluginContext?: BurnerPluginContext - - initializePlugin(pluginContext: BurnerPluginContext) { - this.pluginContext = pluginContext - } -} diff --git a/basic-wallet/.gitignore b/basic-wallet/.gitignore deleted file mode 100644 index 4d29575..0000000 --- a/basic-wallet/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/basic-wallet/package.json b/basic-wallet/package.json deleted file mode 100644 index bb794cd..0000000 --- a/basic-wallet/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "basic-wallet", - "version": "0.1.0", - "private": true, - "dependencies": { - "@burner-wallet/assets": "^1.0.0", - "@burner-wallet/core": "^1.0.3", - "@burner-wallet/exchange": "^1.0.0", - "@burner-wallet/modern-ui": "^1.0.5", - "@types/node": "12.0.4", - "@types/react": "*", - "@types/react-dom": "16.8.4", - "@types/react-router-dom": "^4.3.3", - "amb-mediator": "^1.0.0", - "react": "^16.8.6", - "react-dom": "^16.8.6", - "react-scripts": "^3.2.0", - "typescript": "3.5.1" - }, - "scripts": { - "start": "react-scripts start", - "start-basic": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "devDependencies": {} -} diff --git a/basic-wallet/public/manifest.json b/basic-wallet/public/manifest.json deleted file mode 100644 index 1f2f141..0000000 --- a/basic-wallet/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/basic-wallet/src/index.tsx b/basic-wallet/src/index.tsx deleted file mode 100644 index e342e64..0000000 --- a/basic-wallet/src/index.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom' -import { xdai, dai, eth } from '@burner-wallet/assets' -import BurnerCore from '@burner-wallet/core' -import { InjectedSigner, LocalSigner } from '@burner-wallet/core/signers' -import { InfuraGateway, InjectedGateway, XDaiGateway } from '@burner-wallet/core/gateways' -import Exchange, { Uniswap, XDaiBridge } from '@burner-wallet/exchange' -import ModernUI from '@burner-wallet/modern-ui' -// import MyPlugin from 'amb-mediator'; - -const core = new BurnerCore({ - signers: [new InjectedSigner(), new LocalSigner()], - gateways: [new InjectedGateway(), new InfuraGateway(process.env.REACT_APP_INFURA_KEY), new XDaiGateway()], - assets: [xdai, dai, eth] -}) - -const exchange = new Exchange({ - pairs: [new XDaiBridge(), new Uniswap('dai')] -}) - -const BurnerWallet = () => - -ReactDOM.render(, document.getElementById('root')) diff --git a/lerna.json b/lerna.json index c051bdb..291397e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,8 +1,7 @@ { "packages": [ - "basic-wallet", - "local-wallet", - "amb-mediator" + "wallet", + "my-plugin" ], "npmClient": "yarn", "useWorkspaces": true, diff --git a/local-wallet/public/favicon.ico b/local-wallet/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/local-wallet/public/favicon.ico and /dev/null differ diff --git a/local-wallet/public/index.html b/local-wallet/public/index.html deleted file mode 100644 index dd1ccfd..0000000 --- a/local-wallet/public/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - React App - - - -
- - - diff --git a/local-wallet/src/index.tsx b/local-wallet/src/index.tsx deleted file mode 100644 index cc72265..0000000 --- a/local-wallet/src/index.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom' -import { NativeAsset, ERC20Asset } from '@burner-wallet/assets' -import BurnerCore from '@burner-wallet/core' -import { InjectedSigner, LocalSigner } from '@burner-wallet/core/signers' -import { HTTPGateway } from '@burner-wallet/core/gateways' -import ModernUI from '@burner-wallet/modern-ui' -import Exchange, { Uniswap, XDaiBridge } from '@burner-wallet/exchange' -// import MyPlugin from 'amb-mediator'; - -const core = new BurnerCore({ - signers: [new InjectedSigner(), new LocalSigner({ privateKey: process.env.REACT_APP_PK, saveKey: false })], - gateways: [new HTTPGateway('http://localhost:8545', '5777')], - assets: [ - new ERC20Asset({ - id: 'localerc20', - name: 'Local Token', - network: '5777', - // @ts-ignore - address: process.env.REACT_APP_ERC20_ADDRESS - }), - new NativeAsset({ - id: 'geth', - name: 'Ganache ETH', - network: '5777' - }) - ] -}) - -const exchange = new Exchange({ - pairs: [new XDaiBridge(), new Uniswap('dai')] -}) - -const BurnerWallet = () => - -ReactDOM.render(, document.getElementById('root')) diff --git a/local-wallet/src/react-app-env.d.ts b/local-wallet/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5..0000000 --- a/local-wallet/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/local-wallet/tsconfig.json b/local-wallet/tsconfig.json deleted file mode 100644 index 0980b23..0000000 --- a/local-wallet/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "esnext", - "moduleResolution": "node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "preserve" - }, - "include": [ - "src" - ] -} diff --git a/amb-mediator/package.json b/my-plugin/package.json similarity index 55% rename from amb-mediator/package.json rename to my-plugin/package.json index a8e6f12..3ef8797 100644 --- a/amb-mediator/package.json +++ b/my-plugin/package.json @@ -1,17 +1,18 @@ { - "name": "amb-mediator", + "name": "my-plugin", "version": "1.0.0", "license": "MIT", - "main": "dist/AmbMediator.js", - "types": "dist/AmbMediator.d.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "build": "tsc", "start-basic": "tsc -w", "start-local": "tsc -w" }, "dependencies": { - "@burner-wallet/assets": "^1.0.0", - "@burner-wallet/types": "^1.0.6", + "@burner-wallet/assets": "^1.1.10", + "@burner-wallet/exchange": "^1.1.2", + "@burner-wallet/types": "^1.0.8", "@types/react": "*" }, "devDependencies": { diff --git a/my-plugin/src/assets/ERC677Asset.ts b/my-plugin/src/assets/ERC677Asset.ts new file mode 100644 index 0000000..9bfa02b --- /dev/null +++ b/my-plugin/src/assets/ERC677Asset.ts @@ -0,0 +1,22 @@ +import { ERC20Asset } from '@burner-wallet/assets' +import IERC677abi from './abi/IERC677.json' + +export default class ERC677Asset extends ERC20Asset { + constructor({ abi = IERC677abi, ...params }) { + // @ts-ignore + super({ abi, type: 'erc677', ...params }) + } + + // @ts-ignore + async _send({ from, to, value }) { + // @ts-ignore + const receipt = await this.getContract() + .methods.transferAndCall(to, value, '0x') + .send({ from }) + return { + ...receipt, + txHash: receipt.transactionHash, + id: `${receipt.transactionHash}-${receipt.events.Transfer.logIndex}` + } + } +} diff --git a/my-plugin/src/assets/abi/IERC677.json b/my-plugin/src/assets/abi/IERC677.json new file mode 100644 index 0000000..f979d61 --- /dev/null +++ b/my-plugin/src/assets/abi/IERC677.json @@ -0,0 +1,249 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "", + "type": "address" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "bytes" + } + ], + "name": "transferAndCall", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/my-plugin/src/assets/sUSD.ts b/my-plugin/src/assets/sUSD.ts new file mode 100644 index 0000000..7fa77a9 --- /dev/null +++ b/my-plugin/src/assets/sUSD.ts @@ -0,0 +1,8 @@ +import { default as ERC677Asset } from './ERC677Asset' + +export default new ERC677Asset({ + id: 'susd', + name: 'sUSD', + network: '1', + address: '0x57Ab1E02fEE23774580C119740129eAC7081e9D3' +}) diff --git a/my-plugin/src/assets/xsUSD.ts b/my-plugin/src/assets/xsUSD.ts new file mode 100644 index 0000000..c9d0ab3 --- /dev/null +++ b/my-plugin/src/assets/xsUSD.ts @@ -0,0 +1,8 @@ +import { default as ERC677Asset } from './ERC677Asset' + +export default new ERC677Asset({ + id: 'xsusd', + name: 'xsUSD', + network: '100', + address: '0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e' +}) diff --git a/my-plugin/src/index.ts b/my-plugin/src/index.ts new file mode 100644 index 0000000..8586c2a --- /dev/null +++ b/my-plugin/src/index.ts @@ -0,0 +1,3 @@ +export { default as xsUSD } from './assets/xsUSD' +export { default as sUSD } from './assets/sUSD' +export { default as SUSDBridge } from './pairs/SUSDBridge' diff --git a/my-plugin/src/pairs/Bridge.ts b/my-plugin/src/pairs/Bridge.ts new file mode 100644 index 0000000..6937c7d --- /dev/null +++ b/my-plugin/src/pairs/Bridge.ts @@ -0,0 +1,57 @@ +import { Pair } from '@burner-wallet/exchange' + +export interface ValueTypes { + value?: string + ether?: string +} + +export interface ExchangeParams extends ValueTypes { + account: string +} + +interface PairConstructor { + assetA: string + assetABridge: string + assetB: string + assetBBridge: string +} + +export default class Bridge extends Pair { + private readonly assetABridge: string + private readonly assetBBridge: string + + constructor({ assetA, assetABridge, assetB, assetBBridge }: PairConstructor) { + super({ assetA, assetB }) + this.assetABridge = assetABridge + this.assetBBridge = assetBBridge + } + + exchangeAtoB({ account, value, ether }: ExchangeParams) { + const _value = this._getValue({ value, ether }) + const etc = this.getExchange().getAsset(this.assetA) + return etc.send({ + from: account, + value: _value, + to: this.assetABridge + }) + } + + exchangeBtoA({ account, value, ether }: ExchangeParams) { + const _value = this._getValue({ value, ether }) + + const wetc = this.getExchange().getAsset(this.assetB) + return wetc.send({ + from: account, + value: _value, + to: this.assetBBridge + }) + } + + async estimateAtoB(value: ValueTypes) { + return this._getValue(value) + } + + async estimateBtoA(value: ValueTypes) { + return this._getValue(value) + } +} diff --git a/my-plugin/src/pairs/SUSDBridge.ts b/my-plugin/src/pairs/SUSDBridge.ts new file mode 100644 index 0000000..106eb77 --- /dev/null +++ b/my-plugin/src/pairs/SUSDBridge.ts @@ -0,0 +1,13 @@ +import Bridge from './Bridge' +import { sUSD, xsUSD } from '../index' + +export default class SUSDBridge extends Bridge { + constructor() { + super({ + assetA: xsUSD.id, + assetABridge: '0xD9a3039cfC70aF84AC9E566A2526fD3b683B995B', + assetB: sUSD.id, + assetBBridge: '0x71F12d03E1711cb96E11E1A5c12Da7466699Db8D' + }) + } +} diff --git a/amb-mediator/tsconfig.json b/my-plugin/tsconfig.json similarity index 100% rename from amb-mediator/tsconfig.json rename to my-plugin/tsconfig.json diff --git a/package.json b/package.json index 0da5ca9..badfa01 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,18 @@ { - "name": "amb-burner-wallet-plugin", + "name": "tokenbridge-burner-wallet-plugin-sample", "description": "Arbitrary message bridge Burner Wallet 2 plugin", "version": "1.0.0", "license": "GPL-3.0-only", "private": true, "scripts": { "install": "lerna bootstrap", - "build": "lerna run --ignore local-wallet --ignore basic-wallet build", + "build": "lerna run --ignore wallet build", "lint": "eslint '*/**/*.{js,ts,tsx}'", - "start-basic": "lerna run --parallel start-basic", - "start-local": "lerna run --parallel start-local" + "start-wallet": "lerna run --parallel start-wallet" }, "workspaces": [ - "basic-wallet", - "local-wallet", - "amb-mediator" + "wallet", + "my-plugin" ], "devDependencies": { "@typescript-eslint/eslint-plugin": "^2.5.0", diff --git a/wallet/.env.example b/wallet/.env.example new file mode 100644 index 0000000..521f04c --- /dev/null +++ b/wallet/.env.example @@ -0,0 +1,2 @@ +REACT_APP_INFURA_KEY= +REACT_APP_PK=0x diff --git a/local-wallet/README.md b/wallet/README.md similarity index 100% rename from local-wallet/README.md rename to wallet/README.md diff --git a/local-wallet/package.json b/wallet/package.json similarity index 71% rename from local-wallet/package.json rename to wallet/package.json index b707954..c90e1e6 100644 --- a/local-wallet/package.json +++ b/wallet/package.json @@ -1,17 +1,18 @@ { - "name": "local-wallet", + "name": "wallet", "version": "0.1.0", "private": true, "dependencies": { - "@burner-wallet/assets": "^1.0.0", - "@burner-wallet/core": "^1.0.3", - "@burner-wallet/exchange": "^1.0.0", - "@burner-wallet/modern-ui": "^1.0.5", + "@burner-wallet/assets": "^1.1.10", + "@burner-wallet/core": "^1.1.9", + "@burner-wallet/exchange": "^1.1.2", + "@burner-wallet/metamask-plugin": "^1.0.1", + "@burner-wallet/modern-ui": "^1.0.7", "@types/node": "12.0.4", "@types/react": "16.8.19", "@types/react-dom": "16.8.4", "@types/react-router-dom": "^4.3.3", - "amb-mediator": "^1.0.0", + "my-plugin": "^1.0.0", "react": "^16.8.6", "react-dom": "^16.8.6", "react-scripts": "^3.2.0", @@ -19,8 +20,6 @@ "web3": "1.0.0-beta.55" }, "scripts": { - "start": "node ./scripts/run-local.js", - "start-local": "node ./scripts/run-local.js", "start-wallet": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", diff --git a/basic-wallet/public/favicon.ico b/wallet/public/favicon.ico similarity index 100% rename from basic-wallet/public/favicon.ico rename to wallet/public/favicon.ico diff --git a/basic-wallet/public/index.html b/wallet/public/index.html similarity index 100% rename from basic-wallet/public/index.html rename to wallet/public/index.html diff --git a/local-wallet/public/manifest.json b/wallet/public/manifest.json similarity index 100% rename from local-wallet/public/manifest.json rename to wallet/public/manifest.json diff --git a/local-wallet/scripts/erc20bytecode.txt b/wallet/scripts/erc20bytecode.txt similarity index 100% rename from local-wallet/scripts/erc20bytecode.txt rename to wallet/scripts/erc20bytecode.txt diff --git a/local-wallet/scripts/run-local-lib.js b/wallet/scripts/run-local-lib.js similarity index 100% rename from local-wallet/scripts/run-local-lib.js rename to wallet/scripts/run-local-lib.js diff --git a/local-wallet/scripts/run-local.js b/wallet/scripts/run-local.js similarity index 100% rename from local-wallet/scripts/run-local.js rename to wallet/scripts/run-local.js diff --git a/wallet/src/index.tsx b/wallet/src/index.tsx new file mode 100644 index 0000000..ac7d214 --- /dev/null +++ b/wallet/src/index.tsx @@ -0,0 +1,23 @@ +import React from 'react' +import ReactDOM from 'react-dom' +import BurnerCore from '@burner-wallet/core' +import { InjectedSigner, LocalSigner } from '@burner-wallet/core/signers' +import { XDaiGateway, InfuraGateway, InjectedGateway } from '@burner-wallet/core/gateways' +import ModernUI from '@burner-wallet/modern-ui' +import Exchange from '@burner-wallet/exchange' +import MetamaskPlugin from '@burner-wallet/metamask-plugin' +import { sUSD, xsUSD, SUSDBridge } from 'my-plugin' + +const core = new BurnerCore({ + signers: [new InjectedSigner(), new LocalSigner({ privateKey: process.env.REACT_APP_PK, saveKey: false })], + gateways: [new InjectedGateway(), new XDaiGateway(), new InfuraGateway(process.env.REACT_APP_INFURA_KEY)], + assets: [sUSD, xsUSD] +}) + +const exchange = new Exchange({ + pairs: [new SUSDBridge()] +}) + +const BurnerWallet = () => + +ReactDOM.render(, document.getElementById('root')) diff --git a/basic-wallet/src/react-app-env.d.ts b/wallet/src/react-app-env.d.ts similarity index 100% rename from basic-wallet/src/react-app-env.d.ts rename to wallet/src/react-app-env.d.ts diff --git a/basic-wallet/tsconfig.json b/wallet/tsconfig.json similarity index 100% rename from basic-wallet/tsconfig.json rename to wallet/tsconfig.json diff --git a/yarn.lock b/yarn.lock index 4f1b199..1062390 100644 --- a/yarn.lock +++ b/yarn.lock @@ -171,6 +171,13 @@ dependencies: "@babel/highlight" "^7.0.0" +"@babel/code-frame@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" + integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g== + dependencies: + "@babel/highlight" "^7.8.3" + "@babel/core@7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.6.0.tgz#9b00f73554edd67bebc86df8303ef678be3d7b48" @@ -221,6 +228,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" + integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== + dependencies: + "@babel/types" "^7.9.5" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -291,6 +308,15 @@ "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" +"@babel/helper-function-name@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" + integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.9.5" + "@babel/helper-get-function-arity@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" @@ -298,6 +324,13 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-get-function-arity@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" + integrity sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA== + dependencies: + "@babel/types" "^7.8.3" + "@babel/helper-hoist-variables@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" @@ -386,6 +419,18 @@ dependencies: "@babel/types" "^7.4.4" +"@babel/helper-split-export-declaration@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" + integrity sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + "@babel/helper-wrap-function@^7.1.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" @@ -414,11 +459,25 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@babel/highlight@^7.8.3": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== + dependencies: + "@babel/helper-validator-identifier" "^7.9.0" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.6.0", "@babel/parser@^7.6.3", "@babel/parser@^7.6.4": version "7.6.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.6.4.tgz#cb9b36a7482110282d5cb6dd424ec9262b473d81" integrity sha512-D8RHPW5qd0Vbyo3qb+YjO5nvUVRTXFLQ/FsDxJU2Nqz4uB5EnUN0ZQSEYpvTIbRuttig1XbHWU5oMeQwQSAA+A== +"@babel/parser@^7.8.6", "@babel/parser@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" + integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -1045,6 +1104,15 @@ "@babel/parser" "^7.6.0" "@babel/types" "^7.6.0" +"@babel/template@^7.8.3": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" + integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/parser" "^7.8.6" + "@babel/types" "^7.8.6" + "@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5", "@babel/traverse@^7.6.0", "@babel/traverse@^7.6.2", "@babel/traverse@^7.6.3": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.6.3.tgz#66d7dba146b086703c0fb10dd588b7364cec47f9" @@ -1060,6 +1128,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.4.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" + integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== + dependencies: + "@babel/code-frame" "^7.8.3" + "@babel/generator" "^7.9.5" + "@babel/helper-function-name" "^7.9.5" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/parser" "^7.9.0" + "@babel/types" "^7.9.5" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.6.3": version "7.6.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.6.3.tgz#3f07d96f854f98e2fbd45c64b0cb942d11e8ba09" @@ -1069,6 +1152,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" + integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== + dependencies: + "@babel/helper-validator-identifier" "^7.9.5" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@burner-wallet/assets@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@burner-wallet/assets/-/assets-1.0.0.tgz#fddd9ad7b4f3411c2a72bc838648b029f5aa7db2" @@ -1085,6 +1177,14 @@ isomorphic-fetch "^2.2.1" web3-utils "^1.2.2" +"@burner-wallet/assets@^1.1.10": + version "1.1.10" + resolved "https://registry.yarnpkg.com/@burner-wallet/assets/-/assets-1.1.10.tgz#2eb5b85ca5baf27aaddaf8240b459506bfba28a5" + integrity sha512-NU//Cy1IfiwrG5Sa/R3JiEYqGDemACyx2huod9ocppwfaCWMpSPIclJCvwKASEyE+uX1UJTRFeeUKEBZO6XWAQ== + dependencies: + isomorphic-fetch "^2.2.1" + web3-utils "^1.2.2" + "@burner-wallet/core@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@burner-wallet/core/-/core-1.0.0.tgz#caa15c34e9560e270ed5cffebd8c377789245e32" @@ -1095,7 +1195,7 @@ web3 "^1.2.2" web3-provider-engine "15.0.3" -"@burner-wallet/core@^1.0.3", "@burner-wallet/core@^1.1.7": +"@burner-wallet/core@^1.1.7": version "1.1.8" resolved "https://registry.yarnpkg.com/@burner-wallet/core/-/core-1.1.8.tgz#1f0688d7e56127d51f96aee55e74fdd9064260e2" integrity sha512-SQdTY1MUPs2jZrr66wSoFbuIx6TOmbir+No9IgwqFD+3ncoUCTYC19CdJVnnOwWiQh3gEw+VPxXyH+72guN62A== @@ -1105,18 +1205,39 @@ web3 "^1.2.2" web3-provider-engine "15.0.3" -"@burner-wallet/exchange@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@burner-wallet/exchange/-/exchange-1.0.0.tgz#a5a1ac11ff95d07965868095fa1a8dbe70200635" - integrity sha512-E3e3sxALyKXRhRUXQ4NuA9AM0oxJl/VijrkxzBA8gki2EC7620T0IuL4tveh4M+s6oSpL6ytQPgX+mZKErHE5g== +"@burner-wallet/core@^1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@burner-wallet/core/-/core-1.1.9.tgz#2543755a60bf61715bd20b8e12019ace88b8f9a6" + integrity sha512-KTuoPZL2Z5xg7E4iVY3/YIllO6QJLX1qYi+CaGRiEQcvcRMNT8hZFsFMQASPx6qZszPZUb6CxbhdQVJkPkWIbA== + dependencies: + "@burner-wallet/assets" "^1.1.0" + "@dmihal/tabookey-gasless" "^0.4.1" + web3 "^1.2.2" + web3-provider-engine "15.0.3" + +"@burner-wallet/exchange@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@burner-wallet/exchange/-/exchange-1.1.2.tgz#90d16606d42421bb6b5825b31ff12559dc62df62" + integrity sha512-ceEj0hvZV9/x1s2KqVOiRmmEGPS5EvrkyfRdxeNwm+34oOltNV6NKFYqYK2rtZ+yyhJqnSipJtbhpQpwQSxyoA== dependencies: "@burner-wallet/types" "^1.0.0" "@types/react" "*" + "@types/styled-components" "4.1.8" + styled-components "^5.0.1" -"@burner-wallet/modern-ui@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@burner-wallet/modern-ui/-/modern-ui-1.0.5.tgz#9c19f2f313754cce94c66e9107e9b546a7a67f39" - integrity sha512-CefyGu3IQFebwGrf3epE5k7yjPtrdW+2EbCtYVZkc5nyKMrbAhshcqQW+FDdN80i13ton8q7YE9/3zQKICbvcw== +"@burner-wallet/metamask-plugin@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@burner-wallet/metamask-plugin/-/metamask-plugin-1.0.1.tgz#52f86b30b663641070110393b0cdfce739cedd1c" + integrity sha512-vV5vwtBPb0mocBOd1UUzFhrh+8ezrEtRj2ggJnE/HOrZKOmvQn6wn/KpOfhxtzON7T6bu0wlzLbHY/3S97mS8w== + dependencies: + "@burner-wallet/types" "^1.0.0" + "@types/react" "*" + styled-components "^5.0.1" + +"@burner-wallet/modern-ui@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@burner-wallet/modern-ui/-/modern-ui-1.0.7.tgz#5ba6630844419e130c1ad8ea4f550a05685b58e8" + integrity sha512-yHI4O0cmZfqgB/82uS3BM0FtqNq7GUZgpyBNz0wMd6p/VrjzuaUGYA6lWndtoikaSBOVjE1dLUfwqV0Co+xO0Q== dependencies: "@burner-wallet/types" "^1.0.2" "@burner-wallet/ui-core" "^1.0.2" @@ -1129,10 +1250,11 @@ "@types/react-router-dom" "^4.3.4" "@types/styled-components" "4.1.8" clipboard "^2.0.4" + color "^3.1.2" ethereumjs-util "^6.1.0" qrcode.react "^0.9.3" react-qr-reader "^2.2.1" - styled-components "^4.4.0" + styled-components "^5.0.1" "@burner-wallet/types@^1.0.0": version "1.0.0" @@ -1145,7 +1267,7 @@ "@types/react-router-dom" "*" web3 "^1.2.2" -"@burner-wallet/types@^1.0.2", "@burner-wallet/types@^1.0.6": +"@burner-wallet/types@^1.0.2": version "1.0.6" resolved "https://registry.yarnpkg.com/@burner-wallet/types/-/types-1.0.6.tgz#44d24bd54ac3e172d61e01725b0ed012878ae0fb" integrity sha512-6g86fQdOVwB1anFrToSocxZqMyaROysTxeivvtPZW3lgShnvBcwfEjqlm9DdIlrCxPBmcQv3gUCCOumaudM8nA== @@ -1157,6 +1279,18 @@ i18next "^19.0.2" web3 "^1.2.2" +"@burner-wallet/types@^1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@burner-wallet/types/-/types-1.0.8.tgz#cd37196cd5fa93ffd0d3714a3a3a4ef133221659" + integrity sha512-UwGLVIxdQCZz+Vy8XUKfsQfWmn/Z6cA9E08B+oF+v3U9Lqcgw005agbxGTUmw6X9kXgtDQRWde5R3fo2Ze4CsQ== + dependencies: + "@burner-wallet/assets" "^1.0.0" + "@burner-wallet/core" "^1.0.0" + "@types/react" "*" + "@types/react-router-dom" "*" + i18next "^19.0.2" + web3 "^1.2.2" + "@burner-wallet/ui-core@^1.0.2": version "1.0.7" resolved "https://registry.yarnpkg.com/@burner-wallet/ui-core/-/ui-core-1.0.7.tgz#4277332d729a8197882c80e9266bb7732b6b9b54" @@ -1209,22 +1343,27 @@ web3-utils "^1.2.1" webpack-bundle-analyzer ">=3.3.2" -"@emotion/is-prop-valid@^0.8.1": - version "0.8.4" - resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.4.tgz#cf1dcfc1812c226f05e1ba53592eb6b51e734990" - integrity sha512-QBW8h6wVQgeQ55F52rNaprEJxtVR+/ScOP8/V1ScSpPzKqHdFB9QVqby0Z50sqS8mcaeIl5vR1vQpKwJbIS6NQ== +"@emotion/is-prop-valid@^0.8.8": + version "0.8.8" + resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz#db28b1c4368a259b60a97311d6a952d4fd01ac1a" + integrity sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA== dependencies: - "@emotion/memoize" "0.7.3" + "@emotion/memoize" "0.7.4" -"@emotion/memoize@0.7.3": - version "0.7.3" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.3.tgz#5b6b1c11d6a6dddf1f2fc996f74cf3b219644d78" - integrity sha512-2Md9mH6mvo+ygq1trTeVp2uzAKwE2P7In0cRpD/M9Q70aH8L+rxMLbb3JCN2JoSWsV2O+DdFjfbbXoMoLBczow== - -"@emotion/unitless@^0.7.0": +"@emotion/memoize@0.7.4": version "0.7.4" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.4.tgz#a87b4b04e5ae14a88d48ebef15015f6b7d1f5677" - integrity sha512-kBa+cDHOR9jpRJ+kcGMsysrls0leukrm68DmFQoMIWQcXdr2cZvyvypWuGYT7U+9kAExUE7+T7r6G3C3A6L8MQ== + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb" + integrity sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw== + +"@emotion/stylis@^0.8.4": + version "0.8.5" + resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" + integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== + +"@emotion/unitless@^0.7.4": + version "0.7.5" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" + integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== "@evocateur/libnpmaccess@^3.1.2": version "3.1.2" @@ -4281,7 +4420,7 @@ color-string@^1.5.2: color-name "^1.0.0" simple-swizzle "^0.2.2" -color@^3.0.0: +color@^3.0.0, color@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== @@ -4773,14 +4912,14 @@ css-select@^2.0.0: domutils "^1.7.0" nth-check "^1.0.2" -css-to-react-native@^2.2.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.2.tgz#e75e2f8f7aa385b4c3611c52b074b70a002f2e7d" - integrity sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw== +css-to-react-native@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756" + integrity sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ== dependencies: camelize "^1.0.0" css-color-keywords "^1.0.0" - postcss-value-parser "^3.3.0" + postcss-value-parser "^4.0.2" css-tree@1.0.0-alpha.37: version "1.0.0-alpha.37" @@ -7420,6 +7559,13 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hoist-non-react-statics@^3.0.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" + integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== + dependencies: + react-is "^16.7.0" + hoist-non-react-statics@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" @@ -8251,11 +8397,6 @@ is-utf8@^0.2.0: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= -is-what@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.3.1.tgz#79502181f40226e2d8c09226999db90ef7c1bcbe" - integrity sha512-seFn10yAXy+yJlTRO+8VfiafC+0QJanGLMPTBWLrJm/QPauuchy0UXh8B6H5o9VA8BAzk0iYievt6mNp6gfaqA== - is-windows@^1.0.0, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -9538,11 +9679,6 @@ memdown@~3.0.0: ltgt "~2.2.0" safe-buffer "~5.1.1" -memoize-one@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0" - integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA== - memory-fs@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" @@ -9590,13 +9726,6 @@ meow@^4.0.0: redent "^2.0.0" trim-newlines "^2.0.0" -merge-anything@^2.2.4: - version "2.4.1" - resolved "https://registry.yarnpkg.com/merge-anything/-/merge-anything-2.4.1.tgz#e9bccaec1e49ec6cb5f77ca78c5770d1a35315e6" - integrity sha512-dYOIAl9GFCJNctSIHWOj9OJtarCjsD16P8ObCl6oxrujAG+kOvlwJuOD9/O9iYZ9aTi1RGpGTG9q9etIvuUikQ== - dependencies: - is-what "^3.3.1" - merge-deep@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/merge-deep/-/merge-deep-3.0.2.tgz#f39fa100a4f1bd34ff29f7d2bf4508fbb8d83ad2" @@ -11728,7 +11857,7 @@ promzard@^0.3.0: dependencies: read "1" -prop-types@^15.5.4, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -13000,6 +13129,11 @@ shallow-clone@^3.0.0: dependencies: kind-of "^6.0.2" +shallowequal@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" + integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -13591,23 +13725,20 @@ style-loader@1.0.0: loader-utils "^1.2.3" schema-utils "^2.0.1" -styled-components@^4.4.0: - version "4.4.1" - resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.4.1.tgz#e0631e889f01db67df4de576fedaca463f05c2f2" - integrity sha512-RNqj14kYzw++6Sr38n7197xG33ipEOktGElty4I70IKzQF1jzaD1U4xQ+Ny/i03UUhHlC5NWEO+d8olRCDji6g== +styled-components@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-5.1.0.tgz#2e3985b54f461027e1c91af3229e1c2530872a4e" + integrity sha512-0Qs2wEkFBXHFlysz6CV831VG6HedcrFUwChjnWylNivsx14MtmqQsohi21rMHZxzuTba063dEyoe/SR6VGJI7Q== dependencies: "@babel/helper-module-imports" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@emotion/is-prop-valid" "^0.8.1" - "@emotion/unitless" "^0.7.0" + "@babel/traverse" "^7.4.5" + "@emotion/is-prop-valid" "^0.8.8" + "@emotion/stylis" "^0.8.4" + "@emotion/unitless" "^0.7.4" babel-plugin-styled-components ">= 1" - css-to-react-native "^2.2.2" - memoize-one "^5.0.0" - merge-anything "^2.2.4" - prop-types "^15.5.4" - react-is "^16.6.0" - stylis "^3.5.0" - stylis-rule-sheet "^0.0.10" + css-to-react-native "^3.0.0" + hoist-non-react-statics "^3.0.0" + shallowequal "^1.1.0" supports-color "^5.5.0" stylehacks@^4.0.0: @@ -13619,16 +13750,6 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -stylis-rule-sheet@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" - integrity sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw== - -stylis@^3.5.0: - version "3.5.4" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" - integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== - supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"