Commit Graph

327 Commits

Author SHA1 Message Date
Iuri Matias 9f814d8599 remove debug 2018-07-27 14:55:01 -04:00
Iuri Matias 68a187136d move blockchain process to own module 2018-07-27 14:55:01 -04:00
Iuri Matias 80c617cc60 first stab at refactor blockchain launcher 2018-07-27 14:55:01 -04:00
Iuri Matias 2192347631
Merge pull request #642 from embark-framework/features/ens-register
ENS pre-register domains in development
2018-07-27 14:51:47 -04:00
Jonathan Rainville f0746a8d8b add new blockchain event 2018-07-26 14:50:44 -04:00
Iuri Matias 444c504061
Merge pull request #640 from embark-framework/feature/log-gas-info
Display info about gas when deploying contract
2018-07-26 14:42:46 -04:00
Michael Bradley 83d42a3a44
Merge pull request #631 from embark-framework/features/embarkjs-from-npm
use the embarkjs package
2018-07-26 12:50:03 -05:00
Iuri Matias c0d2acd0d4
Merge pull request #626 from embark-framework/bug_fix/duplicate-deps
fix duplicate dependencies and warn correctly for length
2018-07-26 13:32:07 -04:00
Michael Bradley, Jr 406c1c3fce simplify ternary re: `__mainContext` and `this` 2018-07-25 16:04:24 -05:00
Michael Bradley, Jr f4b00e6bbf rm disabled line 2018-07-25 16:03:52 -05:00
Michael Bradley, Jr 757e825be9 mainContext -- fallback to `this`, then `self`, then `undefined` 2018-07-25 16:03:52 -05:00
Michael Bradley, Jr 9730c198d3 don't blow away the global web3 2018-07-25 16:02:58 -05:00
Michael Bradley, Jr 5d67917326 check for self 2018-07-25 16:02:58 -05:00
Michael Bradley, Jr 3fb4d86e67 window -> global; reorg statements 2018-07-25 16:02:58 -05:00
Michael Bradley, Jr 207f3ffe93 make Web3 (note capital 'w') globally accessible 2018-07-25 16:01:48 -05:00
Michael Bradley, Jr dc50ea864e import EmbarkJS from npm pkg, re-export, make it globally accessible 2018-07-25 16:01:48 -05:00
Anthony Laibe eea987f95e Display info about gas when deploying contract 2018-07-25 13:27:15 +01:00
Anthony Laibe d0b76ea4bc Remove code dependencies to underscore 2018-07-24 13:29:06 +01:00
Richard Ramos c376cd9000 Add environment to EmbarkJS 2018-07-18 10:49:44 -04:00
Jonathan Rainville f49d21d491 fix the indexOf instead by simulating what solc does 2018-07-12 11:18:03 -04:00
Jonathan Rainville 5e210a67fa fix duplicate dependencies and warn correctly for length 2018-07-12 10:23:24 -04:00
Iuri Matias 3ed4d28970 remove custom web3 js; use packaged one instead 2018-07-12 01:04:10 +03:00
Jonathan Rainville cc3839382c check for receipt address before calling back 2018-07-11 08:47:12 -04:00
Jonathan Rainville d3366197b3 add interval in case deployment gets stuck 2018-07-09 16:50:38 -04:00
Jonathan Rainville d0525c7e5b
Merge pull request #614 from embark-framework/bug_fix/events-dont-wrok
Just add back the gas cost PR
2018-07-09 11:25:25 -04:00
emizzle 5c385b0e82 Fixed __mainContext error
There was a condition checking if blockchain config was disabled and if so, do not generate any provider code, which is where the `__mainContext` was being defined. This was changed to generate the `__mainContext` code first, then if blockchain is disabled, return the already generated code.
2018-07-09 10:57:14 +10:00
Iuri Matias d40ae2f374
Merge pull request #606 from embark-framework/bug_fix/events-dont-wrok
Fix events usage with websocket providers
2018-07-07 00:17:54 +03:00
Jonathan Rainville c7876bc7cd add reporter with event to get receipt 2018-07-06 15:11:18 -04:00
Jonathan Rainville 415df3312f fix webserver errors 2018-07-06 14:43:01 -04:00
Jonathan Rainville 817c4a6209 wip working 2018-07-05 08:38:19 -04:00
Jonathan Rainville 66b7d50d61 remove provider-engine as it has been creating lots of issues 2018-07-03 16:39:17 -04:00
Iuri Matias f43b924477 fix metamask check for non dev environment 2018-06-29 18:00:21 -04:00
Iuri Matias aff102a169 detect if there is a connection error and pass it down to the ready function 2018-06-29 17:49:17 -04:00
Jonathan Rainville 92c8f00ba8 wip fixes 2018-06-29 17:09:19 -04:00
Jonathan Rainville 62c6b57f45 conflict in provider 2018-06-29 13:56:22 -04:00
Iuri Matias 892285d415 improve metamask warning 2018-06-28 09:50:09 -04:00
emizzle f67a807ac8 Updated online/offline event checks so they are run during initialisation.
Changed the online event to `once` and set it to be bound every time the node goes offline.

