Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- factory = await web3.eth.Contract(JSON.parse(compiledFactory.interface))
- .deploy({
- data: compiledFactory.byteCode,
- })
- .send({
- from: accounts[0],
- gas: "1000000",
- });
- contract Factory{
- CrowdFunding[] public deployedContractAddresses;
- constructor(uint minimum) public {
- CrowdFunding newContract = new CrowdFunding(minimum, msg.sender);
- deployedContractAddresses.push(newContract);
- }
- function getDeployedContractAddresses() public view returns(CrowdFunding[] memory) {
- return deployedContractAddresses;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement