Inflearn Community Q&A
TypeError: web3.toWei is not a function
Written on
·
645
0
app.buyRealEstate(0, "yw" , 28, {from: web3.eth.accounts[1],value : web3.toWei(1.50,"ether")})
이런 에러가 나오는데 이건 버전의 문제일까요?
web3.util을 붙여도 해결 되지 않네요 ㅜㅜㅜ
dappblockchainEthereum
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 6
4
저도 web3 1.2.4 버전이라 위와 같은 오류 떴는데 해결한 방법 공유할게요.
일단 sol 파일에서 bytes32 name 을 string name으로 고치고, 콘솔에선 app.buyRealEstate(0, "sejong", 13, {from: accounts[1], value: web3.utils.toWei('1.50', "ether")}) 로 하니 트랜잭션 되더라구요.
구글링으로 어떻게든 돌아가게 만들어본거라 뒷 강의 진행하면서 string 때문에 오류날 수도 있으니 강의자님 더 정확한 방법 피드백 부탁드려요!
0
0
0
0
0





