I have deployed a successful smart contract based on openzeppelin. I have tried to get ticker name and total supply of contract, It seems working well. When I am transferring tokens to another address, I am getting following issue
RETURNED ERROR :- GAS REQUIRED. EXCEED ALLOWANCE 9947373 or always failing transaction
Environment
Solidity:- v0.5.0
Token is on mainnet and I am usign mainnet infura.
Details
I have tried various ways to transfer token from contract to other eth address. But I am getting an issue that “Gas Required”.
I have deployed this contract using metamask. Though when I tried to add token using custom search and put contract address, Balance of token is showing 0.
I have tried with myetherwallet and a custom php code as well, I am getting supply and ticker successfully but not able to transfer tokens.
Here is my contract :-
Please see contract code here
I can share private key as well to test transaction.
Code to reproduce
Private key: - DB943CF265CD54E8094D91A2011918BE3BB2D25834A47923BCF7813A735B8A69
Creator Address:-
0x9B261C4E25fF80Ce50cabf8B75a680a5c42aAc62
Contract Address :-
0x3cefda19201598e51c19ea21cb339b2cdc015c34
Contract ABI :-
[{“constant”:true,“inputs”:,“name”:“name”,“outputs”:[{“name”:"",“type”:“string”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“spender”,“type”:“address”},{“name”:“amount”,“type”:“uint256”}],“name”:“approve”,“outputs”:[{“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:,“name”:“totalSupply”,“outputs”:[{“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“sender”,“type”:“address”},{“name”:“recipient”,“type”:“address”},{“name”:“amount”,“type”:“uint256”}],“name”:“transferFrom”,“outputs”:[{“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:,“name”:“decimals”,“outputs”:[{“name”:"",“type”:“uint8”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“spender”,“type”:“address”},{“name”:“addedValue”,“type”:“uint256”}],“name”:“increaseAllowance”,“outputs”:[{“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[{“name”:“account”,“type”:“address”}],“name”:“balanceOf”,“outputs”:[{“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:true,“inputs”:,“name”:“ticker”,“outputs”:[{“name”:"",“type”:“string”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“spender”,“type”:“address”},{“name”:“subtractedValue”,“type”:“uint256”}],“name”:“decreaseAllowance”,“outputs”:[{“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:false,“inputs”:[{“name”:“recipient”,“type”:“address”},{“name”:“amount”,“type”:“uint256”}],“name”:“transfer”,“outputs”:[{“name”:"",“type”:“bool”}],“payable”:false,“stateMutability”:“nonpayable”,“type”:“function”},{“constant”:true,“inputs”:[{“name”:“owner”,“type”:“address”},{“name”:“spender”,“type”:“address”}],“name”:“allowance”,“outputs”:[{“name”:"",“type”:“uint256”}],“payable”:false,“stateMutability”:“view”,“type”:“function”},{“anonymous”:false,“inputs”:[{“indexed”:true,“name”:“from”,“type”:“address”},{“indexed”:true,“name”:“to”,“type”:“address”},{“indexed”:false,“name”:“value”,“type”:“uint256”}],“name”:“Transfer”,“type”:“event”},{“anonymous”:false,“inputs”:[{“indexed”:true,“name”:“owner”,“type”:“address”},{“indexed”:true,“name”:“spender”,“type”:“address”},{“indexed”:false,“name”:“value”,“type”:“uint256”}],“name”:“Approval”,“type”:“event”}]
I am using above details to transfer tokens, But always getting an error. Later on I want to interact this token with website and transfer tokens dynamically.
Kindly help !!