Commit Graph

5687 Commits

Author SHA1 Message Date
Eric Mastro 0c7c3e83fe fix(@embark/embark-deployment): Undeployed contract artifacts (#1815)
Contract artifacts were not being generated nor run through the VM if the contracts/interfaces were not deployed. These features were executed as actions on the `deployment:contract:deployed` event.

This PR runs executes the same actions for `deployment:contract:undeployed` event as the `deployment:contract:deployed` event, which occurs when a contract is not deployed.
2019-08-29 15:27:01 -04:00
Jonathan Rainville 0455c550ce refactor(@embark/process-logs-api-manager): make process-logs-api-manager handle logs for every process 2019-08-28 10:03:32 -04:00
Jonathan Rainville 42673002cc refactor(@embark/console-listener): strip tx logger out of listener
Adds package embark-transaction-logger and put the tx listener there
2019-08-28 10:03:32 -04:00
Jonathan Rainville 1bd32bbbbb chore(@embark/proxy): small naming fixes 2019-08-28 10:03:32 -04:00
Jonathan Rainville 32280915d9 replace using web3 private property by request manager 2019-08-28 10:03:32 -04:00
Jonathan Rainville ff96a5cc98 refactor(@embark-proxy): use web3 provider to send requests to node 2019-08-28 10:03:32 -04:00
André Medeiros 218d0bda28
chore(@embark/test-runner): refactor test-runner (#1820)
* extract mocha tests into a package
* extract solc tests into a package
* refactor test runner to be a stack
2019-08-27 16:31:47 -04:00
Iuri Matias a4cb8615ce fix ens setProvider 2019-08-23 13:33:05 -04:00
Jonathan Rainville 76277ace2b fix contracts get and contracts function (#1819) 2019-08-23 11:54:29 -04:00
Iuri Matias a0c60cff2a delete old files 2019-08-23 11:47:02 -04:00
Iuri Matias 661f390650 remove console logs; fix events 2019-08-23 11:42:26 -04:00
Iuri Matias 13df7b57ca Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-22 14:33:40 -04:00
Eric Mastro 06c0c72b7c refactor(@embark/embark-swarm): Re-add swarm storage plugin (#1783)
* add web3 connection

* add TODO

* refactor(@embark/embark-swarm): Re-add swarm storage plugin

Swarm added back in to the refactored code.

Prevent Embark from hanging when Swarm/IPFS crashes.

Use swarm config as per below

To take this PR for a spin, update `dapps/templates/demo/config/storage.js` with the following:
```
module.exports = {
  // default applies to all environments
  default: {
    enabled: true,
    ipfs_bin: "ipfs",
    available_providers: ["ipfs", "swarm"],
    upload: {
      provider: "swarm",
      host: "localhost",
      port: 8500
    },
    dappConnection: [
      {
        provider: "swarm",
        host: "localhost",
        port: 8500,
        getUrl: "http://localhost:8500/bzz:/"
      }
    ]
    // Configuration to start Swarm in the same terminal as `embark run`
    , account: {
      address: "SWAM_ACCOUNT_ADDRESS", // Address of account accessing Swarm
      password: "config/development/password" // File containing the password of the account
    },
    /*swarmPath: "PATH/TO/SWARM/EXECUTABLE" // Path to swarm executable (default: swarm)*/
  }
};

```

NOTE: `account.address` needs to be a node account. Please make sure `embark run2` has been run first, then create a new node account and update the config, then re-run embark.

1. `embark run2`
2. `geth account new --datadir=.embark/development/datadir --password=config/development/password`
3. Copy output from #2 to `account.address` in config
4. Re-run `embark run2`
2019-08-22 12:57:39 -04:00
Iuri Matias 8332bc5f59 Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-22 12:52:59 -04:00
Jonathan Rainville d8ba0be534 reafctor(@embark/ens): create namestystem component and fix ENS 2019-08-22 12:51:05 -04:00
Jonathan Rainville dbb6bca1bb fix fundAccount TS errors 2019-08-22 12:02:32 -04:00
Iuri Matias a26b508750 Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-22 11:38:17 -04:00
Jonathan Rainville f516dec200 make fundAccounts TS and use @emizzle's async function 2019-08-22 11:25:54 -04:00
Jonathan Rainville 24090b89ea code review changes docs 2019-08-22 11:25:54 -04:00
Jonathan Rainville 21e871c8b2 code review comments code 2019-08-22 11:25:54 -04:00
Jonathan Rainville 291ad3c72b review comments and add timeout to actions 2019-08-22 11:25:54 -04:00
Jonathan Rainville 241740360d fix(@embark/proxy): fix nonce issue for parallel deployment 2019-08-22 11:25:54 -04:00
Jonathan Rainville ad6992e07a add new node accounts to array when they get added 2019-08-22 11:25:54 -04:00
Jonathan Rainville ec8f8fa39e docs(@emabrk/site): add docs for dappConnection 2019-08-22 11:25:54 -04:00
Jonathan Rainville 12d13f8411 fix embark-web3 2019-08-22 11:25:54 -04:00
Jonathan Rainville 3131675b4b clean up proxy 2019-08-22 11:25:54 -04:00
Jonathan Rainville e4347a478b make WS work! 2019-08-22 11:25:54 -04:00
Jonathan Rainville e32d1b7632 connect Dapp to the proxy if needed 2019-08-22 11:25:54 -04:00
Jonathan Rainville 81ef6705ef make console listener work 2019-08-22 11:25:54 -04:00
Jonathan Rainville 7ed393d38c add fund account so that custom accounts can now deploy!! 2019-08-22 11:25:54 -04:00
Jonathan Rainville 82c50d3570 make proxy modify txs with the account manager wallet 2019-08-22 11:25:54 -04:00
Jonathan Rainville c9d4c2a134 make proxy send responses and add account-manager 2019-08-22 11:25:54 -04:00
Jonathan Rainville 16a13ee705 make proxy change port if it's already taken 2019-08-22 11:25:54 -04:00
Jonathan Rainville 9d3064e3ae make proxy work 2019-08-22 11:25:54 -04:00
Jonathan Rainville 4533acaaa8 wip create proxy module 2019-08-22 11:25:54 -04:00
Pascal Precht d169b92f50 refactor(@embark/cmd_controller): make console command work with new APIs 2019-08-20 18:47:35 -04:00
emizzle 98721034fe feat(@embark/embark-deploy-tracker): Add unit tests
Add unit tests for the contract tracking `embark-deploy-tracker` package.

`trackingFunctions` was refactored in a way to make it more testable and now performs tracker file IO on demand, as opposed to being executed for each contract deploy. Additionally, removed any synchronous file IO in favour of their asynchronous counterparts.

Added special case for config contract-level tracking:
when `contract.track === false` in contracts config, contracts are deployed, then the config is changed `contract.track` is truthy, a special use case is presented, and the chains.json file is updated accordingly.
2019-08-20 18:46:46 -04:00
Iuri Matias 1d765cc86a Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-19 18:03:11 -04:00
Pascal Precht 781d878a02 refactor(@embark/cmd): make build command work again
This commit refactors the `build` command to use the newly refactored
event APIs.
2019-08-19 18:00:44 -04:00
Iuri Matias 938689ddea Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-19 17:54:50 -04:00
Pascal Precht b3bf223cb8 refactor(@embark/ethereum-blockchain-client): reintroduce account determination 2019-08-19 17:54:30 -04:00
Iuri Matias 9b5ced01dd Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-19 17:48:52 -04:00
emizzle 29ee9edf83 feat(@embark/embark-deployment): Don’t hang on contract deploy fail
Prior to this PR (including with v4), Embark would hang on a deployment error.

After this PR, Embark continues it’s run routine despite a contract deployment error, and reports the error to the user in the console appropriately.

NOTE: this branch is based on `refactor/add-contract-tracking` (which would land in https://github.com/embark-framework/embark/pull/1743). If #1743 lands (will be merged in to `refactor_5_0_0`), I will rebase this branch on top of `refactor_5_0_0`.
2019-08-19 17:44:34 -04:00
emizzle 10a7833838 refactor(@embark/embark-deploy-tracker): Add back contract tracking
Add back contract tracking to the refactored code. Deployment checks are added as plugins to the `embark-deployment` module.

Adds ability to track if a contract has already been deployed, and skips deployment if so.

Updates error handling flow for deployment process.

Adds a contract class to the `embark-contracts-manager`, to add a `log` function for the contract. This `log` function can be called from any module that has the contract instance.

Adds TS interfaces for contracts configuration.

Handles the following cases:
1. Contract already deployed
2. Contract not deployed
3. Contract is configured with `{track: false}` (deploy if not deployed, and don't track)
5. Contract is configured with an `address` in the config
6. `trackContracts` set to `false` from `engine` (always deploy but don't track contracts). Currently used for the tests.
7. Contract deployment produces an error
8. Interface deployment shows warning.

PR with unit tests and documenation to follow.

# Conflicts:
#	packages/embark/src/lib/modules/ethereum-blockchain-client/index.js
2019-08-19 17:44:34 -04:00
Iuri Matias 7c228c750c add TODO 2019-08-19 17:44:34 -04:00
Iuri Matias 5fdf69ac20 add TODO 2019-08-19 17:35:50 -04:00
Iuri Matias cfb010c8b2 Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-19 17:35:18 -04:00
emizzle 03cdbcbe94 refactor(@embark/contracts): Add contract check size back in
Adds back in checking of the contract size before deployment by registering actions for event `deployment:contract:beforeDeploy`
2019-08-19 17:35:11 -04:00
Iuri Matias a8050cf7d2 Merge branch 'refactor_5_0_0' of github.com:embark-framework/embark into refactor_5_0_0 2019-08-19 17:34:00 -04:00
emizzle 59a0eea295 refactor(@embark/embark-deploy-tracker): Add back contract tracking
Add back contract tracking to the refactored code. Deployment checks are added as plugins to the `embark-deployment` module.

Adds ability to track if a contract has already been deployed, and skips deployment if so.

Updates error handling flow for deployment process.

Adds a contract class to the `embark-contracts-manager`, to add a `log` function for the contract. This `log` function can be called from any module that has the contract instance.

Adds TS interfaces for contracts configuration.

Handles the following cases:
1. Contract already deployed
2. Contract not deployed
3. Contract is configured with `{track: false}` (deploy if not deployed, and don't track)
5. Contract is configured with an `address` in the config
6. `trackContracts` set to `false` from `engine` (always deploy but don't track contracts). Currently used for the tests.
7. Contract deployment produces an error
8. Interface deployment shows warning.

PR with unit tests and documenation to follow.
2019-08-19 17:30:10 -04:00