robertaachenw / solidity-debugger

38 stars 6 forks source link

How to debug the Upgradable Contract? #13

Open cfanboy opened 1 year ago

cfanboy commented 1 year ago

My contact is upgradable contact with initialize method, like:

contract MyMTK is Initializable, OwnableUpgradeable{ function initialize( IERC20 _token ) public initializer { __Ownable_init(); token = _token; } }

Then I debug it by passed the address like this: MyMTK mtkContract = MyMTK(0x....);

It compiles error:

Could not find member 'custom:oz-upgrades-unsafe-allow' on object of type 'Doc'. Path 'contracts['@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'].Initializable.devdoc.custom:oz-upgrades-unsafe-allow', line 1, position 6931. => Newtonsoft.Json.JsonSerializationException: Could not find member 'custom:oz-upgrades-unsafe-allow' on object of type 'Doc'. Path 'contracts['@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'].Initializable.devdoc.custom:oz-upgrades-unsafe-allow' ...