I'm trying to execute the function transferOwnership(address newOwner), to change the owner of an ERC-20 token contract to a new owner address (I have access to the current owner address & the function is implemented in the contract code). To execute this function, I connected with the current owner's address to myetherwallet, went to "interact with contract" and filled in the contract address + ABI/JSON (found on the token contract page). I filled in the NewOwner(address) and clicked "Write" but it's stuck right there. The write button keeps showing that it's loading, but nothing happens or pops up.
I tried this multiple times, but get stuck at the same point every time.
I also tried to execute this function on the etherscan contract page, by connecting thru web3 with the current owner's address and going to "write contract", but when executing the function it also keeps loading for a long time without anything happening. Sometimes, after a long time, it throws an error: "TypeError: Cannot read property 'methods' of undefined"
Is there any other way I can execute this function? Could there be something wrong with the ABI/JSON ? Or what could be the causing the problem?
Thank you for taking the time to read through and maybe help, I truly appreciate!!