This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract EC1{ | |
address private owner; | |
struct Certificate{ | |
string cource_name; | |
string performance; | |
string grade; | |
string issued_date; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"deploy": { | |
"VM:-": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, | |
"main:1": { | |
"linkReferences": {}, | |
"autoDeployLib": true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract Election{ | |
address private owner; | |
struct Candidate{ | |
string name; | |
address acc_address; | |
uint256 num_of_votes; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.24; | |
contract Election{ | |
address private owner; | |
struct Candidate{ | |
string name; | |
address acc_address; | |
uint256 num_of_votes; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.1; | |
contract Bank{ | |
address private owner; | |
constructor() public { | |
owner = msg.sender; | |
} | |
modifier isValid() { | |
require(owner == msg.sender); | |
_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.1; | |
interface Interface { | |
function check() external returns (bool); | |
function loan() external returns (bool); | |
} | |
//inheritance | |
contract Parent is Interface{ | |
//constructor | |
constructor(uint val) public { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.1; | |
//inheritance | |
contract Parent{ | |
//constructor | |
constructor(uint val) public { | |
privateValue = val; | |
} | |
//protected modifire | |
uint internal internalValue; | |
//private modifire |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.5.1; | |
contract MyFirstContract { | |
string public name; | |
uint public age; | |
function setName(string memory newName) public { | |
name = newName; | |
} | |
function getName() public returns (string memory){ | |
return name; |