Commit Graph

6208 Commits

Author SHA1 Message Date
Iuri Matias 9aeddaa998 chore: rename org references from embark-framework to embarklabs 2020-01-16 15:36:29 -05:00
Iuri Matias 7a3bf59c81 feature(@package/embarkjs): warn when a embarkjs plugin might be missing 2020-01-16 11:54:53 -05:00
Iuri Matias 8691716346 bugfix(@embark/embarkjs): tolerate a embarkjs plugin missing 2020-01-16 11:54:53 -05:00
Jonathan Rainville f5849e0af7 fix(@embark/test-dapp): fix test_dapp broken for ENS resolve 2020-01-16 11:45:14 -05:00
Jonathan Rainville 42bd3b7792 fix(@embark/ens): fix Infura connection and testnet use of ENS
Fixes the use of Infura to connect to the ENS contracts. When
connecting directly to Infura, it would throw with `rejected due to
project ID settings`, because it doesn't accept the VM as the domain
Instead, when passing from the proxy, it works. So I changed the
default when no dappConnection to ['$EMBARK']. I also added a
message when the error happens to help users fix it themselves

When in the testnet, we don,t register because we already have the
addresses, which is fine, but we also didn't populate the ensConfig
object which contains the important information about the addresses
and ABI.

There was a lot of lint problems in a couple of files so I cleaned
that up
2020-01-16 11:45:14 -05:00
Jonathan Rainville 6f239f4d90 fix(transaction-logger): fix circular dep issue with util.inspect 2020-01-16 10:21:58 -05:00
Jonathan Rainville b607763e44 refactor(transaction-logger): change saveLog to be async 2020-01-16 10:21:58 -05:00
Jonathan Rainville 7c70ce1dff chore: remove stream-json package as it is no longer used 2020-01-16 10:21:58 -05:00
Jonathan Rainville 22f1f72897 refactor(transaction-logger): replace log file write by append
## Problem
Doing read, then write each a trasaction or call exectues could get
heavy, especially with regular txs on
This was especially true in the tests, which led to deactivate the
tx logger in the tests
## Solution
Instead of reading the whole file, adding the JSON line a writing,
we instead just append some pseudo JSON to it that later gets read
and parsed correctly back to JSON
2020-01-16 10:21:58 -05:00
Jonathan Rainville 6db8d8750a feat(@embark/nethermind): add Nethermind blockchain client plugin 2020-01-16 10:15:18 -05:00
Jonathan Rainville 4190d5ec65 fix(@embark/utils): fix deconstruct url to return port as an integer
(cherry picked from commit e41a1d58c11b9808e8d2827e73ed98bce6d82d22)
2020-01-16 10:15:18 -05:00
Michael Bradley, Jr 9aa9e6cf5a build(deps): replace ethereumjs-wallet@0.6.3 with @embarklabs/ethereumjs-wallet@0.6.4
See: https://github.com/embark-framework/ethereumjs-wallet/releases/tag/v0.6.4
See also: https://www.npmjs.com/package/@embarklabs/ethereumjs-wallet?activeTab=versions

The primary difference is that `ethereumjs-wallet@0.6.3` is depdendent on a
version of `scrypt.js` that has the [older `scrypt`][old-scrypt] package as an
optional depdendency; whereas `@embarklabs/ethereumjs-wallet` depends on
[`@web3-js/scrypt-shim`][web3-scrypt] (authored by @michaelsbradleyjr), which
checks for the availability of
[Node's built-in scrypt KDF][builtin-kdf] (Node.js `>= 10.5.0`) and uses that,
or else falls back to a pure JS implementation provided by the `scryptsy`
package.

[old-scrypt]: https://github.com/barrysteyn/node-scrypt
[web3-scrypt]: https://github.com/web3-js/scrypt-shim
[builtin-kdf]: https://nodejs.org/docs/latest-v10.x/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback
2020-01-15 11:31:50 -05:00
Pascal Precht 23adb0ced7 test(@embark/code-runner): add unit tests for code-runner module 2020-01-15 11:30:31 -05:00
Pascal Precht c947517c0d feat(@embark/testing): introduce proper request2 api for async/await 2020-01-15 11:30:31 -05:00
Iuri Matias dc9171a1e7 feature(@package/debugger): update to remix-debug 0.3.23 2020-01-15 09:58:17 -05:00
Iuri Matias f0aefb3fb0 feature(@package/solidity-tests): update to remix-tests 0.1.24 2020-01-15 09:58:17 -05:00
Iuri Matias c395826c53 feature(@packages/solidity): include ast in compiled object 2020-01-15 09:58:17 -05:00
Jonathan Rainville e2767c27a9 fix(@embark/cmd_controller): fix build command to escape on finish 2020-01-15 09:56:55 -05:00
Pascal Precht 73d04433cf feat(@embark/deployment): introduce `interfaces` and `libraries` configuration
This commit adds two new configuration settings for Smart Contract configuration:

- `interfaces` - Any Smart Contract that represent an interface or is used for inheritance
- `libraries` - Any Smart Contract that is used as a library

This makes the configuration less redundant in cases where otherwise the `deploy`
property has been set to `false`, such as:

```
deploy: {
  Ownable: {
    deploy: false
  },
  ...
}
```

The above can now be done via:

```
interfaces: ['Ownable'],
deploy: {
  ...
}
```
2020-01-15 09:45:42 -05:00
Pascal Precht 25270582d8
chore: add v5 release post 2020-01-14 17:45:13 +01:00
Jonathan Rainville 9711790f92 docs(@embark/site): add migration guide to Embark v5 2020-01-14 17:42:47 +01:00
Pascal Precht 013599859e
chore: rename article file and fix url generation 2020-01-10 14:36:29 +01:00
Graham McBain ccf8bcb27d
chore: add article about takebacktheweb event 2020-01-10 14:23:05 +01:00
emizzle 81af3affc4 fix(@embark/tests): Fix failing test with `—node=embark`
## Problem
When using `embark test —node=embark` with the test app, the test that listens for contract events would always fail after timing out. Funnily enough, after the timeout, the subsequent test would run, executing a method that would ulimately fire the event listened for in the previous test, causing the second test to fail as well.

## Solution (workaround)
Update the contract events listener test in the test app to execute the `set2` method twice, successfully working around the issue.

## NOTES
The cause of the issue is unknown and why the workaround works is also unknown.

This change works with both `embark test` and `embark test —node=embark`.
2020-01-09 11:41:48 -05:00
Pascal Precht e37d3f73ff feat(@embark/test-runner): expose evmClientVersion for conditional tests
This commit introduces a new `global.getEvmVersion()` that can be used to
conditionally run tests, such as when tests rely on RPC APIs that are only
available in specific evm nodes.
2020-01-09 11:39:28 -05:00
emizzle 1e1172e86c fix(@embark/debugger): Prevent error if contract not tracked by Embark
Null check to prevent an error during automated debugging for failed transactions.
2020-01-09 11:37:25 -05:00
Pascal Precht 6797a8a9fc chore(@embark/proxy): suppress error logs when inside test-runner context
When running tests that expect the EVM to fail, Embark's proxy keeps logging
the VM errors to stdout making it look like tests weren't successful, while they
are actually passing.

Inside a test-runner it's probably expected not to see any error logs when the
tests in question expect errors.

This commit changes the proxy to use `debug()` logs instead of `error()`, making
it configurable through log verbosity how much errors are seen.
2020-01-09 11:36:18 -05:00
emizzle 5843a8e03e fix(@embark/transaction-logger): Circular JSON log and unknown contract log level
## Issue
Transaction logs for contracts that were unknown to Embark (ie not in the dapp) would often log super large objects (filling the terminal) that were not formatted with spaces so were hard to read without actually be that useful. In addition, occasionally the object logged would throw the error `TypeError: Converting circular structure to JSON`.

## Fix
Set the log level for transaction logs that are not from a known contract to `debug`, so that they do not flood the terminal with often usused information.

Use `util.inspect` to print the transaction log instead of `JSON.stringify` to prevent circular structure errors.
2020-01-09 11:34:43 -05:00
Bouzaine Chamsddine 6be404bc7f docs: updating copyrights to 2019-2020 2020-01-09 11:33:20 -05:00
Bouzaine Chamsddine fa49c3b3a4 docs: updating copyrights to 2020 2020-01-09 11:33:20 -05:00
Michael Bradley, Jr ba0d6d17f3 chore(release): 5.0.0 2020-01-07 12:14:37 -06:00
Pascal Precht a865bc3d6a
article: remove paragraph 2020-01-07 11:06:34 +01:00
Jonathan Rainville c8f86e55f0 fix(@embark/watcher): endless loop when artifacts are put in src
The problem was that putting the artifacts in src caused them to be watched
and thus creating an infinite loop, because a change in src triggers the build of the artifacts
This was fixed by ignoring the artifacts by chokidar, wherever they are
2020-01-06 10:46:33 -05:00
Michael Bradley, Jr 89dceabc2b site: hexo build of site automatically triggers version metadata update in site/package.json 2020-01-06 09:19:36 -06:00
dependabot-preview[bot] c3ee150f62 build(deps): bump hexo from 4.1.1 to 4.2.0 in /site
Bumps [hexo](https://github.com/hexojs/hexo) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/hexojs/hexo/releases)
- [Commits](https://github.com/hexojs/hexo/compare/4.1.1...4.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 09:18:22 -06:00
dependabot-preview[bot] 4c46e87edd build(deps-dev): bump eslint from 6.7.2 to 6.8.0 in /site
Bumps [eslint](https://github.com/eslint/eslint) from 6.7.2 to 6.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.7.2...v6.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 09:08:51 -06:00
dependabot-preview[bot] a5c6a9e170 build(deps): [security] bump handlebars from 4.2.0 to 4.3.0
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.2.0 to 4.3.0. **This update includes a security fix.**
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.2.0...v4.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 09:05:25 -06:00
Michael Bradley, Jr 902dba0c02 chore(release): 5.0.0-beta.0 2020-01-03 09:37:36 -06:00
emizzle 2295f94ae0 fix(@embark/snark): Allow dapp to have no contracts
If using `embark-snark` in the dapp as a plugin, and the dapp didn’t have any contracts, the `embark-snark` plugin would not simply exit early and essentially do nothing.

Fix `embark-snark` plugin so that it will run its routine regardless of whether or not the dapp has contracts or not.

Bump `circom` and `snarkjs` to their latest patch version.
2020-01-03 13:50:06 +01:00
Iuri Matias b02b7ec751 chore(release): 5.0.0-alpha.10 2019-12-24 15:27:23 -05:00
Michael Bradley, Jr 441db4fd18 bugfix(@embark/scaffolding): upgrade scaffolding so it can be used in embark v5
WIP: refactor so that embark-scaffolding can be used in embark v5

fix scaffold cmd

fix generated files path
2019-12-24 14:50:26 -05:00
emizzle 8f9f631758 fix(@embark/embarkjs): Fix event name misspelling
Fix misspelling in event name. This event is new to v5, so there is no deprecation or major version bump needed.
2019-12-24 12:59:10 -05:00
Michael Bradley, Jr d7a5686de5 site: hexo build of site automatically triggers version metadata update in site/package.json 2019-12-22 18:24:06 -06:00
dependabot-preview[bot] 4f3e9c7868 build(deps-dev): bump eslint-config-hexo from 4.0.0 to 4.1.0 in /site
Bumps [eslint-config-hexo](https://github.com/hexojs/eslint-config-hexo) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/hexojs/eslint-config-hexo/releases)
- [Commits](https://github.com/hexojs/eslint-config-hexo/compare/4.0.0...4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-22 18:17:55 -06:00
emizzle 349b2691c3 fix(@embark/ens): Handle cases when no “register” in config
## Issue 1 - “register” section missing
When the “register” section of `namesystem.json` was missing, ENS would not deploy the ENS contracts nor create the contracts’ artifacts.

### Fix 1
Fix ENS deployment routine to always deploy the ENS contracts. In the case of testnet/mainnet, the contracts’ addresses will be known and therefore will be understood as “already deployed” by the contract deployer.

## Issue 2 - “register” section exists for non-dev environment
Additionally, if a root domain was specified in the “register” section and the DApp connected to an external node where we do not own the ENS contracts (ie testnet), attempting to register a root domain would not be possible as we do not own the ENS contracts.

### Fix 2
Fix ENS deployment routine to check if we are on a network in which we own the ENS contracts. If we are not, and we have specified a “register” section, print a warning to the user that the  registration will be ignored. Additionally, remove the “register” section.
2019-12-20 18:35:18 -05:00
Iuri Matias 472efbbf6e chore(release): 5.0.0-alpha.9 2019-12-20 18:13:47 -05:00
Iuri Matias e7059030fe chore(@embark/templates): remove embarkjs dependencies from test plugin 2019-12-20 17:13:48 -05:00
Iuri Matias 8fb502d777 chore(@embark/templates): add embarkjs dependencies to test apps 2019-12-20 17:13:48 -05:00
Iuri Matias 70333cd5d4 chore(@embark/templates): add embarkjs dependencies to templates
chore(@embark/templates): add embarkjs dependencies to templats

chore(@embark/templates): add embarkjs dependencies to templats
2019-12-20 17:13:48 -05:00
Jonathan Rainville 1e9b8d8595 fix(@embark/tests): fix slow embark test because of the tx-logger
The transaction-logger was slowing down tests because each Tx, it
would read a file and write to it, but that's slow and even got
slower as the file grew bigger
To fix, I removed the Tx-logger from text, along with the profiler
as they are useless for tests

(cherry picked from commit a656eea7dda83ad970615cffd51cce5d53a1d034)
2019-12-20 16:16:16 -05:00