Releases: embarklabs/embark
v5.1.0-nightly.0
5.1.0-nightly.0 (2020-01-17)
Bug Fixes
- @embark/cmd_controller: fix build command to escape on finish (e2767c2)
- @embark/debugger: Prevent error if contract not tracked by Embark (1e1172e)
- @embark/ens: fix Infura connection and testnet use of ENS (42bd3b7)
- @embark/test-dapp: fix test_dapp broken for ENS resolve (f5849e0)
- @embark/tests: Fix failing test with
—node=embark
(81af3af) - @embark/transaction-logger: Circular JSON log and unknown contract log level (5843a8e)
- @embark/utils: fix deconstruct url to return port as an integer (4190d5e)
- transaction-logger: fix circular dep issue with util.inspect (6f239f4)
Features
v4.0.0-alpha 3 release
Bug Fixes
- all ws endpoint use new technique (bbcfe9b)
- allow message signing with wallet address (3a8808e)
- consistent service order in cockpit (7574e14)
- do not override web3 in embark (94a8bad)
- record contract transaction history (435e1e6)
- simulator: fix simulator when there is no accounts (34d5923)
- windows path separator being wrong (72f8701)
- @embark: single use tokens (6aa8781)
- @embark/blockchain_process: proxy listens on the specified host (9e7bc53)
- @embark/cli: start the dashboard after services are started (6c7782c)
- @embark/cockpit/converter: allow decimal numbers (8a5871e)
- @embark/core: Disable swarm if URL can’t be determined (c24536d)
- @embark/core: Fix
—template
URL support (f1206b4) - @embark/core: Proxy support for raw transactions (ffcff4a)
- @embark/core: Restart IPFS after CORS Update (27babf0)
- @embark/core: Support legacy Parity version parsing (1ccc3e7)
- @embark/ens: make resolve() work with promises and callbacks (2195475)
- @embark/whisper: ensure web3 is ready when whisper info is requested (fd311f9)
- @embark/whisper: use a new WebsocketProvider on each retry (27ad343)
- blockchain: add cert options to blockchain initialization (bf8629d)
- blockchain/geth: create geth dev account before other accounts (7811211)
- cockpit/editor: remove arrows next to files in file explorer (d30b00e)
- compiler: fix compiler being fired twice (ebd827b)
- debugger: fix and improve console commands (37c28b9)
- debugger: fix debugger displays (9c37f97)
- embarkjs/web3: make global web3 available again (6e4a612)
- ens: fix error message by checking for directives before (06553b5)
- ens/web3: use blockchain connector for ens and fix global web3 (d5f6da3)
- gethClient: clear timeout when call backing (9a6149f)
- logHandler: stringify objects instead of trying to split it (33d6e29)
- names: fix ens console commands (50858dc)
- parity: create password file even when there are no accounts (7d2ceaa)
- profiler: do not exit on error but print it (e207537)
- proxy: delete old ids for accounts (604e267)
- test: use logger instead of engine.logger (af48788)
- test/console: register in the console in tests when ipc connected (503a79c)
- whisper: fix crash on using whisper with the simualtor (1461e95)
- ws: up fragmentation threshold to patch Geth bug with WS (b20bce9)
Features
- add coverage events (8a6d075)
- apply contract change to test (e3a7b74)
- code runner use fs overrided (944b392)
- ui: auto updates services in cockpit (a92a986)
- enable ethereum manually (5a375d9)
- @embark/core: Allow search to find contract by name (1e2cb64)
- @embark/core: improve long running webpack UI (b49839a)
- @embark/core: store IPC files in a dir within os.tmpdir() (a91a4dd), closes #1202 #450
- @embark/core: Support directives in ENS config (7511156)
- @embark/deployment: output transaction hash during deployment asap (0bb7d63)
- @embark/deployment: output transaction hash of contract deployment (3099894)
- console: add new api to register console commands (3229e15)
- coverage: gas usage improvements (0118b1a)
- scaffold: use ipfs in scaffold and upload file (9854368)
- ui: auto updates contracts in cockpit (d10d906)
3.1.9
- Fix issue with account funding
- by setting a limit on concurent funding tasks
3.0.7
- Fix issue importing contarcts with Git tags
3.0.6
Embark 3.0
Embark by Status 3.0
Embark is now part of Status and we are happy to announce Embark 3.0 by Status!
New website and Documentation
Embark has a new website and up to date documentation which can be found at https://embark.status.im/docs/
More Smart Contract Languages
Besides Solidity, Embark now also supports Vyper out of the box, as well as Bamboo through an embark plugin
You can use these languages side by side, and take advantage of Embark's features such as contract testing just like you would with Solidity.
DApp Imports
From the dapp side, contracts and libs like EmbarkJS can be implicitly imported, for e.g to import a contract:
import SimpleStorage from 'Embark/contracts/SimpleStorage'
EmbarkJS:
import EmbarkJS from 'Embark/EmbarkJS'
Or a initialized web3 instances (with the config of config/contracts.json
)
import web3 from 'Embark/web3'
The typical ES6 imports will also simply work. You can even import directly css files inside js files:
import React from 'react';
import { Tabs, Tab } from 'react-bootstrap';
import './dapp.css';
Friendlier torwards contracts-only projects
Although Embark is focused on DApps, it can perfectly be used for projects targeting only smart contracts and no other components.
There is a now a template to create a simple project with all the components disabled except smart contracts:
embark new AppName --simple
You can also fine tune this in embark.json by specifying the config of each component or setting it to false if you don't want it.
...
"config": {
"contracts": "contracts.json",
"blockchain": false,
"storage": false,
"communication": false,
"webserver": false
},
...
Embark Graph
The command embark graph
will generate a ER graph of the dapp contracts. This takes into account not just the inheritance but also the relationships specified in the configuration.
Config contracts from URIs
Embark now supports referencing directly URIs including http, git, github, or directly files contained in other directories than the ones specified in embark.json
Embark is smart enough to take care of the dependencies of the resources and present them in a consistent manner to the compiler, it just works!
{
"development": {
"contracts": {
"ERC725": {
"file": "git://github.com/status/contracts/contracts/identity/ERC725.sol#develop"
},
"ERC725": {
"file": "github.com/status/contracts/contracts/identity/ERC725.sol"
},
"Ownable": {
"file": "https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol"
},
"SimpleStorage": {
"file": "./some_folder/simple_storage.sol"
}
}
}
}
Importing contracts from URIs directly in Solidity
You can also import the same URIs directly in solidity which is quite useful for interfaces, e.g:
import "git://github.com/status/contracts/contracts/identity/ERC725.sol#develop";
import "github.com/status/contracts/contracts/identity/ERC725.sol";
import "https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol"
contract MyContract is Ownable {
...
}
Contracts from npm packages
You can now install npm packages that contain contracts (e.g npm install --save openzeppelin-solidity
) and refer them to them in the contracts.json file:
{
"development": {
"contracts": {
"ERC20": {
file: "zeppelin-solidity/contracts/token/ERC20/ERC20.sol"
}
}
}
}
or even import them directly in solidity without the need for the config:
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
contract MyContract is Ownable {
...
}
Embark Demo App
The demo app has been updated to reflect the new structure. It also now uses ReactJS which provides a good example on how to use React with Embark.
Web3.js 1.0 by default
Embark now uses web3.js 1.0 in all layers, including in the console and in contracts testing.
More contract deploy configs
A new config called afterDeploy
is available and it can be used to specify actions to run after all contracts have been deployed.
It's possible to also specify the specific account to deploy from using the directive from
or fromIndex
Versions Configuration
The versions config has been moved to embark.json, the download mechanism has also been fastly improved under the hood:
...
"versions": {
"web3": "1.0.0-beta",
"solc": "0.4.23",
"ipfs-api": "17.2.4"
},
...
Test Improvements
In the tests you can now specify a mnemonic:
config({
mnemonic: "labor ability deny divide mountain buddy home client type shallow outer pen"
})
It's also possible to specify a node, in case you don't want to run in the internal vm:
config({
node: "http://localhost:8545"
})
Swarm support
Swarm is now completely integrated on-par with IPFS. You can use interact with Swarm on the dapp side, as well as upload your dapp to Swarm.Swarm
New Plugin APIs
plugin apis:
- new events: log, contractsState, status, servicesState
- new commands: console:command
- registerUploadCommand
- addCodeToEmbarkJS
- addProviderInit
- registerImportFile
- documentation has been reviewed and updated. available at docs
- registerBeforeDeploy
- improve plugin API to register console cmds
- possible to extend EmbarkJS by using EmbarkJS.Messages.registerProvider
- possible to extend EmbarkJS by using EmbarkJS.Storage.registerProvider
Misc Bugfixes and Improvements
- new command
embark reset
which resets embark's state including clearing the cache - new options in blockchain.json: targetGasLimit, wsRpc, wsHost, wsPort, simulatorMnemonic, simulatorBlocktime
- new cmd line option for embark run and
embark build --logLevel
- new cmd line option for embark run and
embark build --logfile filename
- embark blockchain will now use geth's --dev option in the development environment by default instead of the old mining script. this can be configured with isDev option on blockchain.json
- detect and warn about cyclic dependencies
- embark will warn about typos in console commands and crucially also in things like contract names in the configuration etc..
- embark will detect the terminal dimensions and if it's too small it will recommend you to use the
--nodashboard
option - the webserver can be started and stopped with
webserver start
andwebserver stop
- fix to pipeline watcher, in which sometimes changes would not be detected
- fix bug which would cause contracts to always redeploy if a gas value was manually set
- fix & improve
onDeploy
config - fix bug deploying contract interfaces
- fixed console bug which was getting "invalid JSON RPC response" when connecting to certain clients
- fixed bug in which the ipfs service checkin was looking at localhost instead of the configuration specified in storage.json
- greatly improve web3 object provider initialization
- warn user when the IPFS node goes offline or comes back online
- add other alias for quit cmd
- fix issue with onDeploy on the tests
- add config for websockets
- support starting simulator & initializing accounts with mnemonics
- more params supported in simulator (port, host, accounts num, default baalance, gas limit)
- support specifying desired blocktime for simulator
- don't re-run onDeploy if nothing changed
- add default values for geth light and fast params (fixing 331)
- fix contract directory bug so any directory in embark.json can be used not just app/contracts
- new cmd to display version
- automaticaly configure gas needed for txs in tests so dev doesn't need to specify
- improve gas estimation by using web3.js 1.0 instead of relying on values given by solc
- better error message when geth is not installed or is unable to connect to a node
- better error messages for json config syntax errors
- detect nodejs version and warn user if version is too old instead of just exiting with a syntax error
- don't crash if embark.json is missing, instead warn user he is probably not in the dapp directory
- use defaults when blockchain.json is empty, useful for projects migrating
- run AfterDeploy cmds separately so it's easy to pinpoint when there is an error
- still run using defaults if config files like contracts.json, storage.json, webserver.json , etc.. are not present
- throw an error if trying to use embarkjs without a provider set
- display error message on the dashboard contract section when a contract fails to deploy or compile
- display proper error message when a library meant to be linked is not found
- warn user when contact is assumed to be an interface
- show error explaining what happened if dapp upload to IPFS fails
- show warning message when user specified non-existent asset on embark.json
Chatroom
To discuss about Embark or Dapp development, please join us at the gitter channel
Embark 2.6.0 - web3.js 1.0, any version of web3.js & solc. Whisper 5 & much more
To Update to 2.6.0
important
Embark's npm package has changed from embark-framework
to embark
, this sometimes can create conflicts. To update, first uninstall embark-framework 1 to avoid any conflicts with npm uninstall -g embark-framework
followed by npm install -g embark
to update from 2.5.2:
npm install -g [email protected]
afterwards make sure embark version
returns 2.6.0
.
In this release
You no longer need to wait for new releases of embark when a new version of web3.js or solc comes out as this can be now configured. Embark will take care of downloading and using the new versions. You can specify a list of nodes the dapp should attempt to connect to (instead of being limited 1). Whisper 5 is now supported.
If you like Embark please consider donating to 0xFA239D14c7117C3D2370B2a4c4238534391fadd9
Support for web3.js 1.0 and (nearly) ANY web3.js version
Embark now supports web3.js 1.0 by default, however you can now also specify exactly which version of web3.js you want to use so you can still use 0.19.0 or newer versions of 1.0.
in config/contracts.json
{
"default": {
....
"versions": {
"web3.js": "1.0.0-beta"
}
...
}
If ,for example, you wish to use 0.19.0 you can specify it in the config as "web3.js": "0.19.0"
Support for ANY solc version
You can also configure the solc compiler you wish to use and it should work, so long that solc release does not contain breaking API changes.
config/contracts.json
{
"default": {
....
"versions": {
"solc": "0.4.17"
}
...
}
Specify nodes DApp should attempt to connect to
You can specify which nodes your dapp should try to connect in each enviroment. "$WEB3" is a special keyword to specify the existing web3 object.
The following config would attempt to use the existing web3 object and if unavailable attempt to connect to localhost:8545
config/contracts.json
{
"development": {
...
"dappConnection": [
"$WEB3",
"http://localhost:8545"
],
...
}
Specify node to deploy to
Before Embark would assume this would be the same as the one configured in blockchain.json which could lead to some ackward configs for some devs, this has now been changed so you can specify it in the contracts config.
config/contracts.json
{
"development": {
...
"deployment": {
"host": "localhost",
"port": 8545,
"type": "rpc"
},
...
}
Specify node to connect whisper to
config/communication.json
{
"default": {
"enabled": true,
"provider": "whisper",
"available_providers": ["whisper", "orbit"],
"connection": {
"host": "localhost",
"port": 8546,
"type": "ws"
}
}
}
Specify url to get assets
You can specify for each environment what IPFS node to get the assets from
config/storage.json
{
...
"development": {
....
"getUrl": "http://localhost:8080/ipfs/"
},
...
"livenet": {
....
"getUrl": "https://gateway.ipfs.io/ipfs/"
}
}
Plugin API changes
The following events are deprecated: abi-vanila, abi, abi-contracts-vanila, abi-vanila-deployment and have been renamed to code-vanila, code, code-contracts-vanila, code-vanila-deployment
plugins that use these events will get deprecation warnings, the deprecated events will be removed in 2.7.0
New Blockchain options
The following fields are now available at config/blockchain.json
to enhance embark blockchain
:
- "wsHost" - to specify the websocket host (default: localhost)
- "wsPort" - to specify the websocket port (default: 8546)
- "wsOrigins"- to specify the allowed origin of the websocket requests (default: FALSE), must be specified to something like http://localhost:8000 for the websocket connection to work.
- "wsApi" - to specify the apis available through websockets (default: ['eth', 'web3', 'net', 'shh'])
Misc Bugfixes and Improvements
- tests no longer need the requires and initialization and can be run directly with embark. however you can still use these requires to run it yourself with mocha or your own preferred test framework
- embark and mocha are no longer dependencies in the created dapp
- you can specify a test file with
embark test <filename>
- tests no longer need testrpc to be installed first
EmbarkJS.isNewWeb3()
to detect if web3 1.0 is available- demo app updated to use web3.js 1.0 and solc 0.4.17
- warn user when websocket or http CORS is not set
- tolerate solc compiler warnings, which could cause a crash sometimes
Thank you
A big thanks to all that contributed to this release including Todd Baur and Jacob Beauchamp.
Chatroom
To discuss about Embark or Dapp development, please join us at the gitter channel
Donations
If you like Embark please consider donating to 0xFA239D14c7117C3D2370B2a4c4238534391fadd9
2.5.2 patch
This release fixes some issues with library support.
Note if using an existing DApp: to add library support with embark blockchain
you need to remove your embark data dir rm -rf .embark/development
and add to your genesis block the config signalling homestead at config/development:
"config": {
"homesteadBlock": 1
},
example config file here
Embark 2.5.0
To Update to 2.5.0
important
Embark's npm package has changed from embark-framework
to embark
, this sometimes can create conflicts. To update, first uninstall embark-framework 1 to avoid any conflicts with npm uninstall -g embark-framework
followed by npm install -g embark
to update from 2.4.2:
npm install -g [email protected]
afterwards make sure embark version
returns 2.5.0
.
In this release
This release updates to the lastest dependencies, fixes a few things and has a lot of work under the hood necessary for future releases.
Updates
- support for geth 1.6.5
- updated to use web3.js 0.19.11
- updated to use solc 0.4.11
Misc Bugfixes and Improvements
embark new
will now prompt for the dapp name if not specified asembark new <yourDappName>
- embark.js:
ContractName.new()
as been added as an alias forContractName.deploy()
- embark.js: a method to easily send ether to a contract has been added:
ContractName.send(value, unit, options)
e.gContractName.send(2, "ether", {from: web3.eth.accounts[1]})
- orbit: Fix for orbit to make it work if the blockchain component is disabled
- orbit: Use default config for orbit it none is specified in the config file
- Demo app now has warning message for incompatible whisper versions
- the JSON files of the contracts are now being outputted at dist/contracts/ (experimental)
- whisper: Dashboard now displays the whisper version of the node
- plugin API: extensions can now also be added as directories within the dapp directory
- plugin API: plugins can now register a component to be displayed in the dashboard. e.g:
embark.registerServiceCheck('PluginService', function(cb) {
if (someFunctionThatChecksTheService()) {
cb({name: "MyServiceName", status: "on"});
} else {
cb({name: "MyServiceName", status: "off"});
}
});
Documentation
The new documentation for embark is being worked on and available at https://embark.readthedocs.io/en/latest/. If you wish to help out don't hesitate to do a PR or contact me at our gitter channel.
Thank you
A big thanks to all that contributed to this release including Nathan Hernandez, Antonio Tenorio-Fornés, Jon Johnson, Andy Nogueira, roo2, Carl Mönnig, Michael Yeates, Todd Baur, 黄俊钦, Ramiro Moreira, gregg dourgarian
Chatroom
To discuss about Embark or Dapp development, please join us at the gitter channel
Donations
Embark is 100% a community project and not tied to any organization which contributes to a more decentralized Ethereum ecosystem.
If you like Embark please consider donating to 0xFA239D14c7117C3D2370B2a4c4238534391fadd9
Please also consider donating to MyEtherWallet 0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8 another independent project of great value to the community.
Embark 2.4.0 - Continuing the voyage towards real Decentralised Applications
To Update to 2.4.0
important
Embark's npm package has changed from embark-framework
to embark
, this sometimes can create conflicts. To update, first uninstall embark-framework 1 to avoid any conflicts with npm uninstall -g embark-framework
followed by npm install -g embark
to update from 2.3.3:
npm install -g [email protected]
afterwards make sure embark version
returns 2.4.0
.
In this release
A lot of work went under the hood in this release. Embark now starts 7 times faster, and the number of dependencies have been cut in half. It installs faster, starts faster, it's more stable and more modular than ever before.
Config for each of the decentralised technologies available in Embark
Although Embark was always a full DApp Framework and not just a simple Ethereum framework, there was few options when in came to fully configuring the other components of the Decentralised stack. This releases adds support to choose which components you need for your DAPP exactly and configure them depending on your needs. It's now possible to even disable the Blockchain part completely for cases where all you need is Whisper and IPFS for instance.
2.4.0 introduces two new important config files: config/storage.json
, config/communication.json
communication.json
{
"default": {
"enabled": true,
"provider": "whisper",
"available_providers": ["whisper", "orbit"]
}
}
Choosing a provider
will automatically add the correct EmbarkJS.Messages.setProvider
into the generated DApp code. The list of available_providers
will determine what's available in the DApp, if you don't need Orbit for your DApp for example, then removing it from the list will greatly reduce the final size of the generated JS size since its library wouldn't' be included.
As usual, "default"
applies to all environments but you can override settings on a per environment basis.
storage.json
{
"default": {
"enabled": true,
"ipfs_bin": "ipfs",
"provider": "ipfs",
"available_providers": ["ipfs"],
"host": "localhost",
"port": 5001
}
}
Choosing a provider
will automatically add the correct EmbarkJS.Storage.setProvider
into the generated DApp code. You can also configure the host and port for IPFS. Note that Swarm will be added to the available_providers in future releases of Embark.
Disabling the blockchain component
You can now disable the blockchain/contracts component if you so wish by adding the field "enabled": false
inside an environment config in the config/blockchain.json
file.
Plugin API changes
Breaking change The compiler API now takes a callback instead of a return, e.g:
embark.registerCompiler(".sol", function(contractFiles, cb) {
cb(null, compiled_object);
}
new
Embark's event bus is now available in the plugin API, this is useful to do plugins that react to changes such as when contracts are deployed:
- available events:
contractsDeployed
- triggered when contracts have been deployedfile-add
,file-change
,file-remove
,file-event
- triggered on
a file change, args is (filetype, path)abi
,abi-vanila
,abi-contracts-vanila
- triggered when contracts
have been deployed and returns the generated JS codeoutputDone
- triggered when dapp is (re)generatedfirstDeploymentDone
- triggered when the dapp is deployed and generated
for the first time
module.exports = function(embark) {
embark.events.on("contractsDeployed", function() {
embark.logger.info("plugin says: your contracts have been deployed");
});
embark.events.on("file-changed", function(filetype, path) {
if (type === 'contract') {
embark.logger.info("plugin says: you just changed the contract at " + path);
}
});
});
New Blockchain options
The following fields are now available at config/blockchain.json
to enhance embark blockchain
:
- "light": true - to enable the light client
- "fast": true - to enable the --fast option in geth
- "bootnodes": "" - to bootstrap your private network
- "geth_bin": "" - to specify which geth binary to use
- "rpcApi" - to override the available rpcApis
- "vmdebug" - to enable --vmdebug
With the availability of the light client option and further default configs on the initial blockchain.json file it even easier to deploy to the testnet and livenet
Misc Bugfixes and Improvements
- Support configuring the dev webserver in
config/webserver.json
- Fix contract tracking by taking into account the Swarm hash inserted in the bytecode by solc
- The embark demo sample app has been updated with a better look and better tolerance for when some stack elements are not available such as Whisper or IPFS.
- Updated readme & docs to clarify how events are used, IPFS cors requirements, and plugin API changes
- Add compatibility with latest geth to embarkjs
- Wait for transaction to be mined in embarkjs method calls before returning value
- Support specifying gas cost when deploying a contract client side with embarkjs
- Fix crash when attempting to connect to whisper and it's not available in embarkjs
- Show solc errors in the log instead of exiting the console
- If no commands are passed in the command line, default to show the help
- Display IPFS version on the dashboard
- Fix IPFS & Swarm deployment so it works in all environments not just development
- Support receiving a custom embark.json file in the tests
- Create a datadir per environment so different private chains are supported
- Support for -p (port) -h (host) and -a (number of accounts) when running embark simulator
- Creating a new dapp with
embark new MyApp
will now automatically insert the app name into the package.json name field
Documentation
The new documentation for embark is being worked on and available at https://embark.readthedocs.io/en/latest/. If you wish to help out don't hesitate to do a PR or contact me at our gitter channel.
Thank you
A big thanks to all that contributed to this release including Andy Nogueira, Daniel Benton, Luke Childs and Akhil Srinivasan
Chatroom
To discuss about Embark or Dapp development, please join us at the gitter channel
Donations
If you like Embark please consider donating to 0xFA239D14c7117C3D2370B2a4c4238534391fadd9