Building smart contracts
ICON can only run your smart contract after it has been compiled down into bytecode.
$ brew tap AdoptOpenJDK/openjdk
$ brew cask install adoptopenjdk11
In Linux (Ubuntu 18.04):
$ sudo apt install openjdk-11-jdk
For example, using the hello-world sample in the ICON smart contract examples:
$ ./gradlew build
The compiled jar bundle will be generated at
You need to optimize your jar bundle before you deploy it to local or ICON networks. This involves some pre-processing to ensure the actual deployment successful.
gradle-javaee-pluginis a Gradle plugin to automate the process of generating the optimized jar bundle. Run the
optimizedJartask to generate the optimized jar bundle.
$ ./gradlew optimizedJar
The output jar will be located at