Migration from 3.x.x to 4.x.x
Changes
AEproject v4.0.0
underwent some bigger changes, is now available as official package of the æternity organization on NPM and is compatible to the recently published node v6.4.0.
Install the new AEproject version
Removed commands
Following commands have been removed and cannot be used anymore. Most of them didn't work properly or aren't used by anyone:
aeproject compatibility
(discontinued)aeproject export
(discontinued)aeproject tx-inspector
manual tx inspection is moved to the CLI
Updated commands
aeproject init
added the
folder
argument to create a new folder for the project initialization
Project structure
The latest available node and compiler will always be used with starting the testing environment.
Testing is now handled locally in the project using mocha
and chai
as direct dev dependencies.
@aeternity/aeproject
is added itself as dependency and includes some library-functions that can be used in testing.
networks
includes network definitions for local development, testnet and mainnetwallets
includes example wallets that are prefunded in local developmentutils
includes helper functions for testinggetFilesystem(source)
to get the filesystem definition for a given contract for deploymentgetSdk()
get an instance of the SDK for local developmentinitialized with all prefunded wallets for
onAccount
to be used calling from different accounts
awaitKeyBlocks(aeSdk, number)
await a certain number of key-blockscreateSnapshot(aeSdk)
create a snapshot for local testingrollbackSnapshot(aeSdk)
rollback to previously created snapshot in local testing
Instructions
Upgrade your project
adds new files needed
including new example contract and tests
prompts for files to replaced
docker setup for the node, compiler dev-mode setup should be accepted
example contract and example tests should not be accepted if used in your project for testing
automatically installs needed dependencies and removes unnecessary ones
Adapt Testing Setup (compare your tests with
test/exampleTest.js
) toinclude
const { assert } = require('chai');
for assertionsreplace
NETWORKS
import withconst { networks } = require('@aeternity/aeproject');
for networks definitionlocal testing network is now
devmode
instead oflocal
replace
defaultWallets
import withconst { wallets } = require('@aeternity/aeproject');
for prefunded walletsreplace
contractUtils
import withconst { utils } = require('@aeternity/aeproject');
for utilsconsider using the new helpers for initializing an instance of the SDK and creating snapshots similar to
test/exampleTest.js
Last updated