Commit Graph

224 Commits

Author SHA1 Message Date
emizzle f54982254d fix(@embark/core): fix to allow large ether values
Specifying large ether values in the configs was causing embark to crash as javascript could not handle the large integer after the value was converted to wei.

The fix involves converting all values to BigNumbers and then comparing and adding/subtracting BigNumbers from that point forward.

There are two specific components that this affected: `config/contracts > accounts > balance` and `config/blockchain > account > balance`. The contracts config is used to fund accounts for contract deployment while the blockchain config is used for dev_funds accounts.

JSON.stringify unknown log messages

Add a unit test in the test app that sets a large ether value in the config before contract deployment and ensures the account balance is the value specified in the config.

Prior to this commit, if subsequent unit tests contained different account configurations, the blockchain VM was essentially reset, however EmbarkJS was hanging on to the old providers it used from the previous configuation.

In addition, there is a limitation with `embark.registerActionForEvent` in that the action will be persisted across configuration changes. In our case, once the configuration was updated in a subsequent unit test, the directive subdomains would be attempted to be registered in ENS using the old configuration.

This commit does two things:
1) It resets the EmbarkJS.Blockchain and EmbarkJS.Names providers to the new chain configuration
2) Update to the ENS directives that prevents attempts at registered configured subdomains for previous configurations.
2019-01-09 16:56:23 -05:00
Andre Medeiros b0c226a13f feature: disallow eval and require in cockpit 2018-12-20 17:41:03 -05:00
Anthony Laibe 8a6d075cd1 feat: add coverage events
Instead of looking at the transaction, instrument the
source to publish coverage event
2018-12-20 16:21:31 -05:00
Jonathan Rainville a147e2706b refactor: change registerConsoleCommands to the new API 2018-12-17 09:59:03 -05:00
Jonathan Rainville 20fccfb1c6 refactor(blockchain): add a web3 provider for embarkJS 2018-12-07 19:29:10 -05:00
emizzle 75111569a2 feat(@embark/core): Support directives in ENS config
Support directives in ENS configurations, such that subdomains can be registered to addresses of deployed tokens.

The following directives are supported:
```
"register": {
      "rootDomain": "embark.eth",
      "subdomains": {
        "status": "0x4a17f35f0a9927fb4141aa91cbbc72c1b31598de",
        "mytoken": "$MyToken",
        "MyToken2": "$MyToken2"
      }
    }
```

Add unit test for these directives.
2018-12-07 10:21:47 -05:00
Jonathan Rainville 5928d134fc refactor(blockchain/accounts): refactor blockchain config accounts 2018-12-07 10:02:34 -05:00
Jonathan Rainville 5b3d8943cd refactor(test): make embarkJS importable in tests 2018-11-30 15:45:19 -05:00
Jonathan Rainville d09d410021 refactor(ENS): adds a whitelist for ens
Enables only the use of domains in that white list
2018-11-23 16:32:57 -05:00
Anthony Laibe 45afe83cb3 feat: update to solc 0.5.0 2018-11-21 08:50:43 +00:00
Anthony Laibe 3406ae833c feat: Allow parallel deploy 2018-11-16 09:35:12 +00:00
Jonathan Rainville ea2a656ec1 fix(tests): fix tests that fetched files from devleop
fix tests that fetched contracts from develop by changing to master
improve error logging for downloads
2018-11-09 04:52:02 -05:00
Pascal Precht af1bc90acc fix(ci): make CI happy again by updating http paths to master branch
Some test endpoints have still pointed to `develop` branch on GitHub,
which made our tests fail as we're now on `master` branch
2018-11-09 04:47:54 -05:00
Jonathan Rainville 3e9d99b699 chore(config): change RPC to WS in contract configs 2018-11-07 12:51:35 -05:00
Eric Mastro 000a4fe322
Merge pull request #1000 from embark-framework/bug_fix/self-dep
enable self-referencing contracts in onDeploy
2018-10-31 10:29:57 +01:00
Iuri Matias edc0a7cd43 revert some changes made to contract 2018-10-29 15:44:55 +01:00
Iuri Matias 71380be0ca fix linting issues 2018-10-29 15:33:12 +01:00
Michael Bradley, Jr eeeb74602b cleanup, consolidate .gitignore files 2018-10-28 13:16:20 +01:00
Iuri Matias 40ed7b960f display globals in the debugger; display vars found in failing line 2018-10-27 21:31:13 +02:00
Jonathan Rainville fd1dc63037 enable self-referencing contracts in onDeploy 2018-10-25 19:11:49 -04:00
Iuri Matias 5efda2c428 move debugger to sidebar; fix config issue 2018-10-24 13:10:31 -04:00
Iuri Matias 1d6da99e8f display last error found
display last line on tx

