inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

Klaytn 클레이튼 블록체인 어플리케이션 만들기 - NFT

not a program account 에러

400

sun_ny0529

작성한 질문수 1

0

 not a program account 에러는 어떤 상황에서 생기는 오류인가요...!

에러메세지와 error.js 화면 적어놓겠습니다.

해결법에 대해서도 조언 가능하시다면 부탁드립니다.

<에러메세지>

errors.js:74 Uncaught (in promise) Error: Returned error: not a program account (e.g., an account having code and storage)

    at Object.ErrorResponse (errors.js:74)

    at eval (index.js:155)

    at XMLHttpRequest.request.onreadystatechange (index.js:112)

    at XMLHttpRequestEventTarget.dispatchEvent (xml-http-request-event-target.js:34)

    at XMLHttpRequest._setReadyState (xml-http-request.js:208)

    at XMLHttpRequest._onHttpResponseEnd (xml-http-request.js:318)

    at exports.IncomingMessage.eval (xml-http-request.js:289)

    at exports.IncomingMessage.emit (events.js:157)

    at endReadableNT (_stream_readable.js:1010)

    at afterTickTwo (index.js:28)

<errors.js>

onst constants = __webpack_require__(/*! ./constants */ "./node_modules/caver-js/packages/caver-core-helpers/src/constants.js")

const hasErrorMessage = result => !!result && !!result.error && !!result.error.message

const txErrorTable = {

    '0x2': 'VM error occurs while running smart contract',

    '0x3': 'max call depth exceeded',

    '0x4': 'contract address collision',

    '0x5': 'contract creation code storage out of gas',

    '0x6': 'evm: max code size exceeded',

    '0x7': 'out of gas',

    '0x8': 'evm: write protection',

    '0x9': 'evm: execution reverted',

    '0xa': 'reached the opcode count limit',

    '0xb': 'account already exists',

    '0xc': 'not a program account (e.g., an account having code and storage)',

    '0xd': 'Human-readable address is not supported now',

    '0xe': 'fee ratio is out of range [1, 99]',

    '0xf': 'AccountKeyFail is not updatable',

    '0x10': 'different account key type',

    '0x11': 'AccountKeyNil cannot be initialized to an account',

    '0x12': 'public key is not on curve',

    '0x13': 'key weight is zero',

    '0x14': 'key is not serializable',

    '0x15': 'duplicated key',

    '0x16': 'weighted sum overflow',

    '0x17': 'unsatisfiable threshold. Weighted sum of keys is less than the threshold.',

    '0x18': 'length is zero',

    '0x19': 'length too long',

    '0x1a': 'nested role-based key',

    '0x1b': 'a legacy transaction must be with a legacy account key',

    '0x1c': 'deprecated feature',

    '0x1d': 'not supported',

    '0x1e': 'smart contract code format is invalid',

}

module.exports = {

    InvalidConnection: host => new Error(`CONNECTION ERROR: Couldn't connect to node ${host}.`),

    ConnectionTimeout: ms => new Error(`CONNECTION TIMEOUT: timeout of ${ms}ms achived`),

    InvalidProvider: () => new Error('Provider not set or invalid'),

    InvalidNumberOfParams: (got, expected, method) =>

        new Error(`

    Invalid number of parameters for "${method}". Got ${got} expected ${expected}!

    `),

    ErrorResponse: result => {

        const message = hasErrorMessage(result) ? result.error.message : JSON.stringify(result)

        return new Error(`Returned error: ${message}`)

    },

    InvalidResponse: result => {

        if (result === null) return new Error('Invalid response: null')

        const message = hasErrorMessage(result) ? result.error.message : `Invalid JSON RPC response: ${JSON.stringify(result)}`

        return new Error(message)

    },

    needNameCallPropertyToCreateMethod: new Error('When creating a method you need to provide at least the "name" and "call" property.'),

    blockHashNull: new Error('blockHash null'),

    contractCouldntBeStored: new Error("The contract code couldn't be stored, please check your gas limit."),

    receiptDidntContainContractAddress: new Error("The transaction receipt didn't contain a contract address."),

    transactionReverted: receiptJSON => new Error(`Transaction has been reverted by the EVM:\n${receiptJSON}`),

    transactionRanOutOfGas: receiptJSON => new Error(`Transaction ran out of gas. Please provide more gas:\n${receiptJSON}`),

    invalidGasPrice: () => new Error(`Invalid gas price. Please provide valid gas price: ${constants.VALID_GAS_PRICE}`),

    invalidGasLimit: () => new Error('Invalid gas limit. Please provide valid gas.'),

    invalidData: () => new Error('Invalid data. Please provide valid hex-strict data.'),

    notAllowedZeroGas: () => new Error("gas can't be 0. Please provide more gas."),

    txErrorTable,

}

웹앱 blockchain nft

답변 0

사이트 문제 및 ipfs 링크 받을 떄 문제해결

0

486

1

ipfs.infura.io 문제 해결

0

1050

1

파일검색 문제 해결

0

468

1

ERC-721을 위한 baobab 사이트에 계정만들기부터 안되요.

0

391

2

ERC165 의 구현 질문

0

215

0

살려주세요 ㅠㅠ Invalid private key 오류

0

563

0

truffle migrate --compile-all --reset --network klaytn 오류

0

273

0

ERC721 Full

0

242

0

Klaytn IDE 인터페이스가 바뀌어서 그런지 몰라도 뭔가 좀 안되네유

0

252

0

ganache-cli 실행 후 truffle console 에서 accounts 가 조회가 안됩니다.

0

360

1

Deploy & Run 부분 문제 발생

0

229

1

KAS와 CAVER의 관계

0

329

1

비디오 아이디 입력 시 에러

0

268

1

gas 오류

0

466

3

kaikas 와 연동하여 로그인하려면 어떤걸 공부해야 할까요?

0

598

2

!!!!!! 여러분 꼭 읽어주세요 !!!!!!!

3

408

2

Klayton IDE에서 Account누르고 정상적으로 추가해도 추가가 안되요

0

215

1

NFT 멀티 에디션에 대한 질문입니다.

0

330

1

ReferenceError : TextDecoder is not defined 에러 발생

0

1175

1

ipfs 타임아웃

0

317

1

수강의사 있습니다.

1

282

0

강의자료 공유 가능할까요?

0

283

0

수강의사 있습니다.

0

320

0

컴파일러 버전이 안된다고 나옵니다.

0

182

0