Truffle에서 KAS로 contract deploy문의

klaytn contract github에서 GitHub - klaytn/klaytn-contracts
소스를 받은 후에 KAS console에서 생성한 accessKeyId, secretAccessKey를 truffle-config.js에 넣고 아래 명령을 치면 에러가 발생합니다.
truffle deploy --network kasBaobab --reset

어떤 부분이 문제가 있는지 확인 부탁드립니다.
아래와 같이 baobab으로는 잘 되는데요 KAS 를 이용하려면 추가적인 설정이 필요한 건가요?
truffle deploy --network baobab --reset

Compiling your contracts…

Compiling ./contracts/Migrations.sol
Compiling ./contracts/YourTokenFlatten.sol
Artifacts written to build/contracts
Compiled successfully using:

  • solc: 0.5.6+commit.b259423e.Emscripten.clang

Starting migrations…

Network name: ‘kasBaobab’
Network id: 1001
Block gas limit: 999999999999 (0xe8d4a50fff)

1_initial_migration.js

Deploying ‘Migrations’

node_modules/caver-js/packages/caver-core-helpers/src/errors.js:92
return new Error(message)
^
Error: PollingBlockTracker - encountered an error while attempting to update latest block:
Error: Invalid JSON RPC response: “”
at Object.InvalidResponse (node_modules/caver-js/packages/caver-core-helpers/src/errors.js:92:16)
at XMLHttpRequest.request.onreadystatechange (node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js:118:32)
at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (node_modules/xhr2-cookies/xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2-cookies/xml-http-request.ts:345:8)
at IncomingMessage. (node_modules/xhr2-cookies/xml-http-request.ts:311:39)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at PollingBlockTracker._performSync (node_modules/eth-block-tracker/src/polling.js:51:24)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:93:5)
UnhandledRejections detected
Promise {
Error: Invalid JSON RPC response: “”
at Object.InvalidResponse (node_modules/caver-js/packages/caver-core-helpers/src/errors.js:92:16)
at XMLHttpRequest.request.onreadystatechange (node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js:118:32)
at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (node_modules/xhr2-cookies/xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2-cookies/xml-http-request.ts:345:8)
at IncomingMessage. (node_modules/xhr2-cookies/xml-http-request.ts:311:39)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
} Error: Invalid JSON RPC response: “”
at Object.InvalidResponse (node_modules/caver-js/packages/caver-core-helpers/src/errors.js:92:16)
at XMLHttpRequest.request.onreadystatechange (node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js:118:32)
at XMLHttpRequestEventTarget.dispatchEvent (node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (node_modules/xhr2-cookies/xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpResponseEnd (node_modules/xhr2-cookies/xml-http-request.ts:345:8)
at IncomingMessage. (node_modules/xhr2-cookies/xml-http-request.ts:311:39)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

안녕하세요,
Truffle 에서 Provider 가 정상적으로 반영되었음에도 불구하고 에러가 나는 경우는 경험상 대부분 Node.js 버젼 호환성 문제인 경우가 많은데 혹시 어떤 버젼 사용하고 계신지 정보 제공해주실수 있으실까요?

만약 15 나 16버젼을 쓰고 계시다면 NVM 이용해 로컬 버젼(해당폴더) node.js를 version 14로 바꿔서 한번 테스트 해보시기를 권장드립니다.

감사합니다.

1개의 좋아요

답변 감사드립니다
14.15.0으로 테스트 했습니다 16.14.1버전으로 해도 동일하게 Deploy에서 멈춰있었습니다
github에서 받은 그대로에 KAS 키만 넣어서 테스트 했는데 gas라든가 추가 수정할 부분이 있을까요?

같은 문제가 발생하였는데 gasPrice: null 로 변경하여 해결하였습니다.

2개의 좋아요

답변 감사드립니다!!
gasPrice 변경하니 정상적으로 deploy 됩니다~

2개의 좋아요