Created
November 25, 2020 12:17
-
-
Save ashutoshsinghparmar/ff29c1bf35aaec2cb9c3a02c47c56399 to your computer and use it in GitHub Desktop.
Test Gist
This file contains hidden or 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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.0 <0.7.0; | |
contract Cause { | |
string public Title; | |
constructor(string memory title) public | |
{ | |
Title = title; | |
} | |
function GetTitle() public view returns(string memory) { | |
return Title; | |
} | |
} | |
contract CauseFactory { | |
address public Admin; | |
address public CauseAddress; | |
Cause public causeInstance; | |
constructor() public { | |
Admin = msg.sender; | |
} | |
function CreateContract(string memory title) public returns(address) { | |
causeInstance = new Cause(title); | |
CauseAddress = address(causeInstance); | |
return address(causeInstance); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment