- Ethereum version
- 0.4.25
- 0.5.1
- 0.6.10(final exam)
- 컨트랙 결합 사용시 0.5대에서는 작동 안되어서 0.6.10으로 버전 upgrade를 진행하였다.
- gas를 줄일수 있으면 줄이는 것이 좋다!
- 반복문이나 연산을 많이하면 gas 비용이 많이 발생
- 오류의 절반은 버전 문제인 경우가 많다..
_gethNow.bat
geth attach http://localhost:8445
eth.accounts
!geth -exec eth.accounts attach http://localhost:8445
eth.getBalance(eth.accounts[0]);
miner.start()
miner.stop()
eth.pendingTransactions
personal.unlockAccount(eth.coinbase); #하고 비밀번호 입력
miner.start(1);admin.sleepBlocks(1);miner.stop();
#sleepBlocks(숫자)를 조절해준다.
node_modules.bin\ganache-cli.cmd -p 8345
C:\Users\minji\Code\201810808>node src/OrderEventUse.js
# 학번경로 폴더에서
node js파일주소
# 이렇게 입력한다.
- Returned error: VM Exception while processing transaction: out of gas
- The contract code couldn't be stored, please check your gas limit.
- Returned error: intrinsic gas too low at Object.ErrorResponse
- Invalid JSON RPC response: "" at Object.InvalidResponse
- connection not open on send()
- Returned values aren't valid, did it run Out of Gas?
- Expected identifier but got '(' fallback () external { ^
- Indexed expression has to be a type, mapping or array (is tuple(uint256,uint256))
- myBank.methods.getBalance(...).call.then is not a function
- Expected primary expression.
- Provided address "undefined" is invalid, the capitalization checksum test failed, or its an indrect IBAN address which can't be converted.