diff --git a/.gitignore b/.gitignore index fde91ac..940d00d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ node_modules/ .DS_Store +.secret diff --git a/README.md b/README.md index 9954470..83a0c2d 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ Register subdomains in batch - ✨ invite your users to the experience. +Mainnet: [0x1867670c5eee8a850462ffb5d7b5f4eb25b0ffab](https://explorer.rsk.co/address/0x1867670c5eee8a850462ffb5d7b5f4eb25b0ffab) +Testnet: [0x128b878c2dedacc211a6324fa51b6bf006cad25e](https://explorer.testnet.rsk.co/address/0x128b878c2dedacc211a6324fa51b6bf006cad25e) + ## Setup ``` @@ -15,17 +18,3 @@ npm test ``` > Remove /build dir - -## Deploy - -``` -truffle migrate [--reset] [--network NETWORK] --rootNode ROOT_NODE -``` - -- `ROOT_NODE`: the node to register subnodes of. - -Example: - -``` -truffle migrate --reset --network ganache --rootNode javi.rsk -``` \ No newline at end of file diff --git a/app/.env.production b/app/.env.production new file mode 100644 index 0000000..b793138 --- /dev/null +++ b/app/.env.production @@ -0,0 +1,4 @@ +REACT_APP_RSK_NODE=https://public-node.rsk.co/ +REACT_APP_RNS_REGISTRY=0xcb868aeabd31e2b66f74e9a55cf064abb31a4ad5 +REACT_APP_BATCH_REGISTRAR=0x1867670c5eee8a850462ffb5d7b5f4eb25b0ffab +REACT_APP_RSK_EXPLORER=https://explorer.rsk.co diff --git a/app/package.json b/app/package.json index 04625cd..0e49962 100644 --- a/app/package.json +++ b/app/package.json @@ -2,6 +2,7 @@ "name": "app", "version": "0.1.0", "private": true, + "homepage": "https://rnsdomains.github.io/rns-subdomain-batch/", "dependencies": { "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", @@ -26,7 +27,9 @@ "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "predeploy": "yarn build", + "deploy": "gh-pages -d build" }, "eslintConfig": { "extends": "react-app" @@ -49,6 +52,7 @@ "eslint-plugin-import": "^2.19.1", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-react": "^7.17.0", - "eslint-plugin-react-hooks": "^1.7.0" + "eslint-plugin-react-hooks": "^1.7.0", + "gh-pages": "^2.1.1" } } diff --git a/app/src/App.js b/app/src/App.js index 45d12b8..4fbea95 100644 --- a/app/src/App.js +++ b/app/src/App.js @@ -2,6 +2,7 @@ import React from 'react'; import { Switch, Route, + Redirect, } from 'react-router-dom'; import { Header, @@ -10,17 +11,35 @@ import { Setup, Subdomains, FAQ, + Auth, + NotFound, + Register, } from './components'; +import Admin from './components/Admin'; +import { connect } from 'react-redux'; +import { NODE_OWNER, REGISTRANT } from './types'; -export default () => ( +const App = ({ showRegister, showAdmin }) => ( <>
+ } /> } /> - } /> + showRegister ? : } /> + showRegister ? : } /> + showAdmin ? : } /> + } /> } /> - } /> + } />