Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. factory = await web3.eth.Contract(JSON.parse(compiledFactory.interface))
  2. .deploy({
  3. data: compiledFactory.byteCode,
  4. })
  5. .send({
  6. from: accounts[0],
  7. gas: "1000000",
  8. });
  9.  
  10. contract Factory{
  11. CrowdFunding[] public deployedContractAddresses;
  12.  
  13. constructor(uint minimum) public {
  14. CrowdFunding newContract = new CrowdFunding(minimum, msg.sender);
  15. deployedContractAddresses.push(newContract);
  16. }
  17.  
  18. function getDeployedContractAddresses() public view returns(CrowdFunding[] memory) {
  19. return deployedContractAddresses;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement