Skip to content

Commit

Permalink
Merge pull request #22 from neow3j/develop
Browse files Browse the repository at this point in the history
Updates for neow3j 3.21.2
  • Loading branch information
csmuller authored Dec 14, 2023
2 parents 7644891 + fbc2fb2 commit 6670c26
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/
.DS_Store
10 changes: 5 additions & 5 deletions docs/neo-n3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="../images/neow3j-neo3.png" alt="Logo" id="logo">
</div>

<h1 id="cover-header">neow3j <small>3.21.1</small></h1>
<h1 id="cover-header">neow3j <small>3.21.2</small></h1>

Neow3j is a development toolkit that provides easy and reliable tools to build Neo dApps and Smart Contracts using the Java
platform (Java, Kotlin, Android). It is an open-source project developed by the Neo community and maintained by
Expand Down Expand Up @@ -36,7 +36,7 @@ To make use of all neow3j SDK features, add the `io.neow3j:contract` dependency
__Gradle__

```groovy
implementation 'io.neow3j:contract:3.21.1'
implementation 'io.neow3j:contract:3.21.2'
```

__Maven__
Expand All @@ -45,7 +45,7 @@ __Maven__
<dependency>
<groupId>io.neow3j</groupId>
<artifactId>contract</artifactId>
<version>3.21.1</version>
<version>3.21.2</version>
</dependency>
```

Expand All @@ -57,7 +57,7 @@ you want to play around with the devpack, add the `io.neow3j:devpack` dependency
__Gradle__

```groovy
implementation 'io.neow3j:devpack:3.21.1'
implementation 'io.neow3j:devpack:3.21.2'
```

__Maven__
Expand All @@ -66,7 +66,7 @@ __Maven__
<dependency>
<groupId>io.neow3j</groupId>
<artifactId>devpack</artifactId>
<version>3.21.1</version>
<version>3.21.2</version>
</dependency>
```

Expand Down
13 changes: 8 additions & 5 deletions docs/neo-n3/smart_contract_development/neowjava.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ byte. The methods do not truncate the argument, but throw an exception if the va

### Strings

Intuitively you can use Java's `String` type for strings. But be aware that on the NeoVM a `String` is not represented
You can use Java's `String` type for strings of text. But be aware that on the NeoVM a `String` is not represented
as an object, but as a UTF8-encoded ByteString stack item. This means that you cannot make use of `String` instance
methods like `contains()` or `indexOf()`. The exception is the `length()` method, which works as expected. Checkout the
`io.neow3j.devpack.Helper` and `io.neow3j.devpack.StringLiteralHelper` clases which offer of String related helper
methods.
methods like `contains()` or `indexOf()`. The exception is the `length()` method, which works but will give you the byte
length of the string not the character count. Instead use `io.neow3j.devpack.contracts.StdLib.strLen()` to get the
character count of a `String`.

Neow3j supports string concatenation with the `+` operator but mixing in other types is not. For example,
Neow3j supports string concatenation with the `+` operator. But, mixing in other types is not supported. For example,
`"hello" + "world"` works, but `"hello" + 5` does not.

Checkout the `io.neow3j.devpack.Helper` and `io.neow3j.devpack.StringLiteralHelper` classes which offer String related
helper methods.

### Arrays

You can use arrays as usual. You will only face some restrictions with multi-dimensional arrays. When initialising a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contract compilation via a Gradle task called `neow3jCompile`. The Java plugin i
```groovy
plugins {
id 'java'
id 'io.neow3j.gradle-plugin' version "3.21.1"
id 'io.neow3j.gradle-plugin' version "3.21.2"
}
```

Expand Down Expand Up @@ -90,13 +90,13 @@ Then we need to define the dependencies, which are `io.neow3j:devpack` for writi

```groovy
dependencies {
implementation 'io.neow3j:devpack:3.21.1'
implementation 'io.neow3j:devpack:3.21.2'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0',
'io.neow3j:devpack-test:3.21.1',
'io.neow3j:devpack-test:3.21.2',
'ch.qos.logback:logback-classic:1.2.11'
deployImplementation 'io.neow3j:compiler:3.21.1',
deployImplementation 'io.neow3j:compiler:3.21.2',
'ch.qos.logback:logback-classic:1.2.11'
}
```
Expand Down

0 comments on commit 6670c26

Please sign in to comment.