[SOLVED] Trouble with USDC transfers using proxy contract

I’m building an NFT marketplace on Polygon that will use USDC transfers to pay for NFTs and batches of NFTs. So far the USDC transfers are working smoothly, but only until I test it out with a proxy contract. I know that making a USDC transfer requires approving my smart contract to spend the USDC from the user’s address, which is handled through the ‘approve’ function in the USDC smart contract. The parameters for the ‘approve’ function in the USDC contract are the address of the spender (which would be my contract’s address) and the amount to spend (which would be the price of the NFT or batch). However, even when I do that for the Proxy’s address and the implementation contract’s address the USDC transfer does not work. The error I get is non descriptive, it just says ‘transaction reverted’.

Any ideas on why this is happening and how to fix it would be greatly appreciated!
Thanks in advance.

Adrian

do you have an example of a such transaction that was reverted on polygonscan?

Here is a link to one.
Also when trying to make the call through Remix, it says the transaction is likely to revert but just shows the error message ‘transaction reverted’.
Polygon Transaction Hash (Txhash) Details | PolygonScan

does anything else work fine with that proxy?

Yes I was able to mint NFTs and put them up for sale with the functions in my smart contract.

figured it out thank you for your time!

how did you solve it? what was the problem?

I wasn’t setting the USDC address properly so it just read it as the 0x0000… address.