Skip to content

Instantly share code, notes, and snippets.

@ConsenSys-Academy
Last active July 25, 2019 22:03
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 ConsenSys-Academy/092f1b315afc44efcedb76a10e79cfe6 to your computer and use it in GitHub Desktop.
Save ConsenSys-Academy/092f1b315afc44efcedb76a10e79cfe6 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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.0;
contract Child {
address creator;
event newChild(address _a);
constructor()
public
{
creator = msg.sender;
emit newChild(msg.sender);
}
}
contract Factory {
event log(address _b);
function newChild()
public
{
Child c = new Child();
emit log(msg.sender);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment