Open fqlx opened 2 years ago
Agreed. There needs to be multistaticcall()
with view
. Right?
On Heco, you can see someone added massGetBalance()
:
function massGetBalance(IERC20 _token,address[] memory _addressList) public view returns (returnItem memory tokenInfo,balanceItem[] memory balanceList ){
tokenInfo.decimals = _token.decimals();
tokenInfo.symbol = _token.symbol();
tokenInfo.name = _token.name();
balanceList = new balanceItem[](_addressList.length);
for (uint256 i=0;i<_addressList.length;i++) {
balanceList[i] = balanceItem(_addressList[i],_token.balanceOf(_addressList[i]),_addressList[i].balance,isContract(_addressList[i]));
}
}
https://hecoinfo.com/address/0x7991A60f01078c451FD6FdA821459B6585a55994#code
Note the view
.
In the multicall.sol contract: https://github.com/makerdao/multicall/blob/master/src/Multicall.sol#L7
As far as I'm aware, it supports writing to function calls. Is this correct? I believe this comment is wrong where it says
read-only
? And it does not supportpayable
or passingmsg.value
?