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/aeproject
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 compileaeproject deployaeproject export(discontinued)aeproject tx-inspector- manual tx inspection is moved to the CLI
aeproject init- added the
folderargument to create a new folder for the project initialization
- added the
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.
const { networks, utils, wallets } = require("@aeternity/aeproject");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 development- initialized with all prefunded wallets for
onAccountto be used calling from different accounts
- initialized with all prefunded wallets for
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
-
Upgrade your project
aeproject init --update- 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
- adds new files needed
-
Adapt Testing Setup (compare your tests with
test/exampleTest.js) to- include
const { assert } = require('chai');for assertions - replace
NETWORKSimport withconst { networks } = require('@aeternity/aeproject');for networks definition- local testing network is now
devmodeinstead oflocal
- local testing network is now
- replace
defaultWalletsimport withconst { wallets } = require('@aeternity/aeproject');for prefunded wallets - replace
contractUtilsimport withconst { utils } = require('@aeternity/aeproject');for utils- consider using the new helpers for initializing an instance of the SDK and creating snapshots similar to
test/exampleTest.js
- consider using the new helpers for initializing an instance of the SDK and creating snapshots similar to
- include