3
remix里这段编译错误应该怎么修改源码? | 登链社区 | 技术问答
source link: https://learnblockchain.cn/question/2368
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
remix里这段编译错误应该怎么修改源码? | 登链社区 | 技术问答
15 remix里这段编译错误应该怎么修改源码?
remix里这段编译错误应该怎么修改?
contracts/szairdrop2.sol:23:9:
Warning: Return value of low-level calls not used. contract_address.call(id, msg.sender, tos[i], vs[i]);
对应源码:
function transfer(address contract_address,address[] tos,uint[] vs)
public
validAddress(contract_address)
returns (bool){
require(tos.length > 0);
require(vs.length > 0);
require(tos.length == vs.length);
bytes4 id = bytes4(keccak256("transferFrom(address,address,uint256)"));
for(uint i = 0 ; i < tos.length; i++){
contract_address.call(id, msg.sender, tos[i], vs[i]); //这一行报的错
}
return true;
}
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK