on master help sign in
Merge remote-tracking branch 'origin/master' into wcconnect-v2-migration
commitc400b5c6cafcff3d9f2a616b42dcaf5c26150466 authordillon <dpett122@gmail.com> dateThu 13 Jul 2023, 17:31 (3 years ago) parent9fba8e3d49bb35
8 files changed+19−22
DEVELOPMENT.md+2−2 migrations/1_migration.js+2−1 package-lock.json+3−15 src/lib/constants.ts+2 src/lib/flags.js+1−1 src/lib/network.js+7−2 src/worker/index.ts+1 truffle-config.js+1−1
DEVELOPMENT.md+2−2
@@ -171,7 +171,7 @@ npm run pilot-l2
171171Start a local fake ship from the master branch in the [urbit repo](https://github.com/urbit/urbit)
172172
173173```sh
174−/path/to/urbit -F zod -B ./bin/solid.pill -A ./pkg/arvo zod
174+/path/to/urbit -F zod -B ./bin/solid.pill -A ./pkg/arvo -c zod --http-port 8080
175175```
176176
177177```dojo
@@ -185,7 +185,7 @@ Start a local fake ship from the master branch in the [urbit repo](https://githu
185185> :roller|local
186186> :roller|setkey '58d62eb79797502bc0f66cd3e7a49d00287bff53a2734b799ef09cb746340ed0'
187187> :roller|quota 9.999
188−> |cors-approve 'http://localhost:3000'
188+> |cors-approve 'https://127.0.0.1:3000'
189189:: Once L2 txs have been sent via Bridge, this will manually commit and batch them, avoiding waiting for the timer
190190::
191191> :roller|commit
migrations/1_migration.js+2−1
@@ -63,7 +63,8 @@ module.exports = async function(deployer) {
6363 '0x0000000000000000000000000000000000000000',
6464 azimuth.address,
6565 polls.address,
66− claims.address
66+ claims.address,
67+ '0x0000000000000000000000000000000000000000' // treasury
6768 );
6869
6970 // configure contract ownership
package-lock.json+3−15
@@ -6173,8 +6173,8 @@
61736173 }
61746174 },
61756175 "node_modules/azimuth-solidity": {
6176− "version": "1.2.3",
6177− "resolved": "git+ssh://git@github.com/urbit/azimuth.git#c5394f7aabb6e9de49a67ab0cd227ac62303efd5",
6176+ "version": "1.2.4",
6177+ "resolved": "git+ssh://git@github.com/urbit/azimuth.git#bcf1d7bcf64cd73a3688434feb786be39a116819",
61786178 "bundleDependencies": [
61796179 "openzeppelin-solidity"
61806180 ],
@@ -16541,11 +16541,6 @@
1654116541 "xhr-request-promise": "^0.1.2"
1654216542 }
1654316543 },
16544− "node_modules/web3/node_modules/eth-lib/node_modules/bn.js": {
16545− "version": "4.12.0",
16546− "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
16547− "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
16548− },
1654916544 "node_modules/web3/node_modules/get-stream": {
1655016545 "version": "6.0.1",
1655116546 "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
@@ -21435,7 +21430,7 @@
2143521430 }
2143621431 },
2143721432 "azimuth-solidity": {
21438− "version": "git+ssh://git@github.com/urbit/azimuth.git#c5394f7aabb6e9de49a67ab0cd227ac62303efd5",
21433+ "version": "git+ssh://git@github.com/urbit/azimuth.git#bcf1d7bcf64cd73a3688434feb786be39a116819",
2143921434 "from": "azimuth-solidity@github:urbit/azimuth",
2144021435 "requires": {
2144121436 "babel-polyfill": "^6.26.0",
@@ -28503,13 +28498,6 @@
2850328498 "bn.js": "^4.11.6",
2850428499 "elliptic": "^6.4.0",
2850528500 "xhr-request-promise": "^0.1.2"
28506− },
28507− "dependencies": {
28508− "bn.js": {
28509− "version": "4.12.0",
28510− "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
28511− "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
28512− }
2851328501 }
2851428502 },
2851528503 "get-stream": {
src/lib/constants.ts+2
@@ -230,6 +230,7 @@ const EIP1559_TRANSACTION_TYPE = 2;
230230// https://chainlist.org/?testnets=true
231231const ETHEREUM_MAINNET_CHAIN_ID = '0x1';
232232const ETHEREUM_GOERLI_CHAIN_ID = '0x5';
233+const ETHEREUM_LOCAL_CHAIN_ID = '0x539';
233234
234235export {
235236 CHECK_BLOCK_EVERY_MS,
@@ -282,4 +283,5 @@ export {
282283 INITIAL_NETWORK_KEY_REVISION,
283284 ETHEREUM_MAINNET_CHAIN_ID,
284285 ETHEREUM_GOERLI_CHAIN_ID,
286+ ETHEREUM_LOCAL_CHAIN_ID,
285287};
src/lib/flags.js+1−1
@@ -1,7 +1,7 @@
11import { version } from '../../package.json';
22
33// are we running bridge in a development build
4−export const isDevelopment = import.meta.env.DEV === 'development';
4+export const isDevelopment = import.meta.env.DEV === true;
55export const isGoerli = import.meta.env.VITE_GOERLI === 'true';
66export const isMainnet = import.meta.env.VITE_MAINNET === 'true';
77export const versionLabel =
src/lib/network.js+7−2
@@ -1,6 +1,7 @@
1−import { isMainnet } from './flags';
1+import { isDevelopment, isGoerli, isMainnet } from './flags';
22import {
33 ETHEREUM_GOERLI_CHAIN_ID,
4+ ETHEREUM_LOCAL_CHAIN_ID,
45 ETHEREUM_MAINNET_CHAIN_ID,
56} from './constants';
67
@@ -34,7 +35,11 @@ const chainIdToNetworkType = chainId => {
3435};
3536
3637const expectedChainId = () => {
37− return isMainnet ? ETHEREUM_MAINNET_CHAIN_ID : ETHEREUM_GOERLI_CHAIN_ID;
38+ return isGoerli
39+ ? ETHEREUM_GOERLI_CHAIN_ID
40+ : isDevelopment && !isMainnet
41+ ? ETHEREUM_LOCAL_CHAIN_ID
42+ : ETHEREUM_MAINNET_CHAIN_ID;
3843};
3944
4045export {
src/worker/index.ts+1
@@ -1,4 +1,5 @@
11import { Buffer } from 'buffer/';
2+// eslint-disable-next-line
23(self as any).Buffer = Buffer;
34
45export const walletgenWorker = new ComlinkWorker<typeof import('./worker')>(
truffle-config.js+1−1
@@ -5,7 +5,7 @@ require('babel-polyfill');
55module.exports = {
66 networks: {
77 development: {
8− host: 'localhost',
8+ host: '0.0.0.0',
99 port: 8545,
1010 network_id: '*', // Match any network id
1111 gas: 6000000,