Skip to main content
added 4 characters in body
Source Link
Rick Park
  • 3.2k
  • 2
  • 9
  • 25

The error is related to the absence of the method “transfer” in the “admin” address.

Simply declare “admin” as “address payable”:

address payable admin;

Starting from compiler version 0.5.0, “payable address”“address payable” type only havehas the method cited.

From Solidity documentation:

enter image description hereenter image description here

The error is related to the absence of the method “transfer” in the “admin” address.

Simply declare “admin” as “address payable”:

address payable admin;

Starting from compiler version 0.5.0, “payable address” only have the method cited.

From Solidity documentation:

enter image description here

The error is related to the absence of the method “transfer” in the “admin” address.

Simply declare “admin” as “address payable”:

address payable admin;

Starting from compiler version 0.5.0, “address payable” type only has the method cited.

From Solidity documentation:

enter image description here

Source Link
Rick Park
  • 3.2k
  • 2
  • 9
  • 25

The error is related to the absence of the method “transfer” in the “admin” address.

Simply declare “admin” as “address payable”:

address payable admin;

Starting from compiler version 0.5.0, “payable address” only have the method cited.

From Solidity documentation:

enter image description here