gochain / web3

A CLI tool to interact with web3 blockchains - Ethereum, GoChain, etc
https://gochain.io
Apache License 2.0
400 stars 88 forks source link

fail to transfer ERC20 tokens on ropsten #142

Open Edwin-L opened 4 years ago

Edwin-L commented 4 years ago

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...

bitcoinmeetups commented 3 years ago

Following. I also want to transfer tokens.

bitcoinmeetups commented 3 years ago

Please let me know if you get this to work.

treeder commented 3 years ago

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.