-
Notifications
You must be signed in to change notification settings - Fork 0
Hyperspace #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Hyperspace #4
Changes from all commits
a464a56
2036979
648bbcd
62be2aa
c7b7a3b
76e8810
74cf9b1
2bfaa24
e8c41d6
edf412b
72744d6
06e4e3e
c2b6998
951a7bf
de88b28
f4e9884
ba7472a
de96e9d
fabdefe
7a1090a
9c4ed25
56b0149
8abf2ba
28b1449
475c12a
4ab05d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| ## all | ||
| NODE_ENV = 'production' | ||
| LOG_DESTINATION = 'console' | ||
| LOG_LEVEL = 'info' | ||
| # e2e-tests | ||
| BROWSER_LOG_DESTINATION = 'browser.log' | ||
| HEADLESS = 'false' | ||
| USE_DAPPETEER = 'true' | ||
| WEB3TORRENT_URL = 'http://localhost:3000' | ||
| CLOSE_BROWSERS = 'true' | ||
|
|
||
| ## web3torrent, xstate-wallet, rps, simple-hub | ||
| CHAIN_NETWORK_ID = '3141' | ||
|
|
||
| ## simple-hub, e2e | ||
| INFURA_API_KEY = '' | ||
| RPC_ENDPOINT = https://api.hyperspace.node.glif.io/rpc/v1 | ||
|
|
||
| ## simple-hub, rps | ||
| FIREBASE_API_KEY = 'AIzaSyAOvhDzJir_El3O6SJ2xQlrpOisnObq6zw' | ||
| FIREBASE_PREFIX = 'netlify-hyperspace' | ||
| FIREBASE_PROJECT = 'web3torrent-default-rtdb' | ||
|
|
||
| ## rps, xstate-wallet, ttt | ||
| TARGET_NETWORK = 'hyperspace' | ||
|
|
||
| ## web3torrent, rps, ttt | ||
| WALLET_URL = 'http://localhost:3055' | ||
|
|
||
| ## simple-hub, xstate-wallet | ||
| CONSENSUS_APP_ADDRESS = '0xeB1170bf49fac482fA296C98Ac04024e8a2d6519' | ||
|
|
||
| NITRO_ADJUDICATOR_ADDRESS = '0xaA512d99EC808FBf49b1e6491A251f2E75f913Ad' | ||
| ETH_ASSET_HOLDER_ADDRESS = '0x6abaBB7e642C794264DAa2a1477B48521AaE1553' | ||
|
|
||
| TRIVIAL_APP_ADDRESS = '0x95900b17Bd2CE12431C99A886FfDC5a451C14344' | ||
|
|
||
| ## simple-hub | ||
| FIREBASE_URL = https://${FIREBASE_PROJECT}.firebaseio.com/ | ||
| # This is a funded address on goerli for the hub. This is NOT the production address/key | ||
| HUB_CHAIN_PK = '0xBB72BD0824663E0B52FA3523ACED0F866550BBC1FD600D7F2DA9C45CAC509AE7' | ||
| HUB_PARTICIPANT_ID = 'firebase:simple-hub' | ||
|
|
||
| ## xstate-wallet | ||
| # This is a funded address on goerli for the hub. This is NOT the production address/key | ||
| HUB_DESTINATION = '0x000000000000000000000000c4FB59b7fb0D8001Bda6DEA539117664573006c9' | ||
| USE_INDEXED_DB = 'true' | ||
|
|
||
| ## web3torrent | ||
| FUNDING_STRATEGY = 'Virtual' | ||
| SINGLE_ASSET_PAYMENT_CONTRACT_ADDRESS = '0x4964f1aE3Ca9Ea0a1e7EF873a379768dBc74F034' | ||
| SKIP_PREFLIGHT_CHECK = 'true' | ||
| TRACKER_URL = 'localhost:8000' | ||
| TRACKER_URL_HTTP_PROTOCOL = 'http' | ||
| GENERATE_SOURCEMAP = 'true' | ||
|
|
||
| ## rps | ||
| RPS_CONTRACT_ADDRESS = '0x' | ||
|
|
||
| ## web3torrent-tracker | ||
| TRACKER_PORT = 80 | ||
|
|
||
| ## ttt | ||
| TTT_CONTRACT_ADDRESS = '0x' | ||
| FIREBASE_PROJECT_TTT = 'tic-tac-toe-production' | ||
|
|
||
|
|
||
| ADD_LOGS = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| ## all | ||
| NODE_ENV = 'production' | ||
| LOG_DESTINATION = 'console' | ||
| LOG_LEVEL = 'info' | ||
| # e2e-tests | ||
| BROWSER_LOG_DESTINATION = 'browser.log' | ||
| HEADLESS = 'false' | ||
| USE_DAPPETEER = 'true' | ||
| WEB3TORRENT_URL = 'https://hyperspace-torrent.statechannels.org' | ||
| CLOSE_BROWSERS = 'true' | ||
|
|
||
| ## web3torrent, xstate-wallet, rps, simple-hub | ||
| CHAIN_NETWORK_ID = '3141' | ||
|
|
||
| ## simple-hub, e2e | ||
| INFURA_API_KEY = '' | ||
| RPC_ENDPOINT = https://api.hyperspace.node.glif.io/rpc/v1 | ||
|
|
||
| ## simple-hub, rps | ||
| FIREBASE_API_KEY = 'AIzaSyAOvhDzJir_El3O6SJ2xQlrpOisnObq6zw' | ||
| FIREBASE_PREFIX = 'netlify-hyperspace' | ||
| FIREBASE_PROJECT = 'web3torrent-default-rtdb' | ||
|
|
||
| ## rps, xstate-wallet, ttt | ||
| TARGET_NETWORK = 'hyperspace' | ||
|
|
||
| ## web3torrent, rps, ttt | ||
| WALLET_URL = 'https://hyperspace-wallet.statechannels.org/' | ||
|
|
||
| ## simple-hub, xstate-wallet | ||
| CONSENSUS_APP_ADDRESS = '0xeB1170bf49fac482fA296C98Ac04024e8a2d6519' | ||
|
|
||
| NITRO_ADJUDICATOR_ADDRESS = '0xaA512d99EC808FBf49b1e6491A251f2E75f913Ad' | ||
| ETH_ASSET_HOLDER_ADDRESS = '0x6abaBB7e642C794264DAa2a1477B48521AaE1553' | ||
|
|
||
| TRIVIAL_APP_ADDRESS = '0x95900b17Bd2CE12431C99A886FfDC5a451C14344' | ||
|
|
||
| ## simple-hub | ||
| FIREBASE_URL = https://${FIREBASE_PROJECT}.firebaseio.com/ | ||
| # This is a funded address on goerli for the hub. This is NOT the production address/key | ||
| HUB_CHAIN_PK = '0xBB72BD0824663E0B52FA3523ACED0F866550BBC1FD600D7F2DA9C45CAC509AE7' | ||
| HUB_PARTICIPANT_ID = 'firebase:simple-hub' | ||
|
|
||
| ## xstate-wallet | ||
| # This is a funded address on goerli for the hub. This is NOT the production address/key | ||
| HUB_DESTINATION = '0x000000000000000000000000c4FB59b7fb0D8001Bda6DEA539117664573006c9' | ||
| USE_INDEXED_DB = 'true' | ||
|
|
||
| ## web3torrent | ||
| FUNDING_STRATEGY = 'Virtual' | ||
| SINGLE_ASSET_PAYMENT_CONTRACT_ADDRESS = '0x4964f1aE3Ca9Ea0a1e7EF873a379768dBc74F034' | ||
| SKIP_PREFLIGHT_CHECK = 'true' | ||
| TRACKER_URL = 'web3torrent-tracker-hyperspace.herokuapp.com' | ||
| TRACKER_URL_HTTP_PROTOCOL = 'https' | ||
| GENERATE_SOURCEMAP = 'true' | ||
|
|
||
| ## rps | ||
| RPS_CONTRACT_ADDRESS = '0x' | ||
|
|
||
| ## web3torrent-tracker | ||
| TRACKER_PORT = 80 | ||
|
|
||
| ## ttt | ||
| TTT_CONTRACT_ADDRESS = '0x' | ||
| FIREBASE_PROJECT_TTT = 'tic-tac-toe-production' | ||
|
|
||
|
|
||
| ADD_LOGS = true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,11 @@ void (async () => { | |
| }); | ||
|
|
||
| process.env.TARGET_NETWORK = getNetworkName(process.env.CHAIN_NETWORK_ID); | ||
|
|
||
| // TODO: Devtools doesn't support hyperspace yet | ||
| if (Number(process.env.CHAIN_NETWORK_ID) === 3141) { | ||
| process.env.TARGET_NETWORK = 'hyperspace'; | ||
| console.log("Using 'hyperspace' as the target network"); | ||
| } | ||
|
Comment on lines
+56
to
+60
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How much work to fixup devtools? We make this change in many places... |
||
| if (process.env.TARGET_NETWORK === 'development') { | ||
| // Add contract addresses to process.env if running ganache | ||
| const {deployer} = await await setupGanache(process.env.XSTATE_WALLET_DEPLOYER_ACCOUNT_INDEX); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -347,7 +347,7 @@ export class ChainWatcher implements Chain { | |
|
|
||
| const response = await this.signer.sendTransaction({ | ||
| ...convertNitroTransactionRequest(transactionRequest), | ||
| gasPrice: GAS_PRICE | ||
| maxPriorityFeePerGas: GAS_PRICE | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Is this a good way to migrate the transaction type? Here's a good reference https://www.liquity.org/blog/how-eip-1559-changes-the-transaction-fees-of-ethereum .
In the short term, we can do whatever seems to work. But we should have an eye on things like this which may break once deployed to Filecoin mainnet. I think one alternative is to query the chain first to get a |
||
| }); | ||
| return response.hash; | ||
| } | ||
|
|
@@ -369,7 +369,7 @@ export class ChainWatcher implements Chain { | |
| }; | ||
| const response = await this.signer.sendTransaction({ | ||
| ...convertNitroTransactionRequest(transactionRequest), | ||
| gasPrice: GAS_PRICE | ||
| maxPriorityFeePerGas: GAS_PRICE | ||
| }); | ||
| const tx = await response.wait(); | ||
| return tx.transactionHash; | ||
|
|
@@ -497,10 +497,7 @@ export class ChainWatcher implements Chain { | |
| function convertNitroTransactionRequest(nitroTransactionRequest): TransactionRequest { | ||
| return { | ||
| ...nitroTransactionRequest, | ||
| gasLimit: nitroTransactionRequest.gasLimit | ||
| ? BN.from(nitroTransactionRequest.gasLimit) | ||
| : undefined, | ||
| gasPrice: nitroTransactionRequest.gasPrice | ||
| maxPriorityFeePerGas: nitroTransactionRequest.gasPrice | ||
| ? BN.from(nitroTransactionRequest.gasPrice) | ||
| : undefined, | ||
| nonce: nitroTransactionRequest.nonce ? BN.from(nitroTransactionRequest.nonce) : undefined, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain this a little more?