In order to have aeproject working you must have installed the following:
nodejs 9.5.0 (if you are willing to use the *fire-editor* aepp locally with *aeproject* you would need to use version not lower to 10.9.0. For more information check [aeproject fire-editor](developer-documentation/aeproject-cli/fire-editor.md))pythondocker
Note: For older versions on widnows you can use docker-toolbox. This will install docker-compose as part of the toolkit. Please bear in mind that the your docker-compose version must be at least @1.20.0
npm install -g aeproject
aeproject init
This will create deployment
directory with deploy.js
file inside. You can use this file to write your deployment procedure.
In a project folder:
aeproject node
To stop already spawned local node use aeproject node --stop
You can execute function of smart contract from deployed instance
Examples
contract ExampleContract =public function say_hello(name : string) : string =String.concat("Hello, ", name)public function donate() : int =Call.value
let deployer = new Deployer('local', privateKey);deployedContract = await deployer.deploy( contractPath, []); // empty array for init paramslet result = await deployedContract.say_hello('World'); // result would be: "Hello, World"
or you can execute/call functions from another private/secret key
const fromInstance = await deployedContract.from(anotherSecretKey);let result = await fromInstance.say_hello('Friend'); // result would be: "Hello, Friend"
or you just want to donate some aettos
await deployedContract.donate({ value: 991 });
Run the following in order to execute the deployment file created from the aeproject init command:
aeproject deploy
In order to see a list of what you've deployed you can run the following command:
aeproject history