我正在读由Packt出版的Jitendra Chittoda出版的“掌握Blockchain编程的坚实”一书。在第129页中,它有一个使用Remix和MetaMask部署的示例契约。DeploymentExample.sol// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0` to `addresspayable`
使用坚固性8.16
from : TypeError:错误的参数用于函数调用:给出了3个参数,但期望为1个。这个函数需要一个字节参数。传输”只适用于类型为“地址应付”的对象,而不是“地址”。(players[index].transfer(this).balance); <-- bad line trying to transfer funds of the contract to aaddress</