Configure the Plugin
There are lots of configuration options available within the Aion4j plugin for IntelliJ to help speed up your contract development.
This menu allows you to select which node to connect to, how much NRG you are willing to pay, and other configuration options.
To open the configuration menu, right click anywhere within your project and select Aion Virtual Machine → Configuration. The configuration menu is split into four sections: Remote Kernel, Remote - Details, Embedded AVM, and Common.
This tab manages the options for when you are deploying to and calling from a remote node.
|Web3 RPC URL
|The URL or IP address of the remote node you are connecting to.
|The private key you want to use to deploy, call, and make transactions. Leave this field blank if you are using the Account & Password field. This private key must exist on the node in order for any transactions to work.
|The address of the account you want to use. Leave this field blank if you are using the Private Key field. This account must be unlocked on the remote node in order for any transactions to work.
|The password associated with the account you want to use. Leave this field blank if you are using the Private Key field. This account must be unlocked on the remote node in order for any transactions to work.
|Always ask for credentials
|Should the plugin store the supplied account and password information, or should it forget them after each session? We recommend you leave this checked.
|Always compile before deploying
|Should the plugin run the
mvn clean install command to compile your contract before every single deploy?
Remote - Details
These options manage NRG prices for deploying and interacting with contracts on the Testnet (Amity). These options do not effect embedded AVM features. We recommend that you do not change the values, unless you have a very specific need to do so.
|The maximum amount of NRG for transaction execution the sender is willing to pay for the transaction.
|NRG Price (Deploy)
|Fee charged per NRG transaction.
|NRG (Contract Transaction)
|The maximum amount of NRG the sender is willing to pay for the transaction.
|NRG Price (Contract Transaction)
|Free charged per NRG transaction.
|Maven Profile for Remote Deployment
|Tells Maven which profile you wish to use, as specified in your
pom.xml file. See Changing Class Name for more information.
|Specify whether you want the plugin to return transaction receipts from the node.
The Embedded AVM tab represents customizations available to the embedded AVM as local functions. These customizations do not effect the way the plugin interacts with remote nodes.
|Preserver Debug Mode
|When this is enabled, any breakpoints that are within IntelliJ will cause the compiled contract to stop. This is for debugging
|Verbose Contract Error
|Provides more details error messages from the Aion virtual machine.
|Verbose Concurrent Executor
|Provides details error messages from the Java virtual machine.
|AVM Storage Path
|External storage location for the AVM. Only provide this information if you want to share your AVM instance across multiple projects.
|Default Deployer / Caller Account
|Set the address that you would like to deploy / call contracts from.
|Taken from the
localDefaultAccount field in the
|Ask Deployer / Caller Account every time.
|Checking this box will force the plugin to ask you for an address every time a contract is deployed / called.
The common tab represents customizations that effect both local and remote functions.
|Since the plugin is essentially a wrapper around Maven, you can ask the plugin to run Maven commands. These arguments are applicable for both remote and embedded mode. See the Maven section for a list of available commands.
'-T Alice -I 30 -A 0xa001e2afd2cf...', '-<type> <value> -<type> <value> ...'
pom.xml file controls how Maven interacts with your project. In most cases you won’t have to edit this file, however there are some situations where you may need to modify some of it’s options.
Changing Class Name
When you first create a project using the Aion plugin, the default class used by the
pom.xml file is
HelloAvm preceded by the package name you chose for your project:
This corresponds to the class of your contract
public class HelloAvm
If you change either the package or class names within your contract, you need to change the
contract.main.class field in your
pom.xml file contains a
profiles section where you can define custom profiles for your project. This isn’t required for Aion contract development. See the Apache Maven documentation for more details.
IntelliJ Keyboard Shortcuts
IntelliJ allows users to assign keyboard shortcuts to individual plugins. To access this menu go to Preferences → Keymap → Plug-ins → Aion4j AVM Integration. Here you can set any keyboard shortcuts you want to. Depending on your IntelliJ installation, some default Aion plugin shortcuts may be overridden by other IntelliJ functions.