Embark 5.1

Interfaces & Libraries Configuration

Embark 5.1 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: {
...
}

Find the complete documentation here.

getEvmVersion for conditional tests

Embark tests now include a helper getEvmVersion that can be used to consult what EVM the tests are being run on. This is useful when you have certain tests that can only be run in a particular type of node, but you still want to be able to run tests everywhere without them breaking.

For example:

it("cannot bid after 5 minutes", async () => {
const evmVersion = await global.getEvmVersion();
if (evmVersion.indexOf("TestRPC") === -1) return;

increaseTime(5000)

await assert.reverts(Auction.methods.bid(), {from: web3.eth.defaultAccount}, 'Returned error: VM Exception while processing transaction: cannot bid after auction expired');
})

Nethermind plugin

Embark now comes with a Nethermind plugin.
More info about the plugin can be found here

Changelog

Features
@embark/deployment: introduce interfaces and libraries configuration (73d0443)
@embark/nethermind: add Nethermind blockchain client plugin (6db8d87)
@embark/test-runner: expose evmClientVersion for conditional tests (e37d3f7)
@embark/testing: introduce proper request2 api for async/await (c947517)
@embark/testing: add missing APIs to register console commands and API calls (bef582d)
support Node.js v12.x and newer (c093cf8)

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)
@embark/embarkjs: change enableEthereum to not rely on returned accounts array (b8f93ea)
@embark/test: increase default gas limit to 8M so tests support bigger contracts (b6856b2)
@embark/ens: connect to web3 only with dappAutoEnable is true (e0ac539)
@embark/proxy: Parse rpcPort from config as integer (9f7c682)