• 카테고리

    질문 & 답변
  • 세부 분야

    블록체인

  • 해결 여부

    해결됨

오랜만에 baobab testnet에 저장된 데이터를 조회할 때 out of gas가 뜹니다.

19.07.03 21:53 작성 조회수 127

0

getHashCont : function(c_code){
        return new Promise(function(resolve, reject){            
            agContract.methods.getContHash(c_code).call().then(function(name){
                if(name){
                    console.log("bmodul: "+name);  
                    resolve(name);
                }else{
                    console.log("No value in the blockchain");  
                }
                reject(new Error("No value in the blockchain."));
            })
          });
    }

를 통해 데이터를 불러올 때 

 

아래의 에러가 뜹니다.... 

Uncaught (in promise) Error: Returned values aren't valid, did it run Out of Gas?
    at ABICoder.decodeParameters (index.js:220)
    at Contract._decodeMethodReturn (index.js:796)
    at Method.outputFormatter (index.js:1347)
    at _formatOutput (index.js:216)
    at Method.formatOutput (index.js:223)
    at eval (index.js:270)
    at eval (index.js:218)
    at XMLHttpRequest.request.onreadystatechange (index.js:140)
    at XMLHttpRequestEventTarget.dispatchEvent (xml-http-request-event-target.js:34)
    at XMLHttpRequest._setReadyState (xml-http-request.js:208)

 

그리고, 다시 truffle을 deploy하려고 할 때, 

 

truffle : 'truffle' 용어가 cmdlet, 함수, 스크립트 파일 또는 실행할 수 있는 프로그램 이름으로 인식되지 않습니
다. 이름이 정확한지 확인하고 경로가 포함된 경우 경로가 올바른지 검증한 다음 다시 시도하십시오.
위치 줄:1 문자:1
+ truffle
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (truffle:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

 

이 오류가 뜹니다...

답변 2

·

답변을 작성해보세요.

0

제이유님의 프로필

제이유

질문자

2019.07.04

감사합니다!! 해결되었습니다.!

0

바오밥 계정 다시 만드시고 faucet에서 클레이 다시 받으세용 그리고 비밀키 truffle.js에서 새로운걸로 바꾸시구요.