Commit Graph

155 Commits

Author SHA1 Message Date
Michael Bradley, Jr 0d1da2971c chore(release): 5.1.0 2020-01-27 12:33:50 -06:00
EmbarkBot 84448f8732 chore(prerelease): 5.1.0-nightly.5 2020-01-24 00:10:58 +00:00
dependabot-preview[bot] 9caa424aeb build(deps): bump solc from 0.5.0 to 0.6.1
Make various related changes to templates, tests, etc. The methodology for
finding files that needed changes was to search through the whole monorepo for
the strings "solc" and "solidity" and then inspect the hits to see whether
changes were needed/appropriate.

Remove `solc` as a dependency in `packages/embark/package.json` so that it's
only a proper dependency in `packages/plugins/solidity/package.json`. Adjust
how the "bundled" `solc` package's version is determined, i.e. inspect the
`package.json` of `embark-solidity` instead of `embark`.

When `solc`'s version is `>=0.6.0` use the [new callback API][api].

[api]: https://github.com/ethereum/solc-js/blob/master/README.md#example-usage-with-import-callback
2020-01-23 14:20:42 -05:00
Jonathan Rainville b6856b2083 fix(@embark/test): increase default gas limit to 8M so tests support bigger contracts
Was needed for the Teller Dapp as its Escrow contract is too big for the other default
2020-01-23 14:01:20 -05:00
Jonathan Rainville df2aaabfc3 refactor(@embark/transaction-logger): change log storage and read
Changes the way the logs are stored to straight up be logged as an
array and then reads it as such. It also removes the reverse from
the read and puts it in the UI instead since it's the UI that needs
it reversed.
2020-01-23 11:49:09 -05:00
EmbarkBot e8b5c7ab89 chore(prerelease): 5.1.0-nightly.4 2020-01-23 00:13:38 +00:00
EmbarkBot 99d629c8a0 chore(prerelease): 5.1.0-nightly.3 2020-01-22 00:13:43 +00:00
Michael Bradley, Jr 7e00786ee8 build(deps): bump ganache-cli from 6.7.0 to 6.8.2
Also, in `dapps/tests/contracts` move the `this.timeout(0);` inside the
`it(...)` for the expensive gas esimation (involving
`SimpleStorage.methods.set`) because it otherwise doesn't seem to have an
effect on the default 15 second timeout.
2020-01-21 15:13:01 -06:00
EmbarkBot bfda1b3124 chore(prerelease): 5.1.0-nightly.2 2020-01-21 00:12:55 +00:00
Jonathan Rainville e0ac539930 fix(@embark/ens): connect to web3 only with dappAutoEnable is true
When we introduced dappConnection to ENS, we didn't add the concept
of auto connection, like we do in the "normal" connection. This
means that when using $WEB3, the contracts connection waited for
the user to click on a button, but the ENS part called `ethereum.enable`
directly, which is confusing for the dev, because we specified to
NOT automatically connect to ethreum.

This fixes it by checking the dappAutoEnable property in contracts
config and adds it to the namesystemConfig artifact
2020-01-20 12:22:48 -06:00
Michael Bradley, Jr 3ceffa8454 chore(@embark/suggestions): include suggestions.json in the files to be packed by npm
And remove `suggestions.json` in the `"files"` list of
`packages/core/console/package.json` since it was moved to
`packages/plugins/suggestions/suggestions.json`.
2020-01-20 12:13:56 -06:00
EmbarkBot c98e769d0d chore(prerelease): 5.1.0-nightly.1 2020-01-20 09:57:35 -06:00
Michael Bradley, Jr 7f0ab4390b chore(@embark/suggestions): remove `<12.0.0` restriction re: Node.js version 2020-01-20 08:37:10 -06:00
Michael Bradley, Jr c093cf88ea feat: support Node.js v12.x and newer
Remove the `<12.0.0` restriction re: Node.js version in the `"engines"`
settings for all the packages in the monorepo that had that restriction.

Add missing `"engines"` settings in `packages/plugins/snark/package.json`.

Adjust the Azure Pipelines config to include builds for Node.js v12.x and
v13.x.

Bump `solc` to `0.4.26` in `dapps/tests/app` and `dapps/tests/contracts`. It
was discovered that older versions suffered a fatal `Maximum call stack size
exceeded` error when run on Windows with Node.js v12.x or newer. Display a
warning re: the bad combo (solc version + Windows + Node version) if it's
detected at runtime.

