let's say we have a contract which calls other contract's function that emits an event. What is the approach to emit the event coming from the inner contract's message?
Currently, there is only an event inside the inner contract
e.g: we have a LendingPool contract and inside one of its functions we have the following call lending_pool.mint_token()
and inside the mint_token()
token function, there is a call to a separate contract erc_token.mint()
and within this mint function inside the ERC20 contract, we have self.env().emit_event(Mint {...})
.
So the question is, how to emit this event from within the LendingPool
contract?