gochain/web3

fail to transfer ERC20 tokens on ropsten

Opened this issue · 3 comments

hi. i'm having difficulties transferring ERC20 tokens in ropsten, either using WEB3_NETWORK=ropsten or WEB3_RPC_URL=, both methods failed differenttly.

here's what i've got:

$ web3 env
WEB3_ADDRESS=0xB8E8f54FfD48D4B8d3521719DDc02C69D6767F00
WEB3_NETWORK=ropsten
WEB3_PRIVATE_KEY=0x........
WEB3_RPC_URL=

$ web3 contract call --abi erc20.json --function transfer 0x8a679e104d9370883E757245D34aA9514f347CD8 20000000000000000

Transaction address: 0x722e387c74e6dd8b4bd50012225487df0c9cf0f03ea9513bd3082498bed0794d

$ web3 tx 0x722e387c74e6dd8b4bd50012225487df0c9cf0f03ea9513bd3082498bed0794d
ERROR: Cannot get transaction details from the network: Bad response on request: [ TransactionIndex ]. Error cause was EmptyResponse, (majority count: 87 / total: 87)

using other RPC:
$ web3 env
WEB3_ADDRESS=0xB8E8f54FfD48D4B8d3521719DDc02C69D6767F00
WEB3_NETWORK=
WEB3_PRIVATE_KEY=0x.......
WEB3_RPC_URL=https://ropsten.infura.io/v3/......

$ web3 contract call --abi erc20.json --function transfer 0x8a679e104d9370883E757245D34aA9514f347CD8 20000000000000000
ERROR: Failed to send contract call tx: cannot send transaction: exceeds block gas limit

please help...

Following. I also want to transfer tokens.

Please let me know if you get this to work.

I think this may just be due to Ropsten, I found several similar issues:

You may want to try using GoChain for testing so you don't run into these issues, then you can deploy to Ethereum for production.