Smart Contract #1 - Hello World Part 1

This smart contract is a basic implementation of a smart contract between two parties.

The smart contract is triggered with the publish function.

This smart contract stores the value Hello in its contract memory.

Video

The video below describes how you can run smart contract #1.

GCP_SC

Steps

In a terminal session, enter the following code:

tymlez-sc publish --templateName=SC_HelloWorld_Part1 Hello

If the contract is successfully implemented, the system will return a valid contract ID:

[INFO] commands.publish - publishing contract SC_HelloWorld_Part1....
[INFO] commands.publish - Signed tx...
[INFO] commands.publish - Post signed tx ....
[INFO] commands.publish - Smart Contract published successfully
[INFO] commands.publish - Contract id: a39f4f54a392cffd9324d3a789ccd6eacb178

Obtain the value stored within the smart contract:

tymlez-sc call --functionName=getGreeting

You should see following the output:

[INFO] commands.call - { result: 'Hello' }

Return to the smart contracts main page