TransWikia.com

CompileError: UnimplementedFeatureError: Encoding type "struct A.Params memory" not yet implemented

Ethereum Asked by user2584960 on January 6, 2021

I am hitting a deadend and I hope I can get some enlightenment.

In one of the contract, Pool.sol I have a storage state variable defined as:

struct PoolParam {
        string xyz;
        string yzy;
        address[] tokens;
        uint[] balances;
        uint[] tokenWeights;
  }

PoolParam public PoolInfo;

Then, PoolInfo is updated as information is gathered throughout the life cycle of the contract:

PoolInfo.tokens.push(address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2));
PoolInfo.balances.push(300);
PoolInfo.tokenWeights.push(2);

After update is completed, this variable is passed into a function which is owned by another contract Factory.sol:

Factory.Create(PoolInfo);

The signature of Create in Factory.sol is:

function Create(
        Pool.PoolParam calldata poolParams
    )
        external
        returns (newPool)
    {

I then I got a compilation error:

CompileError: UnimplementedFeatureError: Encoding type "struct Pool.PoolParam memory" not yet implemented.

What am I doing wrong?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP