Commit Graph

373 Commits

Author SHA1 Message Date
Michael Bradley, Jr 25b5b9a801 window -> global; reorg statements 2018-08-21 15:47:05 -04:00
Michael Bradley, Jr dcf9b4a645 make Web3 (note capital 'w') globally accessible 2018-08-21 15:47:05 -04:00
Michael Bradley, Jr 0c4438941d import EmbarkJS from npm pkg, re-export, make it globally accessible 2018-08-21 15:47:05 -04:00
Anthony Laibe 1d71c7fbce Display info about gas when deploying contract 2018-08-21 15:47:05 -04:00
Anthony Laibe b679d3031a Remove code dependencies to underscore 2018-08-21 15:47:05 -04:00
Richard Ramos 38817ddab2 Add environment to EmbarkJS 2018-08-21 15:46:14 -04:00
Jonathan Rainville 3d729b8a78 fix the indexOf instead by simulating what solc does 2018-08-21 15:42:05 -04:00
Jonathan Rainville 6908cf5cdc fix duplicate dependencies and warn correctly for length 2018-08-21 15:42:05 -04:00
Iuri Matias 5d8f236df3 remove custom web3 js; use packaged one instead 2018-08-21 15:35:55 -04:00
Jonathan Rainville 50b0376954 check for receipt address before calling back 2018-08-21 15:31:55 -04:00
Jonathan Rainville 6593a92cc4 add interval in case deployment gets stuck 2018-08-21 15:30:11 -04:00
emizzle 7bd1598b3c 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-08-21 15:30:11 -04:00
Jonathan Rainville bd369ec1a8 add reporter with event to get receipt 2018-08-21 15:30:10 -04:00
Jonathan Rainville 4f4cb094d6 fix webserver errors 2018-08-21 15:29:32 -04:00
Jonathan Rainville 15ad24f002 wip working 2018-08-21 15:28:02 -04:00
Jonathan Rainville 26243e21e0 remove provider-engine as it has been creating lots of issues 2018-08-21 15:28:02 -04:00
Jonathan Rainville 01900f8c6e wip fixes 2018-08-21 15:26:31 -04:00
Jonathan Rainville 0e973dd908 conflict in provider 2018-08-21 15:22:07 -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
Jonathan Rainville 5a3a9878f9 add triple equals 2018-08-21 15:03:34 -04:00
Jonathan Rainville 86d8a30c15 fix tests using new dependencies 2018-08-21 15:03:34 -04:00
Jonathan Rainville 3c952f89ed make groups of dependencyCount to do async by group 2018-08-21 15:03:34 -04:00
Jonathan Rainville 7abdc9e0e6 set a limit funding 2018-08-14 14:05:21 -04:00
Iuri Matias a01e600857
Merge pull request #627 from embark-framework/bug_fix/warning-contract-path
trim the contract name to have the warning correctly (patch)
2018-07-26 13:31:59 -04: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 91f1748d60 don't wait for account funds 2018-07-17 17:30:23 +03:00
Iuri Matias 231199c0dc ad missing emit 2018-07-17 16:13:12 +03:00
Iuri Matias d0162a6c78 move - for now - determining gas price to deployment to avoid race conditions 2018-07-17 15:10:22 +03:00
emizzle 296663edc7 password read from config file and fix for gasprice 2018-07-16 21:19:01 +02:00
emizzle 11d6980f70 further dev funding 2018-07-16 18:48:32 +02:00
Jonathan Rainville 8875b1b7ab trim the contract name to have the warning correctly 2018-07-12 12:36:54 -04:00
Iuri Matias 6ee387653d fix metamask check for non dev environment 2018-06-29 18:14:21 -04:00
Iuri Matias db3356cec0 detect if there is a connection error and pass it down to the ready function 2018-06-29 18:14:08 -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
Jonathan Rainville b727d85358 small fixes 2018-06-01 13:53:09 -04:00
Jonathan Rainville 2d1a37d63b conflict in pakcgae lock 2018-06-01 13:44:49 -04:00
Jonathan Rainville 8664570d7c conflict in test 2018-06-01 13:43:43 -04:00
Jonathan Rainville d0a289a450 conflict in deployManager 2018-06-01 13:42:05 -04:00
Iuri Matias f3e7d03204 remove orbit 2018-06-01 10:15:41 -04:00
Iuri Matias 20d7496980 take into account errors when determining arguments 2018-05-31 10:02:57 -04:00
Iuri Matias 7d795fa180 remove unused var 2018-05-30 13:38:08 -04:00
Iuri Matias 4f20d31b4c add emitAndRunActionsForEvent 2018-05-30 13:38:08 -04:00
Iuri Matias 45f7767313 remove contracts manager dependency from deploy manager 2018-05-30 13:38:08 -04:00
Iuri Matias 1d782c0e53 emit contractsDeployed event only 2018-05-30 13:38:08 -04:00
Iuri Matias 68e6782f49 remove unneded assignment 2018-05-30 13:38:08 -04:00
Iuri Matias 9b368bc1b3 remove unneeded assignment 2018-05-30 13:38:08 -04:00
Iuri Matias 1912981d7d move contract deploy code to contract deployer; move it to events 2018-05-30 13:38:08 -04:00
Iuri Matias 70f38d863e fix code generator event 2018-05-30 13:35:36 -04:00
Iuri Matias 69e5af2308 replace beforeAction plugin api with event action api 2018-05-30 13:35:36 -04:00
Iuri Matias 16653d491b move onDeploy to new api 2018-05-30 13:35:36 -04:00
Iuri Matias 93e5003c64 cleanup 2018-05-30 13:35:36 -04:00
Iuri Matias 4f45b4fa13 add new plugin method for generalized event actions 2018-05-30 13:35:36 -04:00
Iuri Matias f08bb56337 simplify determine args method 2018-05-30 13:35:36 -04:00
Iuri Matias cf13f098ac refactor deploy method 2018-05-30 13:35:36 -04:00
Iuri Matias f4010bd66e remove unnecessary determin params call 2018-05-30 13:35:36 -04:00
Iuri Matias 8cc86e0b0f remove legacy events 2018-05-30 13:35:36 -04:00
Iuri Matias 3f9c55131b use requests instead of contractsManager directly 2018-05-30 13:35:36 -04:00
Iuri Matias 5f64376c84 refactor generateContractsJson 2018-05-30 13:35:36 -04:00
Iuri Matias fc92b69211 use self 2018-05-30 13:35:03 -04:00
Jonathan Rainville b5e96beb81 little oopsie 2018-05-30 12:07:48 -04:00
Jonathan Rainville ff0d24aa1f Merge branch 'features/ipfs-process' of https://github.com/embark-framework/embark into features/ipfs-process
# Conflicts:
#	lib/contracts/blockchain.js
2018-05-30 12:02:30 -04:00
Jonathan Rainville b5d9a86680 start blockchain process at false and deploy on ready 2018-05-30 12:00:44 -04:00
Jonathan Rainville a88ab82261 conflict in blockchain.js 2018-05-30 11:02:01 -04:00
Jonathan Rainville 4d0453fede
Merge pull request #468 from embark-framework/fix_service_check
early return if failing to connect to node
2018-05-30 08:24:15 -04:00
Iuri Matias cd96aebdcd early return if failing to connect to node 2018-05-28 17:55:59 -04:00
VoR0220 52524c2f59 eliminate nasty outdated test
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
2018-05-28 13:22:48 -05:00
Iuri Matias 6c921e3a85 fix typo 2018-05-28 13:58:49 -04:00
Iuri Matias 1eee68e901 fix typo; default environment to development 2018-05-28 13:53:10 -04:00
VoR0220 6fe3064edd spelling correction of metamask
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
2018-05-28 12:45:14 -05:00
VoR0220 f34bd5df4f env check
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
2018-05-28 12:28:38 -05:00
VoR0220 90b42bccb2 template correction to check for development environment and whether metamask is engaged and log that it is
Signed-off-by: VoR0220 <catalanor0220@gmail.com>
2018-05-28 12:27:55 -05:00