mirror of https://github.com/embarklabs/embark.git
Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms
https://framework.embarklabs.io/
90aac8343e
This commit introduces two new plugin APIs `registerTestContractFactory()` and `registerCustomContractGenerator()`, which can be used to register a factory function for the creation of web3 contract instances within tests, and custom code generation for `embark console` respectively. Example: ``` // some.plugin.js module.exports = function (embark) { embark.registerTestContractFactory(function (contractRecipe, web3) { // do something with web3 and contractRecipe and return contract instance here }); }; ``` **Notice that**: - This factory function is used for contract instance creation within tests. A `contractRecipe` and a `web3` instance is accessible within the factory. Example: ``` // some.plugin.js module.exports = function (embark) { embark.registerCustomContractGenerator(function (contractRecipe) { // returns code string that will be eval'ed }); }; ``` **Notice that**: - Once registered, this generator will be used for **all** contract instances that will be created for `embark console`, including built-in once like ENSRegistry. - While this does affect contract creation in client-side code, it doesn't actually affect the instances created for deployment hooks **if** deployment hooks are written as functions. Closes #1066 Always use custom generator and fallback to vanilla |
||
---|---|---|
.github | ||
bin | ||
embark-ui | ||
locales | ||
scripts | ||
src | ||
templates | ||
test_apps | ||
.editorconfig | ||
.eslintrc.json | ||
.gitignore | ||
.npmignore | ||
.npmrc | ||
.travis.yml | ||
.yarnrc | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
appveyor.yml | ||
babel.config.js | ||
header.png | ||
package.json | ||
tsconfig.json | ||
tslint.json | ||
yarn.lock |
README.md
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