hi, please tell me.
I took the abi proxi contract usdc and added the usdc address, but when I try to use the methods of this contract I get the error "Error: Returned error: VM Exception while processing transaction: revert"
const UsdcAddress = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48';
const Fiatabi = require ('./ abi / Fiatabi.json');
const usdc = new Web3.eth.Contract (Fiatabi, UsdcAddress);
await usdc.methods.name (). call ()
Apr 28, 2021, 12:40 PM
is that address from mainnet or from testnet?
Apr 28, 2021, 1:23 PM
mainnet
i use ganache-cli and infura
Apr 28, 2021, 1:24 PM
Try use encodeABI() instead of call();
And what kind of transaction you’re doing?
Apr 28, 2021, 1:37 PM
I want to send USDC to my contract to use cerve add_liquidity.
if i use encodeABI () i get "0x06fdde03"
if i use encodeABI () i get "0x06fdde03"
Apr 28, 2021, 1:42 PM
is the usdc address you're using in Ganache?
Apr 28, 2021, 1:58 PM
Ah, okay. Then you need to sign a transaction.
Something like this.
Apr 28, 2021, 2:02 PM
Thank you)
Apr 28, 2021, 2:04 PM