![](/img/trans.png)
[英]Call function of smart contract after deploying smart contract in Solidity
[英]Mainnet deploying array of addresses as constructor parameter in Remix Solidity smart contract does not work
您只需要在双引号中输入地址数组即可。 例如,
语用强度^ 0.4.25;
contract Test {
address[] mAddrs;
event Deployed(address indexed theaddr);
constructor(address[] addrs) public {
mAddrs = addrs;
for (uint8 i = 0; i < mAddrs.length; i++)
emit Deployed(mAddrs[i]);
}
}
部署参数为["0xca35b7d915458ef540ade6068dfe2f44e8fa733c", "0x14723a09acff6d2a60dcdf7aa4aff308fddc160c", "0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.