You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* @dev Adds single address to whitelist.
* @param trusted Address to be added to the whitelist
*/
function addToWhiteList(address trusted) public onlyOwner {
require(!whitelist[trusted]);
whitelist[trusted] = true;
emit UserWhitelist(true);
}
Code on index.html :
// Add user on whitelist
abc.methods.addToWhiteList("0x9DA80947ACf5Fc16299311EdAabc37fF7d201C95")
.send({ from: "0x61A44075419C4402f6DE631341d875Ece6A3922e" })
.on("receipt", function(receipt) {
console.log(receipt);
})
.on("error", function(error) {
console.error(error);
});
ERROR :Returned error: The method eth_sendTransaction does not exist/is not available
Same thing happen with me on version ^1.0.0-beta.34.
Try to call .send method, this is the log : { jsonrpc: '2.0', id: 0, error: { code: -32601, message: 'The method eth_sendTransaction does not exist/is not available' } }
I am trying to send the args on function from owner account but getting Returned error.
I am using web3 1.0 .
Function in contract :
Code on index.html :
ERROR :
Returned error: The method eth_sendTransaction does not exist/is not available
Note : I add web3 in script tag :
<script language="javascript" type="text/javascript" src="web3.min.js"></script>
and init. like this
web3 = new Web3(new Web3.providers.WebsocketProvider("wss://ropsten.infura.io/ws"));
Note :
The text was updated successfully, but these errors were encountered: