Commit Graph

185 Commits

Author SHA1 Message Date
Michael Bradley, Jr 0307ba7ead blockchain -- defaultHost, dockerHostSwap 2018-08-21 15:53:39 -04:00
Anthony Laibe b679d3031a Remove code dependencies to underscore 2018-08-21 15:47:05 -04:00
Michael Bradley, Jr 423d0fadb8 set the host flag for ganache-cli 2018-08-21 15:42:05 -04:00
Michael Bradley, Jr 282513ad8e rm commented code and extra whitespace 2018-08-21 15:42:05 -04:00
Michael Bradley, Jr 4461ab46d5 disable dead code path -- ganache will never be falsy 2018-08-21 15:42:05 -04:00
Michael Bradley, Jr fa94d3c79a dont' need shelljs.which, can directly invoke embark's node_modules/.bin/ganache-cli 2018-08-21 15:42:05 -04:00
Michael Bradley, Jr 5b483f6f63 include old `const ganache =` line in original pos wrt disabled code 2018-08-21 15:34:32 -04:00
Michael Bradley, Jr 6947a44667 comment out `testrpc` (no-unused-vars) 2018-08-21 15:34:32 -04:00
Michael Bradley, Jr f5464b691f Embark's own ganache-cli will always be found 2018-08-21 15:34:32 -04:00
Michael Bradley, Jr e0ff8a735d embark-ganache-cli -> ganache-cli-embark 2018-08-21 15:34:32 -04:00
Michael Bradley, Jr 0180bb7cb2 always use Embark's own ganache-cli (embark-ganache-cli) 2018-08-21 15:33:00 -04:00
Andre Medeiros e2d5e6fd57 Linting 2018-08-21 15:33:00 -04:00
Andre Medeiros 8be8ca508f Fix failing test on blockchain 2018-08-21 15:33:00 -04:00
Michael Bradley, Jr db7553cf0f program -> program, programName 2018-08-21 15:31:55 -04:00
Michael Bradley, Jr 36b52742bf check for ganache-cli on PATH and fallback to embark-ganache-cli 2018-08-21 15:31:55 -04:00
Jonathan Rainville 054215ce21 wip changes 2018-08-21 15:31:55 -04:00
Jonathan Rainville a3d612f8ba remove use of initConfig 2018-08-21 15:30:43 -04:00
Iuri Matias 29c93da4cc fix extractZip 2018-08-21 15:30:11 -04:00
Jonathan Rainville ff340fe88c remove useless change 2018-08-21 15:30:10 -04:00
Iuri Matias 2b783ffd03 use utils extractZip instead of lib directly 2018-08-21 15:29:32 -04:00
Iuri Matias 1600150c2b refactor install template code 2018-08-21 15:29:32 -04:00
Iuri Matias 483a0b01e1 make linter happy 2018-08-21 15:28:03 -04:00
Iuri Matias c0bc6e1b7c add support to download a template 2018-08-21 15:28:03 -04:00
Jonathan Rainville 01900f8c6e wip fixes 2018-08-21 15:26:31 -04:00
Jonathan Rainville abb3d4e327 fix syncmode 2018-08-21 15:23:44 -04:00
Jonathan Rainville 18f60768f9 fix when using mining script 2018-08-21 15:21:24 -04:00
Jonathan Rainville dcc7b44377 fix miner 2018-08-21 15:20:12 -04:00
Jonathan Rainville fcbd4739dc only put isDev when specifically set 2018-08-21 15:20:11 -04:00
Jonathan Rainville cf403df1fb make it work 2018-08-21 15:18:12 -04:00
Jonathan Rainville 95a222e443 change fund account function 2018-08-21 15:18:12 -04:00
Jonathan Rainville 3e65d1c11b add geth miner. Needs to change eth and web3 2018-08-21 15:18:12 -04:00
Jonathan Rainville 1970f8fc53 use right path depending of os 2018-08-21 15:18:12 -04:00
Jonathan Rainville 5581964fab conflict in package json 2018-08-21 15:17:05 -04:00
emizzle bcd5593040 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-08-21 15:08:25 -04:00
emizzle ee59d43c77 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-08-21 15:08:25 -04:00
Richard Ramos 6a20458032 Fix for skip-undeployed is not specified 2018-08-21 15:03:34 -04:00
Michael Bradley, Jr a8f8acb7ff when installing template mv dot.gitignore -> .gitignore if it exists 2018-08-12 15:02:03 -05:00
Michael Bradley, Jr d70264adb6 blockchain -- defaultHost, dockerHostSwap 2018-08-02 15:31:55 -05:00
Michael Bradley, Jr 2ad8097dcb simulator -- defaultHost, dockerHostSwap 2018-08-02 15:31:27 -05:00
emizzle 9b41fa8ac2 Modified DevFunds to “factory pattern”
Added a “factory pattern” to DevFunds to allow for async calls to be made during object construction. This allows for `web3.eth.getAccounts` to be called and the `accounts` property assigned on instantiation.

This modification allows each unit test case to be run independently of the others.
2018-08-01 11:35:42 +10:00
emizzle 7cb9cd5622 Basic unit tests complete for dev funds
Finished added unit tests for dev_funds. These are weak tests as the FakeIpcProvider does not provide enough support for keeping track of accounts and balances and instead we are injecting the provider responses in the tests, which kind of defeats the purposes of the tests. Instead, the FakeIpcProvider should be a little smarter and do more of what a real node would do.
2018-07-31 14:59:55 +10:00
emizzle 12304eac16 Adding in unit tests for dev_funds (WIP) 2018-07-31 14:59:55 +10:00
Iuri Matias c44a95e6ea fix linting issue 2018-07-30 06:58:54 -04:00
Iuri Matias 71e9eed67b use config password file; tolerate somethign going terribly wrong since it wouldnt' affect the blockchain process generally 2018-07-19 11:15:16 +03:00
Iuri Matias 69f356b3f0 only use personal in --dev mode 2018-07-19 10:58:47 +03:00
Iuri Matias 0099078e94 fix lint 2018-07-18 17:53:37 +03:00
Iuri Matias c1809e3752 Merge branch 'fund_accounts' of github.com:embark-framework/embark into fund_accounts 2018-07-18 17:48:58 +03:00
Iuri Matias 20406ba51a fix lint 2018-07-18 17:47:53 +03:00
emizzle 9382f98933 Housekeeping and removal of none additions
Clean up debugging statements from fund_accounts.

Removed the addition of the nonce increment for contracts deploy as this was only affecting mneumonic-generated accounts which is not meant for dev environment.
2018-07-18 14:08:32 +02:00
Iuri Matias 5e3740f088 add regular account unlocks in devMod due to issues with geth 2018-07-18 13:45:18 +03:00