forked from 0xmoei/swisstronik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHello_swtr.sol
32 lines (27 loc) · 912 Bytes
/
Hello_swtr.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.19;
//This contract is only intended for testing purposes
contract Swisstronik {
string private message;
/**
* @dev Constructor is used to set the initial message for the contract
* @param _message the message to associate with the message variable.
*/
constructor(string memory _message) payable{
message = _message;
}
/**
* @dev setMessage() updates the stored message in the contract
* @param _message the new message to replace the existing one
*/
function setMessage(string memory _message) public {
message = _message;
}
/**
* @dev getMessage() retrieves the currently stored message in the contract
* @return The message associated with the contract
*/
function getMessage() public view returns(string memory){
return message;
}
}