The above changes handle the case where:
1) `embark run` runs and starts geth.
2) geth is killed manually
3) `embark blockchain` is run in separate process to restart geth
4) the `embark run` process detects this change and restarts the web3 provider and recompiles/deploys/builds

Every time `embark blochain` is restarted, an error is appended and all are emitted from the `eth-block-tracker`. This is a bug but can't figure out where it originates. The downside is that if, for example, `embark blockchain` is restarted 4 times, there will be 4 errors emitted from the `eth-block-tracker`. Because of this, errors emitted from `eth-block-tracker` have been reduced to trace to avoid clogging the logs.
2018-06-26 13:02:41 +10:00
emizzle 4ce7a179fd Handle geth process exit via crash/kill and also via killing `embark blockchain`
First case - run `embark run` which starts a blockchain node, then manually kill the `geth` process. Would throw `{ [Error: connect ECONNREFUSED 127.0.0.1:8543] message: 'connect ECONNREFUSED 127.0.0.1:8543', code: -32603 }` error and ruins the dashboard.

Second case, 1) run `embark blockchain` 2) run `embark run` 3) kill `embark blockchain` throws the error `{ [Error: connect ECONNREFUSED 127.0.0.1:8543] message: 'connect ECONNREFUSED 127.0.0.1:8543', code: -32603 }` and ruins the dashboard.

The first case was solved by having the child blockchain process that spawns geth listen for geth exit, then kill itself.

The second case required updating of `eth-block-tracker` to v4.0.1 inside of the `embark-web3-provider-engine`. v4.0.1 was a major version update and introduced breaking changes. Those changes were handled inside of `embark-web3-provider-engine`, covered in **blocker** PR https://github.com/jrainville/provider-engine/pull/1.
2018-06-26 13:02:41 +10:00
Jonathan Rainville 832e757262 add triple equals 2018-06-20 14:06:15 -04:00
Jonathan Rainville 150b5170c4 fix tests using new dependencies 2018-06-20 13:56:43 -04:00
Jonathan Rainville 4298e18655 make groups of dependencyCount to do async by group 2018-06-20 11:15:47 -04:00
Jonathan Rainville aa02aeb74c move pingEndpoint to utils 2018-06-19 09:02:19 -04:00
emizzle ba66d763fe Add support for infura network hosts with api key.
Fix bug with non-development code generation.
2018-06-19 15:14:37 +10:00
emizzle b56def7c57 Updated web3 endpoint for use with infura api key and https
Allows `protocol` to be specified in config/contract.js[on] for `<env>/deployment/protocol`.
2018-06-19 14:43:55 +10:00
Jonathan Rainville ed1ac3af2e register web3 after init 2018-06-18 14:33:25 -04:00
Jonathan Rainville a988962aed change package name 2018-06-18 09:26:17 -04:00
Iuri Matias 37ab60d6de
Merge pull request #538 from embark-framework/features/ws-node
Enable connection to websocket node
2018-06-15 18:01:12 -04:00
emizzle 15faf3a336 Fix for starting embark with a contract that has an error, then fixing, seems to still break the pipeline.
Needed to reset the `compileError` flag once compilation succeeded.
2018-06-15 17:31:17 -04:00
Jonathan Rainville eb0ccbe7cc remove useless param 2018-06-15 15:22:06 -04:00
Jonathan Rainville f32ac90e71 enable connecting to ws node in tests 2018-06-15 15:16:55 -04:00