openzeppelin-test-helpers
openzeppelin-test-helpers copied to clipboard
Add helper for getting a contract's creation transaction
Truffle contracts include a property with the hash of the transaction in which they were created, web3 contracts, on the other hand, don't provide this value.
We could find it by doing a simple binary search over all blocks, querying for the code stored at the contract's address.
This can then be used to implement expectEvent.inConstruction for non-Truffle contracts.
I edited the issue to make it more general than only fixing expectEvent.inConstruction.
Also, we don't really know yet if this will be feasible.