NULS IDEA Plugin User Manual

1 Install NULS Plugin on IDEA

  • Get NULS plugin ZIP, and save in disk
    Click File->Settings->Plugin->Install plugin from disk

Install

  • Select the said ZIP, and click OK

Install

  • Tick NULS plugin, and click Apply

Install

2 Create a NULS project

create

Input Project name, click finish

create

3 Compile smart contract

Smart contract code compilation refers to [developer document] (http://dev.nuls.io/contract/)

code

4 Set and deploy the node and account for contract

  • Click NULS plugin on the right, and call NULS plugin interface

    code

  • Plugin automatically generates a node 127.0.0.1:8001, and developer adds a node to deploy the contract.
    Recommendation: Start the local wallet, and add the wallet address as the node address.

    Click + on the top left corner of panel, and select Add Node.

    code

  • Input Node address and clock OK

    code

  • Click + on the top left corner of panel, and select Add Account. Input Account address and click OK.

    code

5 Package contract

  • Click the second button on the top left corner of plugin to directly package the current Project. Two output forms after packaging: Jar package and Hex code

    code

  • Click [copy code] to copy the HEX code to the [deploy contract] interface of wallet to deploy contract (optional step).

    code

  • Click the third button on the plugin panel top or [Next] at the button of current package interface to access contract deploying interface

    code

    code

6 Deploy contract

  • On Deploy interface, select the node and account for deploying contract from pull-down list. JarFilePath default value is the package route of the previous step.

    code

  • Parameters following JarFilePath are the parameters of the contract construction function.

    code

  • Click [advanced] to set gas value and price value. Gas varies from 1 to 10000000. Recommend to set a greater gas value to avoid failing in deploying contract.

    code

  • Click [Test Deploy] to conduct a trial deployment of contract. In case of a success, it gives prompt of Success.

    code

  • If success, click [Deploy]. After confirmation of contract creation transaction, it feeds back details of transaction, indicating a success of contract deployment.

    code

  • Review the deployed contract on the top of panel

    code

  • Click the deployed contract to review all method of this contract

    code