Skip to content
On this page

Solidity

Version

Running on Solidity v0.8.19, Ganache v7.9.2, Truffle v5.11.5

Supported languages

Solidity, Javascript

Testing framework

Mochawesome

Special reminders and implementation details

solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

contract HelloWorld {
    function helloWorld() public pure returns (string memory) {
        return "Hello World!";
    }
}
1
2
3
4
5
6
7
8
js
const HelloWorld = artifacts.require("./contracts/HelloWorld");

module.exports = function (deployer) {
  deployer.deploy(HelloWorld);
};
1
2
3
4
5
js
const HelloWorld = artifacts.require("../contracts/HelloWorld");

contract("HelloWorld", function (accounts) {
    it("Should return 'Hello World!'", async () => {
        const instance = await HelloWorld.deployed();
        const result = await instance.helloWorld();
        assert.equal(result, 'Hello World!');
    })
});
1
2
3
4
5
6
7
8
9

Included libraries

How to debug

Not supported yet.