Help with contract.wallet.addByPrivateKey
billtlee opened this issue · 4 comments
billtlee commented
so, i deployed an Ownable contract using my ONE wallet account, I then tried to call an onlyOwner function in the contract by using the send api, did contract.wallet.addByPrivateKey('private key of my ONE wallet account') to add the signing account to the wallet. But I am getting the "Ownable: caller is not the owner was thrown". Does anyone know why this might be happening? When I call the owner function from the contract, I am getting the correct wallet address...
nipund commented
Did you manage to figure it out?
billtlee commented
no, are you running into the same problem?
nipund commented
Yeah. It works if you don't call estimateGas() and just use a predefined gas limit, as long as it's high enough.
billtlee commented
okok, thx!