Why can't you transfer lines from contract to contract?

When I call, trying to transfer a string from the contract to the contract, I get an error message. in getName with an error. I know you cannot pass strings, but what is the reason?

The type of the return argument is an unavailable dynamic type that is implicitly convertible to the expected type (type of the first returned variable) string Memory. return toBeCalled.getName ();

pragma solidity ^0.1.0;

contract ToContract{
    FromContract fromContract = new FromContract();

    function getName() constant returns (string) {
        return fromContract.getName();
    }

}

contract FromContract{
    string name = 'dapp';

    function getName() constant return(string){
        return name;
    }

}
+4
source share

Source: https://habr.com/ru/post/1681044/


All Articles