Closed
Description
I'm looking at updating https://github.com/optionality/clone-factory and testing it with forge.
One of the functions does the following, and emits an event with the clone address (vs returning it)
function createThing(string memory _name, uint256 _value) public {
address clone = createClone(libraryAddress);
Thing(clone).init(_name, _value);
emit ThingCreated(clone, libraryAddress);
}
the tests then pick up this address by doing
_factory.createThing(name, value)
.then(tx => {
return Thing.at(tx.logs[0].args.newThingAddress);
})
Is there a similar way to get the logged / emitted events and their arguments in forge?
Metadata
Metadata
Assignees
Type
Projects
Status