MultiversX Tracker is Live!

How can I send USDC through geth CLI?

Etherum Reddit

More / Etherum Reddit 273 Views

How can I send USDC through geth CLI?

I had 100 USDC transferred to a local Ethereum wallet I control (from Binance). It shows up as a valid token when I view it in Etherscan. I normally use geth CLI for all Ethereum transactions, but I'm not sure how to go about sending tokens to a different Ethereum address in this case.

The only suggestion I've found so far suggests the below as the method for sending USDC:

geth console

Then create contract wrapper class like this:

var erc20 = web3.eth.contract ([{"constant": false, "inputs": [{"name": "_to", "type": "address"}, {"name": "_value", "type": "uint256"}], "name": "transfer", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "nonpayable", "type": "function"}]);

And instantiate it at token smart contract address (The contract address for the received USDC as shown in etherscan.io)

var myToken = erc20.at ("0x<token smart contract address here>");

now unlock your "from" account (the Ethereum wallet that holds the USDC/tokens):

personal.unlockAccount ("0x<from address>");

and finally send your tokens:

myToken.transfer ("0x<to address>", "<amount in basic units>", {from: "0x<from address>"});

The to address is the Ethereum wallet that will be receiving the tokens, the amount in basic units would be 100 (to send all USDC) and the from address would be the same as the unlocked account.

Is the above correct and do I need to have an Eth balance to pay for gas for the contract etc?

Edit: /u/sailing280 trying to scam people here.

https://preview.redd.it/ezzjkfuq7ss71.png?379&format=png&auto=webp&s=10cc51044b2257eaa052da9e2ba179dfab7a6910

submitted by /u/buildingapcin2015
[link] [comments]

Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments