Logging Verbose During Local Tests with Upgradeable Contracts

Currently working with openzeppelin upgrades version 1.2.4 and running tests on my machine with upgradeable proxies where the logic contracts have structs and enums spits out this message every time the contract is deployed.

Warning: Potentially unsafe deployment of ContractName

You are using the `unsafeAllowCustomTypes` flag to skip storage checks for structs and enums.
Make sure you have manually checked the storage layout for incompatibilities.

I was wondering if there is a way to silence these logs so that the test logs are not spammed with this.

1 Like

There’s no way to silence these currently. The idea was for people to be always reminded they are not checked automatically, but I understand these can be very annoying during testing.

I don’t want to provide a way to silence them fully, but we can provide a way to get only a single message to display once, and then silence everything from then on.

2 Likes

That would be appreciated if it only displays that message once and then silences from then on.

1 Like

Hi @elliot,

I have created an issue: https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/226 for this.

1 Like
2 Likes

Thank you again Francisco! Do I need to change the version I use or should I just remove the node modules and reinstall?

1 Like

Hi @elliot,

The Pull Request hasn’t been merged yet. I can let you know when there is a new release. You can uninstall and install the plugin again.

1 Like

@elliot The latest version contains a function silenceWarnings.

1 Like