doroidpanic.com

Warning: Using contract member “balance” inherited from the address type is deprecated.

Solidityのバージョン変更でコンパイルエラー


contractAdminAddress.transfer( this.balance );

エラー全文


Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).balance" instead.

バージョン変更


- contractAdminAddress.transfer( this.balance );
+ contractAdminAddress.transfer( address( this ).balance );