1

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.

2

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.

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.