current position:Home>Contract return array type

Contract return array type

2022-02-04 00:17:55 Q & A of Denglian community

function getUserTx(address _addr) public view returns (uint[] calldata) {    return  usersTx[_addr];} mapping (address=>uint[]) public usersTx;

Report errors

TypeError: Return argument type struct Auction.Tx storage ref[] storage ref is not implicitly convertible to expected type (type of first return variable) struct Auction.Tx calldata[] calldata.

Isn't this how to return an array ?

Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended