{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/web3.js/issues/1637","repository_url":"https://api.github.com/repos/ethereum/web3.js","labels_url":"https://api.github.com/repos/ethereum/web3.js/issues/1637/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/web3.js/issues/1637/comments","events_url":"https://api.github.com/repos/ethereum/web3.js/issues/1637/events","html_url":"https://github.com/ethereum/web3.js/issues/1637","id":323989057,"node_id":"MDU6SXNzdWUzMjM5ODkwNTc=","number":1637,"title":"The method eth_sendTransaction does not exist/is not available","user":{"login":"cmaliwal","id":21885663,"node_id":"MDQ6VXNlcjIxODg1NjYz","avatar_url":"https://avatars0.githubusercontent.com/u/21885663?v=4","gravatar_id":"","url":"https://api.github.com/users/cmaliwal","html_url":"https://github.com/cmaliwal","followers_url":"https://api.github.com/users/cmaliwal/followers","following_url":"https://api.github.com/users/cmaliwal/following{/other_user}","gists_url":"https://api.github.com/users/cmaliwal/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaliwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaliwal/subscriptions","organizations_url":"https://api.github.com/users/cmaliwal/orgs","repos_url":"https://api.github.com/users/cmaliwal/repos","events_url":"https://api.github.com/users/cmaliwal/events{/privacy}","received_events_url":"https://api.github.com/users/cmaliwal/received_events","type":"User","site_admin":false},"labels":[{"id":1020256222,"node_id":"MDU6TGFiZWwxMDIwMjU2MjIy","url":"https://api.github.com/repos/ethereum/web3.js/labels/clarification%20needed","name":"clarification needed","color":"d1ff96","default":false}],"state":"open","locked":false,"assignee":{"login":"nivida","id":1699173,"node_id":"MDQ6VXNlcjE2OTkxNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1699173?v=4","gravatar_id":"","url":"https://api.github.com/users/nivida","html_url":"https://github.com/nivida","followers_url":"https://api.github.com/users/nivida/followers","following_url":"https://api.github.com/users/nivida/following{/other_user}","gists_url":"https://api.github.com/users/nivida/gists{/gist_id}","starred_url":"https://api.github.com/users/nivida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nivida/subscriptions","organizations_url":"https://api.github.com/users/nivida/orgs","repos_url":"https://api.github.com/users/nivida/repos","events_url":"https://api.github.com/users/nivida/events{/privacy}","received_events_url":"https://api.github.com/users/nivida/received_events","type":"User","site_admin":false},"assignees":[{"login":"nivida","id":1699173,"node_id":"MDQ6VXNlcjE2OTkxNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/1699173?v=4","gravatar_id":"","url":"https://api.github.com/users/nivida","html_url":"https://github.com/nivida","followers_url":"https://api.github.com/users/nivida/followers","following_url":"https://api.github.com/users/nivida/following{/other_user}","gists_url":"https://api.github.com/users/nivida/gists{/gist_id}","starred_url":"https://api.github.com/users/nivida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nivida/subscriptions","organizations_url":"https://api.github.com/users/nivida/orgs","repos_url":"https://api.github.com/users/nivida/repos","events_url":"https://api.github.com/users/nivida/events{/privacy}","received_events_url":"https://api.github.com/users/nivida/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-05-17T11:50:33Z","updated_at":"2018-12-16T07:52:33Z","closed_at":null,"author_association":"NONE","body":"I am trying to send the args on function from owner account but getting Returned error.\r\n\r\nI am using [web3 1.0](https://github.com/ethereum/web3.js/blob/1.0/dist/web3.min.js) .\r\n\r\n**Function in contract :**\r\n\r\n```\r\n/**\r\n* @dev Adds single address to whitelist.\r\n* @param trusted Address to be added to the whitelist\r\n*/\r\nfunction addToWhiteList(address trusted) public onlyOwner {\r\n    require(!whitelist[trusted]);\r\n    whitelist[trusted] = true;\r\n\r\n    emit UserWhitelist(true);\r\n}\r\n```\r\n**Code on index.html :**\r\n\r\n```\r\n// Add user on whitelist\r\nabc.methods.addToWhiteList(\"0x9DA80947ACf5Fc16299311EdAabc37fF7d201C95\")\r\n.send({ from: \"0x61A44075419C4402f6DE631341d875Ece6A3922e\" })\r\n.on(\"receipt\", function(receipt) {\r\n  console.log(receipt);\r\n})\r\n.on(\"error\", function(error) {\r\n  console.error(error);\r\n});\r\n```\r\n**ERROR :** `Returned error: The method eth_sendTransaction does not exist/is not available`\r\n\r\n**Note :** I add web3 in script tag :\r\n\r\n`<script language=\"javascript\" type=\"text/javascript\" src=\"web3.min.js\"></script>`\r\n\r\n**and init. like this** \r\n\r\n`web3 = new Web3(new Web3.providers.WebsocketProvider(\"wss://ropsten.infura.io/ws\"));`\r\n\r\n**Note :**  \r\n\r\n- Node : v8.10.0\r\n- NPM : 5.6.0\r\n- OS : Ubuntu \r\n- Truffle v4.1.6 (core: 4.1.6)\r\n- Solidity v0.4.21 (solc-js)\r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/web3.js/issues/comments/447624199","html_url":"https://github.com/ethereum/web3.js/issues/1637#issuecomment-447624199","issue_url":"https://api.github.com/repos/ethereum/web3.js/issues/1637","id":447624199,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzYyNDE5OQ==","user":{"login":"hadarbmdev","id":16002420,"node_id":"MDQ6VXNlcjE2MDAyNDIw","avatar_url":"https://avatars1.githubusercontent.com/u/16002420?v=4","gravatar_id":"","url":"https://api.github.com/users/hadarbmdev","html_url":"https://github.com/hadarbmdev","followers_url":"https://api.github.com/users/hadarbmdev/followers","following_url":"https://api.github.com/users/hadarbmdev/following{/other_user}","gists_url":"https://api.github.com/users/hadarbmdev/gists{/gist_id}","starred_url":"https://api.github.com/users/hadarbmdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hadarbmdev/subscriptions","organizations_url":"https://api.github.com/users/hadarbmdev/orgs","repos_url":"https://api.github.com/users/hadarbmdev/repos","events_url":"https://api.github.com/users/hadarbmdev/events{/privacy}","received_events_url":"https://api.github.com/users/hadarbmdev/received_events","type":"User","site_admin":false},"created_at":"2018-12-16T07:52:33Z","updated_at":"2018-12-16T07:52:33Z","author_association":"NONE","body":"I've reproduced the same issue,web3 version: 1.0.0-beta.34, using infura ropsten as external provider.\r\n\r\nthis is after following the PKEY tip:\r\n[ https://ethereum.stackexchange.com/questions/26999/invalid-json-rpc-response-error-for-sendtransaction-on-infura-ropsten-node-t]( https://ethereum.stackexchange.com/questions/26999/invalid-json-rpc-response-error-for-sendtransaction-on-infura-ropsten-node-t)\r\n\r\nused:\r\n`\r\nthis.web3.eth.accounts.wallet.add(this.pkey)\r\nthis.walletOwnerAddress = '0x'+ethUtils.privateToAddress(ethUtils.toBuffer('0x' + this.pkey)).toString('hex')\r\nthis.web3.eth.defaultAccount = this.walletOwnerAddress\r\nthis.web3.eth.sendTransaction({ to: toAddr, value: this.web3.utils.toWei(\"0.1\", \"ether\") })\r\n`\r\n"}}
{"actor":{"display_login":"hadarbmdev"}}