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
npm install -g @aeternity/aeprojectRemoved 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-inspectormanual tx inspection is moved to the CLI
Updated commands
aeproject initadded the
folderargument 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.
networksincludes network definitions for local development, testnet and mainnetwalletsincludes example wallets that are prefunded in local developmentutilsincludes 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
onAccountto 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
NETWORKSimport withconst { networks } = require('@aeternity/aeproject');for networks definitionlocal testing network is now
devmodeinstead oflocal
replace
defaultWalletsimport withconst { wallets } = require('@aeternity/aeproject');for prefunded walletsreplace
contractUtilsimport 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
Was this helpful?