Skip to content

Commit

Permalink
Merge pull request #2 from wavesplatform/master
Browse files Browse the repository at this point in the history
[pull] master from wavesplatform:master
  • Loading branch information
inozemtsev-roman authored Mar 2, 2024
2 parents dd08cda + 05fdb16 commit 4a12353
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mvn-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
publish:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ jobs:
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Cache docker images
uses: satackey/action-docker-layer-caching@v0.0.11

- name: Run tests
run: mvn -B test -Dmaven.test.failure.ignore=true

Expand Down
28 changes: 14 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.wavesplatform</groupId>
<artifactId>wavesj</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
<packaging>jar</packaging>

<properties>
Expand Down Expand Up @@ -185,73 +185,73 @@
<dependency>
<groupId>com.wavesplatform</groupId>
<artifactId>waves-transactions</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>
</dependency>


<!-- Compiler -->
<dependency>
<groupId>com.ridecompiler</groupId>
<artifactId>compiler</artifactId>
<version>1.4.12-2-g3faa9fa</version>
<groupId>com.wavesplatform</groupId>
<artifactId>lang</artifactId>
<version>1.5.3</version>
</dependency>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.13.10</version>
<version>2.13.13</version>
</dependency>

<!-- http client -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
</dependency>

<!-- logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
<version>1.3.14</version>
</dependency>

<!-- util -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.14.0</version>
</dependency>

<!-- testing -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.7.1</version>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.19.0</version>
<version>3.25.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.16.3</version>
<version>1.19.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.15.3</version>
<version>1.19.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.5.1</version>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/node/AddressesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import com.wavesplatform.transactions.data.*;
import com.wavesplatform.wavesj.*;
import com.wavesplatform.wavesj.exceptions.NodeException;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Test;
import org.testcontainers.shaded.org.apache.commons.lang.StringUtils;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
16 changes: 16 additions & 0 deletions src/test/java/util/CompilerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ public void compileLibrary() throws CompilationException {
Assert.assertEquals(0L, scriptInfo.extraFee());
}

@Test
public void compileV8() throws CompilationException {
String script = "{-# STDLIB_VERSION 8 #-}\n" +
"{-# CONTENT_TYPE EXPRESSION #-}\n" +
"{-# SCRIPT_TYPE ACCOUNT #-}\n" +
"\n" +
"let a = calculateDelay(Address(base58''), 0)\n" +
"let b = [1, 2, 3].replaceByIndex(1, 0)\n" +
"a == b[0]";
ScriptInfo scriptInfo = CompilationUtil.compile(script);
Assert.assertEquals(12, scriptInfo.complexity());
Assert.assertEquals(12, scriptInfo.verifierComplexity());
Assert.assertTrue(scriptInfo.callableComplexities().isEmpty());
Assert.assertEquals(0, scriptInfo.extraFee());
}

@Test(expected = CompilationException.class)
public void compilationError() throws CompilationException {
CompilationUtil.compile("{-# STDLIB_V 1 #-}");
Expand Down

0 comments on commit 4a12353

Please sign in to comment.