Commit Graph

310 Commits

Author SHA1 Message Date
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 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
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
Jonathan Rainville c8c0a5c42f enable websocket provider 2018-06-15 14:35:50 -04:00
Jonathan Rainville dcbd868b78 get gasPrice if no gasPrice set in contract.json 2018-06-14 15:22:50 -04:00
Iuri Matias a48a05cd27 remove unnended event listeners 2018-06-14 11:03:06 -04:00
Iuri Matias 5a2cf62ee5 reload config; create a config so it doens't damage original 2018-06-14 09:22:13 -04:00
Jonathan Rainville 8766c9b761 show warning if dependency is not deploying 2018-06-13 13:47:11 -04:00
Iuri Matias c8b52a1746 fix errors handling so it doesn't attempt to continue building when there are fatal errors compiling contracts 2018-06-08 07:07:27 -04:00
Jonathan Rainville a6a5bac053 use new provider when using account with a node specified 2018-06-07 16:07:58 -04:00
Jonathan Rainville 1b89199f50 fund accounts in wallet using contracts config 2018-06-07 13:06:09 -04:00
Jonathan Rainville a5ecd9f1f4 add tests for getBalance 2018-06-07 13:01:13 -04:00
Jonathan Rainville bb3e87d85e move getBalance in accountParser 2018-06-07 13:01:12 -04:00
Jonathan Rainville ac631f90dc fix missing error callback 2018-06-07 13:01:12 -04:00
Jonathan Rainville bfc8663a61 change account funding order to enable starting a node before 2018-06-07 12:55:07 -04:00
Iuri Matias cd6dcb7548 fix setting default account 2018-06-06 10:39:02 -04:00
Jonathan Rainville b32c90b56e compile tests only once 2018-06-04 10:45:50 -04:00
Iuri Matias 37d54e22db refactor services monitor to use events instead of passing addCheck around 2018-06-01 19:32:14 -04:00
Iuri Matias 17f5bb3905
Merge branch 'develop' into features/test-revamp-multi 2018-06-01 18:14:32 -04:00
Jonathan Rainville 876a9a3103 fix pipeline not building by removing the `once`s 2018-06-01 15:48:10 -04:00