nuls-smartcontract-archetype

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

License

License

GroupId

GroupId

io.nuls.v2
ArtifactId

ArtifactId

nuls-smartcontract-archetype
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

nuls-smartcontract-archetype
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Source Code Management

Source Code Management

https://github.com/nuls-io/nuls-smartcontract-archetype

Download nuls-smartcontract-archetype

How to add to project

<!-- https://jarcasting.com/artifacts/io.nuls.v2/nuls-smartcontract-archetype/ -->
<dependency>
    <groupId>io.nuls.v2</groupId>
    <artifactId>nuls-smartcontract-archetype</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.nuls.v2/nuls-smartcontract-archetype/
implementation 'io.nuls.v2:nuls-smartcontract-archetype:1.0.0'
// https://jarcasting.com/artifacts/io.nuls.v2/nuls-smartcontract-archetype/
implementation ("io.nuls.v2:nuls-smartcontract-archetype:1.0.0")
'io.nuls.v2:nuls-smartcontract-archetype:jar:1.0.0'
<dependency org="io.nuls.v2" name="nuls-smartcontract-archetype" rev="1.0.0">
  <artifact name="nuls-smartcontract-archetype" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.nuls.v2', module='nuls-smartcontract-archetype', version='1.0.0')
)
libraryDependencies += "io.nuls.v2" % "nuls-smartcontract-archetype" % "1.0.0"
[io.nuls.v2/nuls-smartcontract-archetype "1.0.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 3.8.1

Project Modules

There are no modules declared in this project.

nuls-smartcontract-archetype

When creating a smart contract project, add the NULS smart contract archetype to IDEA, and then select this archetype to generate the NULS smart contract project. The generated project has automatically completed the dependencies of the required jar package. The developer only needs to write the business code. After using smart package to package smart contracts, the smart contract debugging platform will be launched automatically, and developers can debug smart contracts on this platform.

How to build

condition

  • JDK1.8
  • Maven 3.5 and above

Get the source

git clone https://github.com/nuls-io/nuls-smartcontract-archetype.git

Build source

mvn clean install

After building maven successfully, the artifacts will be uploaded to your local maven repository.

Configuring maven run parameters

In order to solve the problem of Intellij IDEA creating a Maven project through archetype slowly, increase the maven run parameters: -DarchetypeCatalog=internal,The operation steps are as follows:

Create a NULS Smart Contract Project

  • Click on the menu of IntelliJ IDE:File->New Project->Maven,As shown below:

  • Check "Create From archetype" and click the "Add Archetype" button, as shown below, fill in the following information to generate "io.nuls:nuls-smartcontract-archetype"

       GroupId:io.nuls.v2
       ArtifactId: nuls-smartcontract-archetype 
       Version: 0.11
    

  • Select the generated "io.nuls.v2:nuls-smartcontract-archetype" and click Next to create the NULS Smart Contract Project.

Smart contract project generated by prototype

  • The smart contract project is a maven project
  • The smart contract project comes with a sample contract class and all required NULS smart contract dependencies are automatically added to the project.
  • The smart contract project automatically relies on the offline smart contract debugging platform.
  • When the contract is packaged via mvn clean pakcage, the offline smart contract is launched and the contract is deployed to the offline smart contract debugging platform.
  • Simplify contract deployment and execution without uploading jar packages or generating contract hex code
  • This smart contract project comes with some useful tools to facilitate the development of smart contracts.
io.nuls.v2

Versions

Version
1.0.0
0.13
0.12
0.11
0.10
0.9