I came across the following code and found the term "pragma experimental ABIEncoderV2". Can anybody be specific in telling what this actually means?

//pragma solidity ^0.5.2;
pragma experimental ABIEncoderV2;
contract test {

struct document{
   string ipfsHash;
   string documentName;
   bytes32 accessKey;

struct grantAccess{
   address owner;
   address single;     

This is a part of the code I found over the web.


The standard ABI coder does not allow arrays of dynamic types, structs or nested variables between the Solidity contract and the dApp.

The ABI v2 coder; which allows structs, nested and dynamic variables to be passed into functions, returned from functions and emitted by events.

Note: Do not use experimental features on live deployments.

  • 5
    Wow. Solidity v0.8.0 has JUST BEEN RELEASED WITH ABI coder v2 activated by default!!!
    – Russo
    Dec 24 '20 at 10:03

From Solidity v0.8.0 Breaking Changes https://docs.soliditylang.org/en/v0.8.0/080-breaking-changes.html

ABI coder v2 is activated by default.

So it is not experimental, but standard feature since solc v0.8.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.