Skip to main content
100%

Gist 1262ee12ff6fde700ecd6493632cbe69

✓ Published0🌍 Public
Aamazingandyyy
Last edited Nov 19, 2017
Created on Aug 3, 2017

This example shows a Truffle contract test that verifies the HelloEthSalon smart contract returns the exact string "Hello Ethereum Salon!" when its GetMessage function is called. The code uses the artifacts.require API to load the compiled contract, then deploys it via contract.deployed() before invoking GetMessage.call() to retrieve the on-chain result. The assertion checks that the returned string matches the expected value, demonstrating a basic end-to-end interaction between a JavaScript test runner and an Ethereum Solidity contract.

AI-generated description

Similar vizzes