Bitcoin Forum
June 11, 2024, 02:04:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Error to send USDC web3 ERC-20  (Read 99 times)
coinsafer (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 05, 2019, 06:15:16 PM
 #1

I'm trying to send USDC as the same way that I'm doing with BNB and TUSD. But the transactions fails, anybody here can help me? I'm using the same ABI for all of them.

I have ether balance and USDC balance on sender.

https://etherscan.io/tx/0xc2cdc9d93d5ca1926f78e2d7c46d31f181b3a5bb79397bd659df247ec7776ba0

https://etherscan.io/tx/0xbe8a3cdca33370153de9bba5abbfcbb9a2ff5a9f8a18b302b79abf316457f713

https://etherscan.io/tx/0xec33f5fba3357cf90546475277fb906da0d89f032377c9f47bfefe43d90244e0

https://etherscan.io/tx/0x3706978515b0949b99594ab413caec73f07dae1d8784ad4795e8fb7ea2658d2f



async function send(recipientAddress, amount, privateKey) {
const data = contract.methods.transfer(recipientAddress, web3.utils.toWei(amount)).encodeABI();
const wallet = new ethers.Wallet(privateKey, provider);
const transaction = {
gasPrice: web3.eth.gasPrice,
gasLimit: 90000,
to: contractAddress,
data,
};

const transactionHash = await wallet.sendTransaction(transaction);
return transactionHash;

}
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!