编译合约报错:TypeError: Type contract TestAdoption is not implicitly convertible to expected type address.

编译合约报错:TypeError: Type contract TestAdoption is not implicitly convertible to expected type address._第1张图片

这是因为编译器版本是0.5.0,代码之前编写是按照0.4.17的规范来写的,这些新特性真的坑啊,幸好不是大问题,只需要做如下改动:

 

编译即可通过:

编译合约报错:TypeError: Type contract TestAdoption is not implicitly convertible to expected type address._第2张图片

你可能感兴趣的:(区块链)