DApp (2) 썸네일형 리스트형 Lottery DApp 만들기 에러모음 DApp만들기를 실습하면서 생겼던 오류들을 정리했다. react를 이용해서 화면을 구성했고 truffle과 ganache를 이용해서 스마트 컨트랙트를 구성했다. 참고 영상 더보기 https://youtu.be/Ud3_OrxNPDg Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced... 스마트 컨트랙트 연산 gas(가스) 소모 스마트 컨트랙트에서 코드가 실행될때 코드가 저장하는 데이터, 연산 값들을 통해서 gas가 소모된다. 32btyes 새로 저장 == 20000gas 32bytes 기존 값 변환 == 5000 기존 변수를 삭제하면 10000gas를 돌려받는다. lt.bet("0xab",{from:bettor,value:5000000000000000, gas:300000}) 위 명령으로 트랜잭션을 일으켜 아래 코드가 실행되었을때 소모되는 가스량을 확인해 보았다. function pushBet(bytes1 challenges) internal returns(bool){ BetInfo memory b; b.bettor = msg.sender; // 20btyes b.answerBlockNumber = block.number + .. 이전 1 다음