Skip to content

Instantly share code, notes, and snippets.

@prithwis
Created November 25, 2020 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prithwis/1efe44dad1344a627dc453adf8b130f7 to your computer and use it in GitHub Desktop.
Save prithwis/1efe44dad1344a627dc453adf8b130f7 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.25+commit.59dbf8f1.js&optimize=false&runs=200&gist=
pragma solidity ^0.4.24;
// https://www.dappuniversity.com/articles/solidity-tutorial
contract pmConOne {
string pmValue;
function get() public view returns(string) {
return pmValue;
}
function set(string inValue) public {
pmValue = inValue;
}
function set2(string inValue) public {
pmValue = string(abi.encodePacked(pmValue,inValue));
}
constructor() public {
pmValue = "OriginalValue";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment