Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms https://framework.embarklabs.io/
Go to file
emizzle 431d366652 fix(@embark/utils): Fix proxy crash with unknown function
If a transaction is sent and the proxy is enabled, but the function hash (identified in the data of the transaction) is not recognized as a function of the contract (ie does not match a function hash in the contract’s ABI), then embark would crash.

The fix was to introduce error handling in `transactionUtils.getTransactionParams` that defaults the contract name and params to `UNKNOWN`.

This can be replicated by
1. Clone https://github.com/mortimr/ethvtx_embark
2. `embark run` the dapp
3. Connect with Metamask
4. Ensure you have enough funds
5. In the “Tx calls” bubble, enter a new value, then click “Set Value”.
6. When the Metamask dialog appears, the error should have already happened. The console shows:
```
embark/src/lib/utils/transactionUtils.ts:58
  const functionName = func.functionName;
                            ^
TypeError: Cannot read property 'functionName' of undefined
    at functionName (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/utils/transactionUtils.ts:58:29)
    at ConsoleListener.getTransactionParams [as _onIpcLogRequest] (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/modules/console_listener/index.js:102:41)
    at _onIpcLogRequest (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/modules/console_listener/index.js:76:12)
    at Server._done (/Users/mortimr/Horyus/ethvtx_embark/node_modules/embark/src/lib/core/ipc.js:81:7)
    at Server.emit (/Users/mortimr/Horyus/ethvtx_embark/node_modules/event-pubsub/es5.js:74:21)
    at Server.gotData (/Users/mortimr/Horyus/ethvtx_embark/node_modules/node-ipc/dao/socketServer.js:194:14)
    at Socket.emit (events.js:189:13)
    at Socket.EventEmitter.emit (domain.js:441:20)
    at addChunk (_stream_readable.js:284:12)
    at readableAddChunk (_stream_readable.js:261:13)
    at Socket.Readable.push (_stream_readable.js:220:10)
    at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
```
2019-03-22 13:27:22 -04:00
.github chore: introduce issue and pull request templates 2018-11-07 17:31:17 +01:00
dapps chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
packages fix(@embark/utils): Fix proxy crash with unknown function 2019-03-22 13:27:22 -04:00
scripts build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
.editorconfig Add editor config 2018-10-22 19:25:16 +02:00
.eslintrc.json build: cleanup eslint configuration 2019-02-06 11:26:41 -06:00
.gitignore build: cleanup .gitignore 2019-02-05 18:08:14 -06:00
.npmrc build: introduce a `prepare` script in embark's package.json 2018-12-03 16:24:10 -06:00
.travis.yml build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
.yarnrc build: specify a high network timeout in root .yarnc 2019-02-14 01:26:22 -06:00
CHANGELOG.md chore: ensure root CHANGELOG contains all previous releases 2019-03-19 21:03:46 +09:00
CODE_OF_CONDUCT.md chore(@embark) remove extra line 2018-12-24 16:14:01 -05:00
CONTRIBUTING.md build: implement a monorepo with Lerna 2019-02-04 14:28:49 -06:00
LICENSE add license 2015-07-10 20:41:45 -04:00
README.md feature(embark): add coveralls integration 2019-02-08 17:07:05 -05:00
appveyor.yml build: make DApp templates member packages of the monorepo 2019-03-05 10:20:57 -06:00
babel.config.js build: implement a common babel config 2019-02-06 11:34:47 -05:00
header.png Update header 2018-09-27 10:23:03 -04:00
lerna.json chore(release): 4.0.0 2019-03-18 18:26:56 -05:00
package.json build: use package.json "files" instead of .npmignore 2019-03-12 07:50:25 -04:00
tsconfig.json fix(console): fix ENS tests not working with embark side by side 2019-03-08 08:54:30 -05:00
tslint.json refactor(@embark/embark-typings) move typings to its own module 2019-02-06 11:07:44 -05:00
yarn.lock fix(embark): specify "rxjs" as a dependency vs. "@reactivex/rxjs" 2019-03-17 20:07:12 -04:00

README.md

Embark

npm Gitter Build Status Build status Open PRs Closed PRs GitHub commit activity the past week, 4 weeks, year Coverage Status

What is Embark

Embark is a framework that allows you to easily develop and deploy Decentralized Applications (DApps).

A Decentralized Application is a serverless html5 application that uses one or more decentralized technologies.

Embark currently integrates with EVM blockchains (Ethereum), Decentralized Storages (IPFS), and Decentralized communication platforms (Whisper and Orbit). Swarm is supported for deployment.

With Embark you can:

Blockchain (Ethereum)

  • Automatically deploy contracts and make them available in your JS code. Embark watches for changes, and if you update a contract, Embark will automatically redeploy the contracts (if needed) and the dapp.
  • Contracts are available in JS with Promises.
  • Do Test Driven Development with Contracts using Javascript.
  • Keep track of deployed contracts; deploy only when truly needed.
  • Manage different chains (e.g testnet, private net, livenet)
  • Easily manage complex systems of interdependent contracts.

Decentralized Storage (IPFS, Swarm)

  • Easily Store & Retrieve Data on the DApp through EmbarkJS. Including uploading and retrieving files.
  • Deploy the full application to IPFS or Swarm.
  • Import and deploy contracts hosted on Swarm.

Decentralized Communication (Whisper, Orbit)

  • Easily send/receive messages through channels in P2P through Whisper or Orbit.

Web Technologies

  • Integrate with any web technology including React, Foundation, etc..
  • Use any build pipeline or tool you wish, including grunt, gulp and webpack.
$ npm -g install embark

See Complete Documentation.