Функция ближнего протокола FunctionCallError(MethodResolveError(MethodNotFound))

Я новичок в блокчейне, смарт-контракте и ближнем протоколе. Я пытаюсь учиться на https://near.academy/ . В тестовой сети есть образец контракта: museum.testnet.

Я использую окна и установил wsl2.

Я могу войти с near loginкоманда. Но после этого, когда я позвонил near view museum.testnet getmemecountкоманда дает мне ошибку ниже. Кто-нибудь может мне в этом помочь?

      View call: museum.testnet.getmemecount()
An error occured
Error: Querying [object Object] failed: wasm execution failed with error: FunctionCallError(MethodResolveError(MethodNotFound)).
{
  "block_hash": "SZv8UsCeNXLkhjPa9KeZY6xJXmKNb6MLyKXqHVddiT5",
  "block_height": 65109663,
  "error": "wasm execution failed with error: FunctionCallError(MethodResolveError(MethodNotFound))",
  "logs": []
}

    at JsonRpcProvider.query (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/node_modules/near-api-js/lib/providers/json-rpc-provider.js:116:19)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Account.viewFunction (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:351:24)
    at async exports.callViewFunction (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/index.js:75:48)
    at async Object.handler (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/utils/exit-on-error.js:52:9)
TypedError: Querying [object Object] failed: wasm execution failed with error: FunctionCallError(MethodResolveError(MethodNotFound)).
{
  "block_hash": "SZv8UsCeNXLkhjPa9KeZY6xJXmKNb6MLyKXqHVddiT5",
  "block_height": 65109663,
  "error": "wasm execution failed with error: FunctionCallError(MethodResolveError(MethodNotFound))",
  "logs": []
}
    at JsonRpcProvider.query (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/node_modules/near-api-js/lib/providers/json-rpc-provider.js:116:19)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Account.viewFunction (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/node_modules/near-api-js/lib/account.js:351:24)
    at async exports.callViewFunction (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/index.js:75:48)
    at async Object.handler (/home/cinar/.nvm/versions/node/v14.18.0/lib/node_modules/near-cli/utils/exit-on-error.js:52:9) {
  type: 'UntypedError',
  context: undefined
}

1 ответ

Имя метода get_meme_count, нет . Смотрите исходный код музея здесь .

      $ near view museum.testnet get_meme_count
View call: museum.testnet.get_meme_count()
67

В какой-то части ближней академии упоминается это как getmemecount?

Другие вопросы по тегам