강의

멘토링

로드맵

Inflearn Community Q&A

titkyh6880's profile image
titkyh6880

asked

Creating a Blockchain Ethereum Real Estate Dapp - Basic

Listing Purchase Function

"send" and "transfer" are only available for objects of type "address payable", not "address". 오류

Written on

·

516

0

function buyRealEstate(uint _id, bytes32 _name, uint _age) public payable {

require(_id >= 0 && _id <= 9);

buyers[_id] = msg.sender;

buyerInfo[_id] = Buyer(msg.sender, _name, _age);

owner.transfer(msg.value);

}

함수에서 onwer.transfer(....); 에 오류가 아래와 같은 오류가 납니다.

"send" and "transfer" are only available for objects of type "address payable", not "address".

blockchaindappEthereum

Quiz

52% of people got it wrong. Give it a try!

What are the advantages of using blockchain in real estate transactions?

Transaction speed is always rapid.

The record is not falsified or altered and remains permanently.

The role of the intermediary becomes more important.

All transaction information is public to everyone.

Answer 3

3

혹시 이 에러 뜨시는 분들은 일단 무시하고 컴파일 진행하시면 정상적으로 작동하니 참고하세요~!

그렇네요! 무시하고 하니까 잘 됩니다 ㅎㅎ

2

address(uint160(owner)).transfer(msg.value); 이렇게 바꾸시면 실행되는거 같아요!

0

SEJONG IT EDU님의 프로필 이미지
SEJONG IT EDU
Instructor

트러플 버전이 혹시 4.1.15인거 맞나요?

titkyh6880's profile image
titkyh6880

asked

Ask a question