Adjust the root `yarn.lock` so that the `sha3` transitive dependency resolves
to a newer version that is compatible with Node v13.x.
2020-01-20 08:28:24 -06:00
Pascal Precht a2244019c9 refactor(@embark/suggestions): move suggestions API into plugin 2020-01-20 11:35:29 +01:00
EmbarkBot 4d44e29b3c chore(prerelease): 5.1.0-nightly.0 2020-01-17 00:15:31 +00:00
Iuri Matias 9aeddaa998 chore: rename org references from embark-framework to embarklabs 2020-01-16 15:36:29 -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 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
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
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 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
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
Michael Bradley, Jr ba0d6d17f3 chore(release): 5.0.0 2020-01-07 12:14:37 -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 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
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
Pascal Precht 765e889121 fix(@embark/coverage): ensure handlers for 'tests:finished' are run as actions
There was a race condition in which the coverage module tried to read a generated
coverage report before it was actually generated.
The issue was that the coverage generation was done on Embark's `tests:finished` event
in a fire and forget manner via `emit('tests:finished')` which doesn't
ensure control flow.
This commit changes it to use `runActionsForEvent('tests:finished')` instead and also
registers the handler for coverage report generation as action via `registerActionForEvent()`.

This ensures that those actions are run first, before the code moves on with other
operations that might rely on the result of any of those actions.
2019-12-20 16:11:48 -05:00
Michael Bradley, Jr 7e550f0e6f build(deps): bump web3[-*] from 1.2.1 to 1.2.4
Refactor typings as necessary. In order for `bignumber.js` in the root
`node_modules` to not conflict with `@types/bignumber.js`, specify
`"bignumber.js": "5.0.0"` in `devDependencies` and `"embark-ui/bignumber.js"`
in `nohoist` of the root `package.json`.

In `packages/plugins/rpc-manager` switch from callback to promise usage with
respect to `web3.eth.accounts.signTransaction` because of a [bug][bug]
discovered in web3 v1.2.4.

In `packages/plugins/solidity-tests` specialize the tsc compiler options with
`"skipLibCheck": true` because of a problematic web3-related typing in the
`.d.ts` files of the remix-tests package.

Bump ganache-cli from 6.4.3 to 6.7.0 (latest) because 6.4.3 doesn't support
`eth_chainId` but web3 1.2.4 makes use of the `eth_chainId` RPC method (EIP
695).

BREAKING CHANGE: bump embark's minimum supported version of parity from
`>=2.0.0` to `>=2.2.1`. This is necessary since web3 1.2.4 makes use of the
`eth_chainId` RPC method (EIP 695) and that parity version is the earliest one
to implement it.

[bug]: https://github.com/ethereum/web3.js/issues/3283
2019-12-20 08:35:48 -06:00
Iuri Matias 4091296924 chore(release): 5.0.0-alpha.8 2019-12-19 14:14:23 -05:00
Jonathan Rainville 03bd49cf64 fix(@embark/rpc-manager): fix duplicated accounts in rpc manager
Was caused by the fact that each rpc-modifier got its own node
accounts, but once the eth_accounts modifier is enabled, the
"node" accounts are always going to contain the custom accounts too
Now, the node accounts are set once eth_accounts is initiated, so
that every modifier is on the same page
Also implement a second layer of protection to make sure that if a
duplication happens, it is gotten rid of
2019-12-19 11:19:03 -05:00
Iuri Matias f72d6f2915 chore(release): 5.0.0-alpha.7 2019-12-18 12:07:13 -05:00
Jonathan Rainville 1201879bdc fix contract app test by increasing gas 2019-12-18 11:22:18 -05:00
Jonathan Rainville 1bc967c6d1 fix(@embark/rpc-manager): fix sign data address comparison
Did not check correctly for if the account is a node account
2019-12-18 11:22:18 -05:00
Jonathan Rainville 13312128b3 fix(@embark/mocha-tests): set accounts correctly on each contracts 2019-12-18 11:22:18 -05:00
Iuri Matias 5893bc38b9 chore(release): 5.0.0-alpha.6 2019-12-17 15:41:00 -05:00
Iuri Matias 78a06c9d76 chore(release): 5.0.0-alpha.5 2019-12-16 13:49:41 -05:00
Iuri Matias fc4188d247 bugfix(@embark/parity): add missing new to BlockchainClient initialization 2019-12-13 17:39:02 -05:00
Iuri Matias bd0da80625 bugfix(@embark/geth): add missing new to BlockchainClient initialization 2019-12-13 17:39:02 -05:00