Ethereum web3 filter로 transaction watch하기
이더리움에서 일반 이더를 송금할 때는 이벤트를 받을수가 없다. 따라서 다음과 같이 filter를 걸어서 block안의 transactions에 우리가 원하는 transactionHash가 포함되었는지를 확인함으로서 송금이 완료되었는지를 확인할수 있다.아래의 소스코드는 node.js로 작성하였다. // 이더리움 web3에 접속 var EthConn = require('../contracts/ethconn.js');var host = 'http://localhost:8545'var ethconn = new EthConn(host);console.log(ethconn.web3.eth.accounts); var web3 = ethconn.web3;var eth = web3.eth;var personal = we..
프로그래밍
2018. 4. 16. 19:39
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday