Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

WARNING: Experimental features are turned on. Do not use experimental features on live deployments

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
pragma experimental ABIEncoderV2;

I have a warning in my .sol files. I don’t know what is the meaning of this warning. Can you help me for this?

warning in this line –> pragma experimental ABIEncoderV2;

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Generally speaking, experimental features can be unstable and produce unexpected and undocumented bugs – which you might not want in a production environment. Hence the warning.


This specific ABIEncoderV2 was introduced in Solidity version 0.5, enabling use of nested arrays and mappings. In this Solidity version, the encoder’s stability was marked as experimental (i.e. likely unstable).

Docs: https://docs.soliditylang.org/en/v0.5.17/layout-of-source-files.html#abiencoderv2

Note that these docs are for a deprecated Solidity version 0.5.

In the current Solidity version 0.8, the ABIEncoderV2 encoder is stable and no longer experimental. So if you’re compiling the project with the latest compiler version, you can freely remove the pragma experimental statement, which will also remove the warning.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading