Commit Graph

74 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
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 5b3d8943cd refactor(test): make embarkJS importable in tests 2018-11-30 15:45:19 -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
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
Jonathan Rainville fd1dc63037 enable self-referencing contracts in onDeploy 2018-10-25 19:11:49 -04:00
Jonathan Rainville ccd064037f remove ens test as it is not applicable anymore 2018-10-23 11:13:50 -04: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
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
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
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
Jonathan Rainville 985358b088
fix web3 being reseted every test and fix ens failing on web3 reset 2018-10-22 19:54:48 +02:00
Jonathan Rainville ce3f9bdf25
fix a couple of bugs caused by bounties 2018-10-22 19:54:48 +02:00
Subramanian Venkatesan f686fec74a
ens resolve 2018-10-22 19:53:50 +02:00
Anthony Laibe b2206b9358 Fix test 2018-09-17 10:13:40 +01:00
Jonathan Rainville d9350899b7 fix tests 2018-09-14 15:21:45 -04:00
Anthony Laibe 63d2478dd0 Fix embark test using node option 2018-09-12 15:03:17 +01:00
Anthony Laibe 7bd0f45fec Remove ENS contracts from test app 2018-09-12 09:29:34 +01:00
Jonathan Rainville 3e89729331 conflict with indents 2018-08-31 08:46:08 -04:00
Iuri Matias a0d864b8ae
Merge pull request #746 from embark-framework/bug_fix/tests-ws-bug
Fix test_app with a WS node
2018-08-24 15:53:54 -04:00
Jonathan Rainville f45c7bc256 use secureSend for SimpleStorage set as it can cause hangs on WS 2018-08-24 13:11:06 -04:00
Jonathan Rainville 13e0d453ae fix websocket test, but still some hangs on second test run 2018-08-24 12:09:38 -04:00
Iuri Matias 864b41a2c2
Merge pull request #745 from embark-framework/deployIf
deployIf field + minor refactor
2018-08-24 10:33:58 -04:00
Anthony Laibe 51a1395316 Update ENS test using global 2018-08-24 14:48:14 +01:00
Iuri Matias 5fa089d51c add test for deployIf 2018-08-24 09:12:31 -04:00
Jonathan Rainville 8f3a42b926 catch $accounts in contract config 2018-08-21 16:09:49 -04:00
Anthony Laibe 7aae8bc798 Remove test 2018-08-21 16:05:59 -04:00
Anthony Laibe 9ed162bc26 Change connection 2018-08-21 16:05:59 -04:00
Jonathan Rainville 212eb79754 fix small oopsies and make it work 2018-08-21 16:05:58 -04:00
Jonathan Rainville d14630f636 use setInterval to wait for deploy complete 2018-08-21 15:53:39 -04:00
Jonathan Rainville bb9f058b15 small cleanups 2018-08-21 15:53:20 -04:00
Jonathan Rainville 01de35aab9 up timeout 2018-08-21 15:53:02 -04:00
Jonathan Rainville b1c04c6027 add test for ENS 2018-08-21 15:53: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 8766c9b761 show warning if dependency is not deploying 2018-06-13 13:47:11 -04:00
Jonathan Rainville d19c473b81 add a test to test events 2018-06-12 11:38:25 -04:00
Iuri Matias c4ca4e52b8 support embarkjs in the tests 2018-06-10 12:11:34 -04:00