fix debugger call

listen to source event only after jumping to the end

keep track of last tx; add minimal debug feature; fix ast issue

initial debugger apis & ui integration

prevent crash when step is out of bounds; send all all available data in websocket

add debugger commands

fix line number tracking in editor; toggle breakpoints

replace timeouts with callbacks

add debugger manager & refactor

refactor debugger api

refactor cmd line debugger

reduce debugger decoupling

reduce debugger decoupling

fix debug buttons

trigger source update so api triggers ws event to update source location

move locals and contracts vars to a json view

improve debugger icons

simplify debugger data

update debug package

add command handler to get a contract given a tx; update debugger so it can get a contract by its tx instead of tracking latest txs only

update debugger package
2018-10-23 18:27:40 -04:00
Jonathan Rainville 74cca483b8 fix test app in develop (use WS instead of WEB3) 2018-10-23 11:23:42 -04:00
Jonathan Rainville ccd064037f remove ens test as it is not applicable anymore 2018-10-23 11:13:50 -04:00
Iuri Matias 60a5f52e16
remove files that should not be in source control 2018-10-23 11:11:59 +02:00
Iuri Matias b06d224883
fix services & processes; improve UI 2018-10-23 11:11:58 +02:00
Iuri Matias 7c5955759f
move dashboard api into dashboard module 2018-10-23 10:21:37 +02:00
Iuri Matias bf4758494e
fix ws send; attempt to fix missing contractsState in ws 2018-10-23 10:21:36 +02:00
Iuri Matias 26d7e42218
move dashboard api into dashboard module 2018-10-23 10:20:09 +02:00
Iuri Matias 09390276bc
fix ws send; attempt to fix missing contractsState in ws 2018-10-23 10:20:09 +02:00
Anthony Laibe ea16a865bd
Remove test 2018-10-23 10:17:26 +02:00
Anthony Laibe 3aff69c0c5
Change connection 2018-10-23 10:17:26 +02:00
Jonathan Rainville 1e8df75f6a
use setInterval to wait for deploy complete 2018-10-23 10:13:59 +02:00
Jonathan Rainville 4f1043910d
small cleanups 2018-10-23 10:13:59 +02:00
Jonathan Rainville 39cc281359
up timeout 2018-10-23 10:13:20 +02:00
Michael Bradley, Jr 6755b96aff
bump jquery dep, src in test_apps/test_app re: npm security warning 2018-10-23 10:08:00 +02:00
Jonathan Rainville b491134bb9
remove provider-engine as it has been creating lots of issues 2018-10-23 10:04:14 +02:00
Jonathan Rainville 953a06ce05
wip fixes 2018-10-23 10:03:26 +02:00
Jonathan Rainville 0dee66bb4e
remove log 2018-10-23 10:01:55 +02:00
Jonathan Rainville f9d21f4e02
intercept logs by adding the name only 2018-10-23 10:01:55 +02:00
Iuri Matias 31a3fbef66
fixes due to bad rebase 2018-10-23 10:00:30 +02:00
Jonathan Rainville e95efbfc54
small cleanups 2018-10-23 09:53:47 +02:00
Jonathan Rainville 0bbc1f89b6
remove provider-engine as it has been creating lots of issues 2018-10-23 09:52:57 +02:00
Jonathan Rainville 7b5e88a6a9
wip fixes 2018-10-23 09:52:40 +02:00
Jonathan Rainville bc837848d2
conflict in package json 2018-10-23 09:51:58 +02:00
emizzle 90be6125db
Removed p-iteration from embark altogether.
Replaced usage in storage module (on dapp side) with async.js `detectSeries`
2018-10-23 09:51:58 +02:00
Iuri Matias 95df68e67c
fixes due to bad rebase 2018-10-23 09:46:40 +02:00
Jonathan Rainville 5488961a1e
small cleanups 2018-10-23 09:37:06 +02:00
Jonathan Rainville 3ca70d6e21
remove provider-engine as it has been creating lots of issues 2018-10-23 09:02:40 +02:00
Jonathan Rainville da82c2eba2
wip fixes 2018-10-23 09:02:15 +02:00