Skip to content

Commit a48dff5

Browse files
committed
feat: initial open source commit
The public repo will be the source of truth from now on.
1 parent 7315e7f commit a48dff5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+9143
-1
lines changed

.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
// "@babel/preset-env"
4+
"@babel/preset-react"
5+
// "react-app"
6+
],
7+
"plugins": [
8+
// "@babel/plugin-proposal-class-properties",
9+
"react-hot-loader/babel"
10+
]
11+
}

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "react-app",
3+
"globals": {
4+
"chrome": "readonly"
5+
}
6+
}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
.history
19+
20+
# secrets
21+
secrets.*.js
22+
23+
# zip
24+
pocketuniverse.zip

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"requirePragma": false,
5+
"arrowParens": "always"
6+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License
1+
Apache License
22
Version 2.0, January 2004
33
http://www.apache.org/licenses/
44

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<img src="pocket_universe_info.png" />
2+
3+
# PocketUniverse
4+
5+
# Layout
6+
7+
## Injected
8+
9+
The injected script proxies requests from the website to PocketUniverse before forwarding it to
10+
`window.ethereum`.
11+
12+
We don't modify the request but rather just wait until the user decides it wants to continue.
13+
14+
We communicate our requests with the content-script through the DOM.
15+
16+
## ContentScript
17+
18+
This is responsible for communicating with the webpage. It takes the webpage request and stores it
19+
in local storage for the service worker to pick it up.
20+
21+
## Background
22+
23+
This service worker handles the requests and popup triggering logic.
24+
25+
It listens to changes in storage and forwards requests if there are new things to simulate.
26+
27+
## Popup
28+
29+
This is what the user sees when there is a simulation in progress. This simply uses the storage
30+
state to be displayed.
31+
32+
It will write to storage the action the user decides to take.
33+
34+
## Contact Us
35+
[* Twitter](https://twitter.com/PocketUniverseZ)
36+
* [Discord](https://discord.gg/UrgqjUQFH2)

package.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"name": "pocketuniverse",
3+
"version": "0.0.7",
4+
"description": "A transaction checker that helps you avoid crypto scams.",
5+
"scripts": {
6+
"build": "node utils/build.js",
7+
"start": "node utils/webserver.js",
8+
"lint": "eslint src --fix && yarn format",
9+
"format": "prettier --write '**/*.{js,jsx,ts,tsx,json,css,scss,md}'"
10+
},
11+
"dependencies": {
12+
"@hot-loader/react-dom": "^17.0.2",
13+
"@metamask/detect-provider": "1.2.0",
14+
"@reduxjs/toolkit": "^1.8.3",
15+
"@sentry/browser": "^7.6.0",
16+
"@sentry/react": "^7.6.0",
17+
"ethers": "^5.6.9",
18+
"mixpanel-browser": "^2.45.0",
19+
"pino": "8.1.0",
20+
"react": "^17.0.2",
21+
"react-dom": "^17.0.2",
22+
"react-hot-loader": "^4.13.0",
23+
"react-icons": "^4.4.0",
24+
"react-spinners": "^0.13.3",
25+
"use-chrome-storage": "^1.0.8",
26+
"uuid": "^8.3.2"
27+
},
28+
"devDependencies": {
29+
"@babel/core": "^7.17.0",
30+
"@babel/plugin-proposal-class-properties": "^7.16.7",
31+
"@babel/preset-env": "^7.16.11",
32+
"@babel/preset-react": "^7.16.7",
33+
"@types/chrome": "^0.0.193",
34+
"@types/mixpanel-browser": "^2.38.0",
35+
"@types/pino": "^7.0.5",
36+
"@types/react": "^17.0.39",
37+
"@types/react-dom": "^17.0.11",
38+
"@types/uuid": "^8.3.4",
39+
"autoprefixer": "^10.4.7",
40+
"babel-eslint": "^10.1.0",
41+
"babel-loader": "^8.2.3",
42+
"babel-preset-react-app": "^10.0.1",
43+
"clean-webpack-plugin": "^4.0.0",
44+
"copy-webpack-plugin": "^7.0.0",
45+
"css-loader": "^6.6.0",
46+
"eslint": "^8.8.0",
47+
"eslint-config-react-app": "^7.0.0",
48+
"eslint-plugin-flowtype": "^8.0.3",
49+
"eslint-plugin-import": "^2.25.4",
50+
"eslint-plugin-jsx-a11y": "^6.5.1",
51+
"eslint-plugin-react": "^7.28.0",
52+
"eslint-plugin-react-hooks": "^4.3.0",
53+
"file-loader": "^6.2.0",
54+
"fs-extra": "^10.0.0",
55+
"html-loader": "^3.1.0",
56+
"html-webpack-plugin": "^5.5.0",
57+
"node-sass": "^6.0.1",
58+
"postcss": "^8.4.14",
59+
"postcss-loader": "^7.0.0",
60+
"prettier": "^2.5.1",
61+
"sass-loader": "^12.4.0",
62+
"source-map-loader": "^3.0.1",
63+
"style-loader": "^3.3.1",
64+
"tailwindcss": "^3.1.4",
65+
"terser-webpack-plugin": "^5.3.1",
66+
"ts-loader": "^9.2.6",
67+
"typescript": "^4.5.5",
68+
"webpack": "^5.68.0",
69+
"webpack-cli": "^4.9.2",
70+
"webpack-dev-server": "^4.7.4"
71+
},
72+
"resolutions": {
73+
"@types/react": "~17.0.47"
74+
}
75+
}

pocket_universe_info.png

53 KB
Loading

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

0 commit comments

Comments
 (0)