Why is my contract triggering renounceRole() without any call to it?

I have a set of Smart Contracts that interact with each other and have set up access control from initialization. Whenever Contract A calls Contract B's function (inside contract A) access control deals with Role on each initialize() function. I got to a point where my Contract A is invoking three different contracts.

There is this transaction that reverts and the debugger stops at the renounceRole() func from OZ's AccessControl contract. None of my contracts is calling it. Do you know why is it being triggered and how do I know which of the contracts is failing or at what point...the debugger hasn't been very helpful as it tends to overload due to the amount of contracts the transaction deals with.

Also, the docs say about renounceRole this function’s purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). what do you mean by device and how can an account being compromise?

Thank you very much for your help!

For my multicontract call to work I needed to deploy each and every one of them. I realized that one of them was not deployed. The error goes away having everything well deployed (obviously). Should I assume that to be compromised means to not have all the data available and ready for your methods to be called? So then the contract decided to revoke any roles in case any malicious actor could snick into the contract? I would love to have more insights into these type of cases :thinking:

It means that maybe you lost a computer that had a private key in it, then you can recover it from a backup (which you should have :smiley:) but for security you should renounce the role to lose privileges because someone could obtain the private key and use it.

1 Like