on master help sign in
devex: switch Ropsten --> Goerli
b660379tomholford
.env.development+1−1
@@ -1,5 +1,5 @@
1VITE_DEV_MNEMONIC='benefit crew supreme gesture quantum web media hazard theory mercy wing kitten'
1VITE_DEV_MNEMONIC='benefit crew supreme gesture quantum web media hazard theory mercy wing kitten'
2VITE_DEV_GALAXY_TICKET='~wacfus-dabpex-danted-mosfep-pasrud-lavmer-nodtex-taslus-pactyp-milpub-pildeg-fornev-ralmed-dinfeb-fopbyr-sanbet-sovmyl-dozsut-mogsyx-mapwyc-sorrup-ricnec-marnys-lignex'
2VITE_DEV_GALAXY_TICKET='~wacfus-dabpex-danted-mosfep-pasrud-lavmer-nodtex-taslus-pactyp-milpub-pildeg-fornev-ralmed-dinfeb-fopbyr-sanbet-sovmyl-dozsut-mogsyx-mapwyc-sorrup-ricnec-marnys-lignex'
3−VITE_ROPSTEN_KEY='b7d2af9f01534031ba773374f766ef65'
3+VITE_GOERLI_KEY='b7d2af9f01534031ba773374f766ef65'
4VITE_HD_PATH="m/44'/60'/0'/0/0"
4VITE_HD_PATH="m/44'/60'/0'/0/0"
5VITE_STUB_LOCAL='false'
5VITE_STUB_LOCAL='false'
.github/ISSUE_TEMPLATE/l2-bug-report.md+1−1
@@ -23,7 +23,7 @@ A clear and concise description of what you expected to happen.
23If applicable, add screenshots to help explain your problem. If possible, please also copy and paste any errors that appear in your browser's dev console. Here are [Chrome's docs](https://developers.google.com/web/tools/chrome-devtools/open) for using this feature.
23If applicable, add screenshots to help explain your problem. If possible, please also copy and paste any errors that appear in your browser's dev console. Here are [Chrome's docs](https://developers.google.com/web/tools/chrome-devtools/open) for using this feature.
24
24
25**Ethereum network:**
25**Ethereum network:**
26−Were you testing on Ropsten or mainnet?
26+Were you testing on Goerli or mainnet?
27
27
28**Desktop (please complete the following information):**
28**Desktop (please complete the following information):**
29 - OS: [e.g. MacOS 10.15.3]
29 - OS: [e.g. MacOS 10.15.3]
DEVELOPMENT.md+3−3
@@ -119,9 +119,9 @@ Automated tests for critical user journeys are coming Soon™️. Until then, he
119
119
120"As a user, I can create a new invite"
120"As a user, I can create a new invite"
121
121
122−First, in `Bridge.js`, set the `INITIAL_NETWORK_TYPE` to Ropsten:
122+First, in `Bridge.js`, set the `INITIAL_NETWORK_TYPE` to Goerli:
123```js
123```js
124−const INITIAL_NETWORK_TYPE = NETWORK_TYPES.ROPSTEN;
124+const INITIAL_NETWORK_TYPE = NETWORK_TYPES.GOERLI;
125```
125```
126
126
127Then, in `tank.js`, set the port to `3011`:
127Then, in `tank.js`, set the port to `3011`:
@@ -142,7 +142,7 @@ const baseUrl = 'https://gas-tank.urbit.org:3011';
1423. Download the Passport file, then use the enclosed Master Ticket and ID to login to Bridge again
1423. Download the Passport file, then use the enclosed Master Ticket and ID to login to Bridge again
143### Known Issues
143### Known Issues
144
144
145−When testing the invite acceptance and login flow on Ropsten, some of the Azimuth API calls will fail (e.g., `getConditional`).
145+When testing the invite acceptance and login flow on Goerli, some of the Azimuth API calls will fail (e.g., `getConditional`).
146
146
147## Releases
147## Releases
148
148
package.json+3−3
@@ -123,12 +123,12 @@
123 "preview:mainnet": "VITE_MAINNET=true vite preview --port 3000",
123 "preview:mainnet": "VITE_MAINNET=true vite preview --port 3000",
124 "start": "vite",
124 "start": "vite",
125 "build": "VITE_MAINNET=true vite build",
125 "build": "VITE_MAINNET=true vite build",
126− "build:ropsten": "VITE_ROPSTEN=true vite build",
126+ "build:goerli": "VITE_GOERLI=true vite build",
127 "test": "echo 'TODO: set up vitest'",
127 "test": "echo 'TODO: set up vitest'",
128 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
128 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
129 "zip": "BRIDGE_VERSION=${VITE_BRIDGE_VERSION:-$npm_package_version}; zip -ur bridge-$BRIDGE_VERSION.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$BRIDGE_VERSION.zip ./* && cd ..",
129 "zip": "BRIDGE_VERSION=${VITE_BRIDGE_VERSION:-$npm_package_version}; zip -ur bridge-$BRIDGE_VERSION.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$BRIDGE_VERSION.zip ./* && cd ..",
130 "release": "npm install && npm run build && npm run checksum && npm run zip",
130 "release": "npm install && npm run build && npm run checksum && npm run zip",
131− "release:ropsten": "export VITE_BRIDGE_VERSION=$npm_package_version\"r\"; npm install && npm run build:ropsten && npm run checksum && npm run zip",
131+ "release:goerli": "export VITE_BRIDGE_VERSION=$npm_package_version\"r\"; npm install && npm run build:goerli && npm run checksum && npm run zip",
132 "pilot:ganache": "ganache-cli --blockTime 1 --networkId 5 --host '0.0.0.0' -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &",
132 "pilot:ganache": "ganache-cli --blockTime 1 --networkId 5 --host '0.0.0.0' -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &",
133 "pilot:setup": "npm run pilot:ganache && truffle deploy",
133 "pilot:setup": "npm run pilot:ganache && truffle deploy",
134 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
134 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
@@ -138,7 +138,7 @@
138 "pilot-residents": "WITH_TEST_STATE=RESIDENTS npm run pilot",
138 "pilot-residents": "WITH_TEST_STATE=RESIDENTS npm run pilot",
139 "pilot-l2": "BROWSER=NONE WITH_TEST_STATE=L2 HTTPS=false NODE_ENV=development npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
139 "pilot-l2": "BROWSER=NONE WITH_TEST_STATE=L2 HTTPS=false NODE_ENV=development npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
140 "pilot-l2-local": "BROWSER=NONE VITE_L2=true HTTPS=false NODE_ENV=development npm run start --continue-on-error",
140 "pilot-l2-local": "BROWSER=NONE VITE_L2=true HTTPS=false NODE_ENV=development npm run start --continue-on-error",
141− "pilot-ropsten": "VITE_ROPSTEN=true HTTPS=true npm-run-all start --continue-on-error",
141+ "pilot-goerli": "VITE_GOERLI=true HTTPS=true npm-run-all start --continue-on-error",
142 "pilot:cleanup": "pkill -f ganache-cli",
142 "pilot:cleanup": "pkill -f ganache-cli",
143 "lint:check": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
143 "lint:check": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
144 "lint:fix": "eslint --fix 'src/**/*.{js,jsx,ts,tsx}'",
144 "lint:fix": "eslint --fix 'src/**/*.{js,jsx,ts,tsx}'",
src/Bridge.tsx+3−3
@@ -10,7 +10,7 @@ import { ROUTE_NAMES } from 'lib/routeNames';
10import { ROUTES } from 'lib/router';
10import { ROUTES } from 'lib/router';
11import { NETWORK_TYPES } from 'lib/network';
11import { NETWORK_TYPES } from 'lib/network';
12import { walletFromMnemonic } from 'lib/wallet';
12import { walletFromMnemonic } from 'lib/wallet';
13−import { isDevelopment, isMainnet, isRopsten } from 'lib/flags';
13+import { isDevelopment, isMainnet, isGoerli } from 'lib/flags';
14import useImpliedTicket from 'lib/useImpliedTicket';
14import useImpliedTicket from 'lib/useImpliedTicket';
15import useHasDisclaimed from 'lib/useHasDisclaimed';
15import useHasDisclaimed from 'lib/useHasDisclaimed';
16
16
@@ -26,8 +26,8 @@ import { Box } from '@tlon/indigo-react';
26import LoadingOverlay from 'components/L2/LoadingOverlay';
26import LoadingOverlay from 'components/L2/LoadingOverlay';
27import { useRollerPoller } from 'lib/useRollerPoller';
27import { useRollerPoller } from 'lib/useRollerPoller';
28
28
29−const INITIAL_NETWORK_TYPE = isRopsten
29+const INITIAL_NETWORK_TYPE = isGoerli
30− ? NETWORK_TYPES.ROPSTEN
30+ ? NETWORK_TYPES.GOERLI
31 : isDevelopment && !isMainnet
31 : isDevelopment && !isMainnet
32 ? NETWORK_TYPES.LOCAL
32 ? NETWORK_TYPES.LOCAL
33 : NETWORK_TYPES.MAINNET;
33 : NETWORK_TYPES.MAINNET;
src/lib/constants.ts+1−1
@@ -102,7 +102,7 @@ const NONCUSTODIAL_WALLETS = new Set([
102
102
103const ROLLER_HOSTS = {
103const ROLLER_HOSTS = {
104 LOCAL: 'localhost',
104 LOCAL: 'localhost',
105− ROPSTEN: 'roller-tmp.urbit.org',
105+ GOERLI: 'roller-tmp.urbit.org',
106 MAINNET: 'roller.urbit.org',
106 MAINNET: 'roller.urbit.org',
107};
107};
108
108
src/lib/contracts.js+5−5
@@ -5,11 +5,11 @@ const CONTRACT_ADDRESSES = {
5 linearSR: '0x03C3dC12BE658158D1d7F9e66E08ec4099c568e4',
5 linearSR: '0x03C3dC12BE658158D1d7F9e66E08ec4099c568e4',
6 conditionalSR: '0x35EB3B102d9C1B69Ac1469C1B1FE1799850CD3EB',
6 conditionalSR: '0x35EB3B102d9C1B69Ac1469C1B1FE1799850CD3EB',
7 },
7 },
8− ROPSTEN: {
8+ GOERLI: {
9− azimuth: '0x308ab6a6024cf198b57e008d0ac9ad0219886579',
9+ azimuth: '0xbB61Fa683E4B910418E27b00a1438a936234df52',
10− delegatedSending: '0x3e8ca510354bc2fdbbd6150252d93105c9c27bbe',
10+ delegatedSending: '0x3e8ca510354bc2fdbbd6150252d93105c9c27bbe', // TODO
11− linearSR: '0x1f8edd031ee414740aedb39b84fb8f2f66ca422f',
11+ linearSR: '0x1f8edd031ee414740aedb39b84fb8f2f66ca422f', // TODO
12− conditionalSR: '0x1f8edd031ee414740aedb39b84fb8f2f66ca422f',
12+ conditionalSR: '0x1f8edd031ee414740aedb39b84fb8f2f66ca422f', // TODO
13 },
13 },
14 MAINNET: {
14 MAINNET: {
15 azimuth: '0x223c067f8cf28ae173ee5cafea60ca44c335fecb',
15 azimuth: '0x223c067f8cf28ae173ee5cafea60ca44c335fecb',
src/lib/explorer.js+2−2
@@ -5,8 +5,8 @@ function useEtherscanDomain() {
5 const { networkType } = useNetwork();
5 const { networkType } = useNetwork();
6
6
7 switch (networkType) {
7 switch (networkType) {
8− case NETWORK_TYPES.ROPSTEN:
8+ case NETWORK_TYPES.GOERLI:
9− return 'https://ropsten.etherscan.io';
9+ return 'https://goerli.etherscan.io';
10 case NETWORK_TYPES.OFFLINE:
10 case NETWORK_TYPES.OFFLINE:
11 case NETWORK_TYPES.MAINNET:
11 case NETWORK_TYPES.MAINNET:
12 case NETWORK_TYPES.LOCAL:
12 case NETWORK_TYPES.LOCAL:
src/lib/flags.js+2−2
@@ -2,10 +2,10 @@ import { version } from '../../package.json';
2
2
3// are we running bridge in a development build
3// are we running bridge in a development build
4export const isDevelopment = import.meta.env.DEV === 'development';
4export const isDevelopment = import.meta.env.DEV === 'development';
5−export const isRopsten = import.meta.env.VITE_ROPSTEN === 'true';
5+export const isGoerli = import.meta.env.VITE_GOERLI === 'true';
6export const isMainnet = import.meta.env.VITE_MAINNET === 'true';
6export const isMainnet = import.meta.env.VITE_MAINNET === 'true';
7export const versionLabel =
7export const versionLabel =
8− import.meta.env.VITE_BRIDGE_VERSION || `${version}${isRopsten ? 'r' : ''}`;
8+ import.meta.env.VITE_BRIDGE_VERSION || `${version}${isGoerli ? 'g' : ''}`;
9export const providedRollerOptions = {
9export const providedRollerOptions = {
10 host: import.meta.env.VITE_ROLLER_HOST,
10 host: import.meta.env.VITE_ROLLER_HOST,
11 port: import.meta.env.VITE_ROLLER_PORT,
11 port: import.meta.env.VITE_ROLLER_PORT,
src/lib/getSuggestedGasPrice.js+1−1
@@ -40,7 +40,7 @@ export const defaultGasValues = value => ({
40
40
41export default async function getSuggestedGasPrice(networkType) {
41export default async function getSuggestedGasPrice(networkType) {
42 switch (networkType) {
42 switch (networkType) {
43− case NETWORK_TYPES.ROPSTEN:
43+ case NETWORK_TYPES.GOERLI:
44 return defaultGasValues(10);
44 return defaultGasValues(10);
45 case NETWORK_TYPES.OFFLINE:
45 case NETWORK_TYPES.OFFLINE:
46 return defaultGasValues(DEFAULT_GAS_PRICE_GWEI);
46 return defaultGasValues(DEFAULT_GAS_PRICE_GWEI);
src/lib/inviteMail.js+2−2
@@ -2,9 +2,9 @@
2// did not succeed", you might need to visit localhost:3001 or whatever
2// did not succeed", you might need to visit localhost:3001 or whatever
3// explicitly and tell your browser that's safe to access.
3// explicitly and tell your browser that's safe to access.
4// https://stackoverflow.com/a/53011185/1334324
4// https://stackoverflow.com/a/53011185/1334324
5−import { isRopsten } from './flags';
5+import { isGoerli } from './flags';
6
6
7−const port = isRopsten ? '3012' : '3002';
7+const port = isGoerli ? '3012' : '3002';
8const baseUrl = `https://onboarding-emails.urbit.org:${port}`;
8const baseUrl = `https://onboarding-emails.urbit.org:${port}`;
9
9
10function sendRequest(where, what) {
10function sendRequest(where, what) {
src/lib/network.js+5−5
@@ -1,15 +1,15 @@
1const NETWORK_TYPES = {
1const NETWORK_TYPES = {
2 OFFLINE: Symbol('OFFLINE'),
2 OFFLINE: Symbol('OFFLINE'),
3 LOCAL: Symbol('LOCAL'),
3 LOCAL: Symbol('LOCAL'),
4− ROPSTEN: Symbol('ROPSTEN'),
4+ GOERLI: Symbol('GOERLI'),
5 MAINNET: Symbol('MAINNET'),
5 MAINNET: Symbol('MAINNET'),
6};
6};
7
7
8const renderNetworkType = network =>
8const renderNetworkType = network =>
9 network === NETWORK_TYPES.OFFLINE
9 network === NETWORK_TYPES.OFFLINE
10 ? 'Offline'
10 ? 'Offline'
11− : network === NETWORK_TYPES.ROPSTEN
11+ : network === NETWORK_TYPES.GOERLI
12− ? 'Ropsten'
12+ ? 'Goerli'
13 : network === NETWORK_TYPES.MAINNET
13 : network === NETWORK_TYPES.MAINNET
14 ? 'Main Network'
14 ? 'Main Network'
15 : network === NETWORK_TYPES.LOCAL
15 : network === NETWORK_TYPES.LOCAL
@@ -20,8 +20,8 @@ const chainIdToNetworkType = chainId => {
20 switch (chainId) {
20 switch (chainId) {
21 case '0x1':
21 case '0x1':
22 return NETWORK_TYPES.MAINNET;
22 return NETWORK_TYPES.MAINNET;
23− case '0x3':
23+ case '0x5':
24− return NETWORK_TYPES.ROPSTEN;
24+ return NETWORK_TYPES.GOERLI;
25 default:
25 default:
26 return NETWORK_TYPES.LOCAL;
26 return NETWORK_TYPES.LOCAL;
27 }
27 }
src/lib/tank.js+2−2
@@ -3,7 +3,7 @@
3import retry from 'async-retry';
3import retry from 'async-retry';
4import { toBN } from 'web3-utils';
4import { toBN } from 'web3-utils';
5import { RETRY_OPTIONS, waitForTransactionConfirm } from './txn';
5import { RETRY_OPTIONS, waitForTransactionConfirm } from './txn';
6−import { isRopsten } from './flags';
6+import { isGoerli } from './flags';
7
7
8const TANK_ADDRESS = '0x40f0A6db85f8D7A54fF3eA915b040dE8Cd4A0Eb5';
8const TANK_ADDRESS = '0x40f0A6db85f8D7A54fF3eA915b040dE8Cd4A0Eb5';
9
9
@@ -11,7 +11,7 @@ const TANK_ADDRESS = '0x40f0A6db85f8D7A54fF3eA915b040dE8Cd4A0Eb5';
11// did not succeed", you might need to visit localhost:3001 or whatever
11// did not succeed", you might need to visit localhost:3001 or whatever
12// explicitly and tell your browser that's safe to access.
12// explicitly and tell your browser that's safe to access.
13// https://stackoverflow.com/a/53011185/1334324
13// https://stackoverflow.com/a/53011185/1334324
14−const port = isRopsten ? '3011' : '3001';
14+const port = isGoerli ? '3011' : '3001';
15const baseUrl = `https://gas-tank.urbit.org:${port}`;
15const baseUrl = `https://gas-tank.urbit.org:${port}`;
16
16
17function sendRequest(where, what) {
17function sendRequest(where, what) {
src/lib/txn.ts+1−2
@@ -99,9 +99,8 @@ const signTransaction = async ({
99 type: toHex(EIP1559_TRANSACTION_TYPE),
99 type: toHex(EIP1559_TRANSACTION_TYPE),
100 }
100 }
101
101
102− // TODO: Ropsten will sunset Q4 2022, need to replace w/ support for Goerli
103 const chain =
102 const chain =
104− networkType === NETWORK_TYPES.ROPSTEN ? Chain.Ropsten : Chain.Mainnet;
103+ networkType === NETWORK_TYPES.GOERLI ? Chain.Goerli : Chain.Mainnet;
105
104
106 const txConfig: TxOptions = {
105 const txConfig: TxOptions = {
107 freeze: false,
106 freeze: false,
src/lib/useRollerOptions.ts+5−5
@@ -2,7 +2,7 @@ import { Options } from '@urbit/roller-api';
2import { useMemo } from 'react';
2import { useMemo } from 'react';
3import { ROLLER_HOSTS, ROLLER_PATH } from './constants';
3import { ROLLER_HOSTS, ROLLER_PATH } from './constants';
4import { convertToInt } from './convertToInt';
4import { convertToInt } from './convertToInt';
5−import { isMainnet, isRopsten, providedRollerOptions } from './flags';
5+import { isMainnet, isGoerli, providedRollerOptions } from './flags';
6
6
7type TransportType =
7type TransportType =
8 | 'websocket'
8 | 'websocket'
@@ -30,17 +30,17 @@ export const useRollerOptions = () => {
30 const options: Options = useMemo(() => {
30 const options: Options = useMemo(() => {
31 const type =
31 const type =
32 (providedType as TransportType | undefined) ||
32 (providedType as TransportType | undefined) ||
33− (isMainnet || isRopsten ? 'https' : 'http');
33+ (isMainnet || isGoerli ? 'https' : 'http');
34 const host =
34 const host =
35 providedHost ||
35 providedHost ||
36 (isMainnet
36 (isMainnet
37 ? ROLLER_HOSTS.MAINNET
37 ? ROLLER_HOSTS.MAINNET
38− : isRopsten
38+ : isGoerli
39− ? ROLLER_HOSTS.ROPSTEN
39+ ? ROLLER_HOSTS.GOERLI
40 : ROLLER_HOSTS.LOCAL);
40 : ROLLER_HOSTS.LOCAL);
41 const port =
41 const port =
42 (providedPort && convertToInt(providedPort, 10)) ||
42 (providedPort && convertToInt(providedPort, 10)) ||
43− (isMainnet || isRopsten ? 443 : 8080);
43+ (isMainnet || isGoerli ? 443 : 8080);
44 const path = ROLLER_PATH;
44 const path = ROLLER_PATH;
45
45
46 return {
46 return {
src/store/network.jsx+3−3
@@ -84,12 +84,12 @@ function _useNetwork(initialNetworkType = null) {
84 );
84 );
85 return;
85 return;
86 }
86 }
87− case NETWORK_TYPES.ROPSTEN: {
87+ case NETWORK_TYPES.GOERLI: {
88− const endpoint = `https://ropsten.infura.io/v3/${import.meta.env.VITE_INFURA_ENDPOINT}`;
88+ const endpoint = `https://goerli.infura.io/v3/${import.meta.env.VITE_INFURA_ENDPOINT}`;
89
89
90 initWeb3(
90 initWeb3(
91 new Web3.providers.HttpProvider(endpoint),
91 new Web3.providers.HttpProvider(endpoint),
92− CONTRACT_ADDRESSES.ROPSTEN
92+ CONTRACT_ADDRESSES.GOERLI
93 );
93 );
94 return;
94 return;
95 }
95 }