-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3caa44a
Showing
65 changed files
with
18,233 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
REACT_APP_FORTMATIC_LIVE_KEY=pk_live_XXXXXXXXXXXXXXXX | ||
REACT_APP_FORTMATIC_TEST_KEY=pk_test_XXXXXXXXXXXXXXXX # only required for testnet | ||
REACT_APP_ETH_NETWORK=mainnet | ||
REACT_APP_PORTIS_DAPP_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | ||
REACT_APP_INFURA_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | ||
REACT_APP_SENTRY_DSN=https://[email protected]/5237943 | ||
REACT_APP_SENTRY_DSN=https://[email protected]/XXXXXXXX | ||
REACT_APP_NGNT_ADDRESS=0x05BBeD16620B352A7F889E23E3Cf427D1D379FFE | ||
REACT_APP_GA_UA_ID=UA-166685616-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# ignore typechain generated files | ||
src/modules/contracts/generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'eslint-plugin-import'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'airbnb/base', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', | ||
'eslint:recommended', | ||
'plugin:react/recommended' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
modules: true, | ||
}, | ||
}, | ||
rules: { | ||
'func-names': 0, | ||
'@typescript-eslint/no-namespace': 0, | ||
'import/prefer-default-export': 'off', | ||
'react/prop-types': 'off', | ||
'import/extensions': [ | ||
'error', | ||
'ignorePackages', | ||
{ | ||
js: 'never', | ||
jsx: 'never', | ||
ts: 'never', | ||
tsx: 'never', | ||
}, | ||
], | ||
}, | ||
env: { | ||
node: true, | ||
commonjs: true, | ||
jest: true, | ||
browser: true, | ||
}, | ||
settings: { | ||
'indent': ['error', 2], | ||
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'], | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
'react': { | ||
'version': "16.12" | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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* | ||
|
||
# ignore typechain generated files | ||
src/modules/contracts/generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
trailingComma: "es5", | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: true, | ||
useTabs: false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# SendNGNT dApp | ||
|
||
This dApp enables sending [NGNT](https://ngnt.org) from non-custodial wallets without ETH. It uses the Gas Station Network functionality of the NGNT token. Visit the app at [https://sendngnt.com](https://sendngnt.com). | ||
|
||
### List of wallets currently supported: | ||
- Browser Injected wallets | ||
- Wallet Link (Coinbase Wallet) | ||
- Wallet Connect | ||
- Fortmatic | ||
- Portis | ||
- Torus | ||
|
||
If you are using a wallet not yet supported, open an issue and we would work on getting it supported. | ||
|
||
## Development | ||
|
||
This project is built from [Create React App](https://github.com/facebook/create-react-app) and uses Typescript. | ||
|
||
The application requires a bunch of environment variables to be configured in order to | ||
work properly. Check the `.env.sample` for a list of the configurable environment variable. | ||
|
||
In the project directory, you can run: | ||
|
||
#### `yarn start` | ||
|
||
Runs the app in the development mode.<br /> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
|
||
The page will reload if you make edits.<br /> | ||
You will also see any lint errors in the console. | ||
|
||
#### `yarn build` | ||
|
||
Builds the app for production to the `build` folder.<br /> | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
## Contributions | ||
|
||
This repository is open to contributions. Please ensure you open an issue to discuss and track your contributions before starting to implement the code. | ||
|
||
## License | ||
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 International License</a>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"name": "send-ngnt-dapp", | ||
"version": "1.0.0", | ||
"private": false, | ||
"homepage": "https://sendngnt.com", | ||
"dependencies": { | ||
"@material-ui/core": "^4.9.0", | ||
"@material-ui/icons": "^4.9.1", | ||
"@openzeppelin/gsn-provider": "^0.1.10", | ||
"@portis/web3": "^2.0.0-beta.54", | ||
"@sentry/browser": "^5.15.5", | ||
"@toruslabs/torus-embed": "^1.4.3", | ||
"@walletconnect/web3-provider": "^1.0.0-beta.47", | ||
"axios": "^0.19.2", | ||
"bignumber.js": "^9.0.0", | ||
"formik": "^2.1.4", | ||
"formik-material-ui": "^2.0.0-beta.1", | ||
"fortmatic": "^2.0.6", | ||
"mobx": "^5.15.4", | ||
"mobx-react-lite": "^2.0.6", | ||
"mobx-state-tree": "^3.16.0", | ||
"mst-persist": "^0.1.3", | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0", | ||
"react-ga": "^2.7.0", | ||
"react-router": "^5.1.2", | ||
"react-router-dom": "^5.1.2", | ||
"react-scripts": "3.3.0", | ||
"react-scroll": "^1.7.16", | ||
"typescript": "~3.7.2", | ||
"walletlink": "^2.0.2", | ||
"web3": "^1.2.7", | ||
"web3-core": "^1.2.7", | ||
"web3-utils": "^1.2.7", | ||
"yup": "^0.28.5" | ||
}, | ||
"scripts": { | ||
"analyze": "source-map-explorer 'build/static/js/*.js'", | ||
"start": "npm run build:contracts && react-scripts start", | ||
"build": "npm run build:contracts && react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"lint": "eslint . --fix --ext .js,.jsx,.ts,.tsx", | ||
"build:contracts": "typechain --target web3-v1 --outDir ./src/modules/contracts/generated/ './src/modules/contracts/abi/*.json'" | ||
}, | ||
"eslintConfig": { | ||
"extends": "react-app" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@testing-library/jest-dom": "^4.2.4", | ||
"@testing-library/react": "^9.3.2", | ||
"@testing-library/user-event": "^7.1.2", | ||
"@types/jest": "^24.0.0", | ||
"@types/node": "^12.0.0", | ||
"@types/react": "^16.9.0", | ||
"@types/react-dom": "^16.9.0", | ||
"@types/react-router": "^5.1.5", | ||
"@types/react-router-dom": "^5.1.3", | ||
"@types/react-scroll": "^1.5.5", | ||
"@types/yup": "^0.28.1", | ||
"@typescript-eslint/eslint-plugin": "^2.12.0", | ||
"@typescript-eslint/parser": "^2.12.0", | ||
"eslint": "^6.7.2", | ||
"eslint-config-airbnb": "^18.0.1", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-plugin-import": "^2.19.1", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"eslint-plugin-react": "^7.19.0", | ||
"jest": "^24.9.0", | ||
"prettier": "^1.19.1", | ||
"source-map-explorer": "^2.4.2", | ||
"ts-jest": "^24.2.0", | ||
"typechain": "^2.0.0", | ||
"typechain-target-web3-v1": "^1.0.4" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%PUBLIC_URL%/favicon.png" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="theme-color" content="#ffffff" /> | ||
<meta name="title" content="SendNGNT"> | ||
<meta name="description" content="Send NGNT from your non-custodial wallet without ETH."> | ||
|
||
<!-- Open Graph / Facebook --> | ||
<meta property="og:type" content="website"> | ||
<meta property="og:url" content="https://sendngnt.com/"> | ||
<meta property="og:title" content="SendNGNT"> | ||
<meta property="og:description" content="Send NGNT from your non-custodial wallet without ETH."> | ||
<meta property="og:image" content="%PUBLIC_URL%/media_banner.jpg"> | ||
|
||
<!-- Twitter --> | ||
<meta property="twitter:card" content="summary_large_image"> | ||
<meta property="twitter:url" content="https://sendngnt.com/"> | ||
<meta property="twitter:title" content="SendNGNT"> | ||
<meta property="twitter:description" content="Send NGNT from your non-custodial wallet without ETH."> | ||
<meta property="twitter:image" content="%PUBLIC_URL%/media_banner.jpg"> | ||
<!-- | ||
manifest.json provides metadata used when your web app is installed on a | ||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
--> | ||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" /> | ||
<!-- | ||
Notice the use of %PUBLIC_URL% in the tags above. | ||
It will be replaced with the URL of the `public` folder during the build. | ||
Only files inside the `public` folder can be referenced from the HTML. | ||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
work correctly both with client-side routing and a non-root public URL. | ||
Learn how to configure a non-root public URL by running `npm run build`. | ||
--> | ||
<title>SendNGNT</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<!-- | ||
This HTML file is a template. | ||
If you open it directly in the browser, you will see an empty page. | ||
You can add webfonts, meta tags, or analytics to this file. | ||
The build step will place the bundled scripts into the <body> tag. | ||
To begin the development, run `npm start` or `yarn start`. | ||
To create a production bundle, use `npm run build` or `yarn build`. | ||
--> | ||
<!-- <div>Icons made by <a href="https://www.flaticon.com/authors/monkik" title="monkik">monkik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div> --> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "SendNGNT", | ||
"name": "SendNGNT", | ||
"icons": [ | ||
{ | ||
"src": "favicon.png", | ||
"sizes": "64x64 32x32 24x24 16x16", | ||
"type": "image/x-icon" | ||
} | ||
], | ||
"start_url": ".", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# https://www.robotstxt.org/robotstxt.html | ||
User-agent: * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { Suspense, lazy } from 'react'; | ||
import { Route, Switch } from 'react-router'; | ||
import { HashRouter as Router } from 'react-router-dom'; | ||
import { observer } from 'mobx-react-lite'; | ||
import { | ||
createMuiTheme, | ||
responsiveFontSizes, | ||
ThemeProvider, | ||
} from '@material-ui/core/styles'; | ||
import CssBaseline from '@material-ui/core/CssBaseline'; | ||
import { SendNgntPage } from './modules/home/pages/SendNgntPage'; | ||
import { useAppStore } from './store'; | ||
|
||
const LoginPage = lazy(() => import('./modules/wallets/pages/LoginPage')); | ||
const Loading = (): JSX.Element => <></>; | ||
|
||
const theme = responsiveFontSizes( | ||
createMuiTheme({ | ||
palette: { | ||
background: { | ||
default: '#39736e', | ||
}, | ||
}, | ||
}) | ||
); | ||
|
||
const App: React.FC = observer(() => { | ||
const { walletStore } = useAppStore(); | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Router> | ||
<Switch> | ||
<Route exact path="/" component={SendNgntPage} /> | ||
<Route path="*" is404={true}> | ||
<div>404 Baby</div> | ||
</Route> | ||
</Switch> | ||
</Router> | ||
<Suspense fallback={<Loading />}> | ||
{walletStore.showLogin && <LoginPage />} | ||
</Suspense> | ||
</ThemeProvider> | ||
); | ||
}); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
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; | ||
} | ||
|
||
.MuiButton-label { | ||
text-transform: none!important; | ||
} | ||
|
||
#torusIframe { | ||
z-index: 5000!important; | ||
} |
Oops, something went wrong.