Let's say I've got
contract A {
event E();
function a() public {
emit E();
}
}
contract B {
A private a;
function b() public {
a();
}
}
Now my Dapp is calling the method b
:
const contractB = new web3.eth.Contract(BAbi, address)
const receipt = await contractB.methods.B().send({ /* options */ })
const {events, logs} = receipt
events
will contain one encoded event. The event will not have an event name and not decoded arguments (in the returnValues
field). Thinking of it this makes sense cause the event description wasn't put into the ABI of contract B
but into the ABI of A
. So the event description wasn't event supplied to a contract.