Skip to main content
2 of 2
added 4 characters in body
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, “address payable” type only has the method cited.

From Solidity documentation:

enter image description here

Rick Park
  • 3.2k
  • 2
  • 9
  • 25