Here's the code:
I compile these two contracts together and deploy Bar contract. After deploying it I have a contract account address where it has been deployed on the blockchain:
Then I call Bar.createFoo() and get a new contract account address where the newly created contract Foo has just been deployed:
My first question is:
What is stored in the variable whatAmI? Is it the address of Bar or is it the address of my account(externally owned account) that called Bar.createFoo()?
My second question is:
Compiler throws an error: TypeError: Cannot read property 'event' of undefined
What am I doing wrong here?