{"action":"closed","issue":{"url":"https://api.github.com/repos/nos/api-functions/issues/1","repository_url":"https://api.github.com/repos/nos/api-functions","labels_url":"https://api.github.com/repos/nos/api-functions/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/nos/api-functions/issues/1/comments","events_url":"https://api.github.com/repos/nos/api-functions/issues/1/events","html_url":"https://github.com/nos/api-functions/issues/1","id":319353651,"number":1,"title":"TestInvoke Error: Invocation failed for operation","user":{"login":"robmoorman","id":529396,"avatar_url":"https://avatars3.githubusercontent.com/u/529396?v=4","gravatar_id":"","url":"https://api.github.com/users/robmoorman","html_url":"https://github.com/robmoorman","followers_url":"https://api.github.com/users/robmoorman/followers","following_url":"https://api.github.com/users/robmoorman/following{/other_user}","gists_url":"https://api.github.com/users/robmoorman/gists{/gist_id}","starred_url":"https://api.github.com/users/robmoorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robmoorman/subscriptions","organizations_url":"https://api.github.com/users/robmoorman/orgs","repos_url":"https://api.github.com/users/robmoorman/repos","events_url":"https://api.github.com/users/robmoorman/events{/privacy}","received_events_url":"https://api.github.com/users/robmoorman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-01T22:49:48Z","updated_at":"2018-05-02T10:34:45Z","closed_at":"2018-05-02T10:34:45Z","author_association":"NONE","body":"## Expected Behavior\r\nThe method `testInvoke` should resolve the Promise what the Smart Contract (SC) returns.\r\n\r\nCode which calls this method:\r\n\r\n```js\r\nconst bookmarks = await this.props.nos.testInvoke('0xe973b31b5d8cf928916f2a30a4611b2bed31af7e', 'GetBookmarks', [address])\r\n```\r\n\r\nThe `address` is the CoZ wallet address (`AK2nJJpJr6o664CWJKi1QRXjqeic2zRp8y`).\r\n\r\n## Current Behavior\r\n```js\r\n[DApp] Error: Invocation failed for operation \"GetBookmarks\" on \"0xe973b31b5d8cf928916f2a30a4611b2bed31af7e\"\r\n```\r\n\r\n## Possible Solution\r\nWe tried multiple encodings for the arguments passed to `testInvoke` (no result):\r\n\r\n```js\r\n# Code example from Discord (@DrPpr)\r\nconst addressToScriptHash = (address) => unhexlify(u.reverseHex(wallet.getScriptHashFromAddress(address)))\r\n\r\n# Code example from dapp-neoblog\r\nstr2hexstring(address)\r\n```\r\n\r\n## Steps to Reproduce (for bugs)\r\nDetails: https://github.com/Cryptopians/nos-bookmark-dapp/blob/master/README.md#setup\r\n\r\nSmart contract: https://github.com/Cryptopians/nos-bookmark-dapp/blob/master/contracts/nos_bookmark.py\r\nJavaScript: https://github.com/Cryptopians/nos-bookmark-dapp/blob/master/src/containers/Bookmarks.js#L25\r\n\r\nWe also tried to remove/uncomment the `CheckWitness` in the smart contract.\r\n\r\n## Context\r\n* Running the dApp from the client\r\n* TestInvoke via `neo-python` works as expected\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Version used: latest of all dependencies\r\n* Environment name and version: node v8.11.1\r\n* Operating System and version (desktop or mobile): Desktop macOS 10.12.6 (Sierra), Chrome\r\n"}}
{"actor":{"display_login":"robmoorman"}}