Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.75 KB

README.md

File metadata and controls

52 lines (42 loc) · 1.75 KB

Maven plugin for generation of contract wrappers

Generate smart contract wrappers and use them to call/execute transactions.

Usage

Add scalether-maven-plugin to pom.xml

<plugin>
    <groupId>io.daonomic.scalether</groupId>
    <artifactId>scalether-maven-plugin</artifactId>
    <version>${scalether.version}</version>
    <executions>
      <execution>
        <phase>generate-sources</phase>
        <goals>
          <goal>generate</goal>
        </goals>
      </execution>
    </executions>                
    <configuration>
        <contracts>
            <!--list all contracts you want-->
            <contract>
                <!--this is file from build/contracts folder from Truffle. If contract is not abstract, you will be able to deploy contract -->
                <truffle>src/main/truffle/TestSaleContract.json</truffle>
                <packageName>com.rarible.test.contracts.sale</packageName>
                <!--Specify MONO if you want to generate contracts for project reactor's Mono-->
                <type>MONO</type>
            </contract>
            <contract>
                <!--If you specify abi json file, no contract deployment will be possible, only wrapper is generated-->
                <abi>src/main/abi/TestTokenContract.json</abi>
                <packageName>com.rarible.test.contracts.token</packageName>
                <type>MONO</type>
            </contract>
        </contracts>
    </configuration>
</plugin>

ABI json files and Truffle output files are supported.

Suggestions

You are welcome to suggest features and report bugs found!

License

Maven plugin is available under the MIT License.