Skip to content

Releases: LimeChain/matchstick

Prerelease with all the binaries

14 Oct 12:04
e0838bb
Compare
Choose a tag to compare
Pre-release
Merge pull request #200 from LimeChain/separate-m1-binary

Separate m1 binary

v0.1.5

11 Oct 09:58
83cb00f
Compare
Choose a tag to compare

In this release:

  • Users can now expect a test to fail, using the shouldFail flag on the test() functions:
test("Should throw an error", () => {
  throw new Error();
}, true);

If the test is marked with shouldFail = true but DOES NOT fail, that will show up as an error in the logs and the test block will fail. Also, if it's marked with shouldFail = false (the default state), the test executor will crash.

  • Logs are now as close as in graph-ts as possible. Here's a simple example with all non-critical log types:
import { test } from "matchstick-as/assembly/index";
import { log } from "matchstick-as/assembly/log";

export function runTests(): void {
    test("Success", () => {
        log.success("Success!". []);
    });
    test("Error", () => {
        log.error("Error :( ", []);
    });
    test("Debug", () => {
        log.debug("Debugging...", []);
    });
    test("Info", () => {
        log.info("Info!", []);
    });
    test("Warning", () => {
        log.warning("Warning!", []);
    });
}

Users can also simulate a critical failure, like so:

test("Blow everything up", () => {
    log.critical("Boom!");
});
  • Helper functions for asserting variable equality:
assert.equals(ethereum.Value.fromString("hello"); ethereum.Value.fromString("hello"));

// String
assert.stringEquals(DEFAULT_LOG_TYPE, newGravatarEvent.logType!);

// Address
assert.addressEquals(Address.fromString(DEFAULT_ADDRESS), newGravatarEvent.address);
 
// BigInt
assert.bigIntEquals(BigInt.fromI32(DEFAULT_LOG_INDEX), newGravatarEvent.logIndex);

// Bytes & nested objects
assert.bytesEquals((Bytes.fromHexString(DEFAULT_BLOCK_HASH) as Bytes), newGravatarEvent.block.hash);

v0.1.5a

08 Oct 11:31
1e58a0a
Compare
Choose a tag to compare
v0.1.5a Pre-release
Pre-release

In this release:

  • Users can now expect a test to fail, using the shouldFail flag on the test() functions:
test("Should throw an error", () => {
  throw new Error();
}, true);

If the test is marked with shouldFail = true but DOES NOT fail, that will show up as an error in the logs and the test block will fail. Also, if it's marked with shouldFail = false (the default state), the test executor will crash.

  • Logs are now as close as in graph-ts as possible. Here's a simple example with all non-critical log types:
import { test } from "matchstick-as/assembly/index";
import { log } from "matchstick-as/assembly/log";

export function runTests(): void {
    test("Success", () => {
        log.success("Success!". []);
    });
    test("Error", () => {
        log.error("Error :( ", []);
    });
    test("Debug", () => {
        log.debug("Debugging...", []);
    });
    test("Info", () => {
        log.info("Info!", []);
    });
    test("Warning", () => {
        log.warning("Warning!", []);
    });
}

Users can also simulate a critical failure, like so:

test("Blow everything up", () => {
    log.critical("Boom!");
});
  • Helper functions for asserting variable equality:
assert.equals(ethereum.Value.fromString("hello"); ethereum.Value.fromString("hello"));

// String
assert.stringEquals(DEFAULT_LOG_TYPE, newGravatarEvent.logType!);

// Address
assert.addressEquals(Address.fromString(DEFAULT_ADDRESS), newGravatarEvent.address);
 
// BigInt
assert.bigIntEquals(BigInt.fromI32(DEFAULT_LOG_INDEX), newGravatarEvent.logIndex);

// Bytes & nested objects
assert.bytesEquals((Bytes.fromHexString(DEFAULT_BLOCK_HASH) as Bytes), newGravatarEvent.block.hash);

v0.1.3

21 Sep 08:59
3aa4163
Compare
Choose a tag to compare
  • Now using API version 0.0.5 which means AssemblyScript version is updated from 0.6.x to 0.19.x

  • API 0.0.4 subgraphs won't work with this release

  • It is mandatory to update your global graph-cli version to the latest one (0.22.0) as it's the only one containing the updated graph test command and the only version currently working with API version 0.0.5

  • Manual downloading of the Matchstick binary is no longer necessary - after updating it is recommended that you just use the graph test command which will download the latest Matchstick binary and run the tests of the datasource you have given as an argument - example usage graph test Gravity

  • This update also means that graph-ts version is updated to 0.22.0 and because of their changes in the ethereum namespace (all classes had empty constructors now almost all of them are filled with all the fields) the newMockEvent() method is now returning a fully mocked class of type ethereum.Event. You can check for example uses in the README or in our example subgraph

  • Logging is now done by importing the function/functions corresponding to your desired logging level (e.g. import { success, critical } from "matchstick-as/assembly/index";) instead of the old way with just importing log and calling its functions

Testing API version 0.0.5

17 Sep 14:07
Compare
Choose a tag to compare
Pre-release
0.1.3-pre

made changes to lock file and to avoid warnings

v0.1.2

02 Sep 14:03
6c91984
Compare
Choose a tag to compare
  • Added additional binaries to support older os versions.
  • Fixed bug causing the program to panic when dynamically creating a datasource.
  • Added method for logging the whole store.

Testing older binaries

02 Sep 12:26
Compare
Choose a tag to compare
Pre-release
0.1.1-test-bin

added forgotten dollar sign

v0.1.1

24 Aug 08:03
64b1c81
Compare
Choose a tag to compare

Release notes:

  • Added assert.notInStore() method. You can read more about it here

  • Also as part of this release cycle we added a bug fix for this issue - #159

Stable

05 Aug 10:44
9961082
Compare
Choose a tag to compare
Merge pull request #124 from LimeChain/mock-function-revert

Mock function revert

Name change

03 Aug 09:53
974a427
Compare
Choose a tag to compare
Merge pull request #117 from LimeChain/rebrand

Change name