Introduction
Purpose and Use Case
The contraect-maven-plugin simplifies interacting with smart contracts on the aeternity blockchain. It generates Java classes out of the sophia contract sourcecode which provide a convenient to deploy a contract on the chain or call a function. It also wraps the input and output objects of those function calls - no parsing is necessary.
Detail description
The plugin takes a contract written in sophia language
generates a Java class representing the contract and its methods
initialization of instance can be done using an existing contractId thus the methods of an already deployed contract are then alled
creates a method to deploy the contract
create method for every entrypoint
method will be executed using dryRun - which means it will not be committed and thus included in a block
if method is stateful - transaction will be committed and thus included in a block, it will be wait for confirmation
if method is payable - an additional parameter is available to set the amount to deposit
all input parameters are parsed to typed java classes (if possible)
also the result is parsed to java type (if possible)
in case of errors during dryRun call or committing the tx errors are raised with details from the node
Limitations
Tuples of size > 10 are not supported and currently not planned. If there's an indiciation, that more is needed, we will get back to this.
Last updated