Approve USDC

Approve our smart contract to use USDC

You need to now approve the smart contract you just deployed to spend the USDC that belongs to you! This is how you authorize your smart contract to transfer your USDC to another chain. Go to the USDC contract on Avalanche Fuji (USD//C | Token Tracker - Snowtrace Testnet) and first click the “Sign In” button at the top right to connect your MetaMask wallet.

Login to Snowtrace

Click “Metamask” on the far left and then it will ask you to sign a message to verify your account. Click the “Sign message” button and MetaMask will pop-up asking you a “Sign-in request” for Snowtrace Explorer. Click the “Sign-in” button on the bottom right.

Connect MetaMask
Sign the message
Sign-In to Snowtrace

Once signed in, click the “Contract” tab of the USDC contract:

Click the Contract tab

In order to approve USDC for our TransferUSDCBasic.sol contract, you need to do the following steps:

  1. Click on “Write as Proxy” button

  2. Click on the approve function and it will expand to the inputs

  3. Copy your TransferUSDCBasic.sol contract address from Remix and paste into spender (address)

  4. Enter 100000 for the value (uint256), which is 0.1 USDC

  5. Click on the “Write” button

In Remix: Your deployed contract address
In the block explorer: Write as Proxy tab and the inputs for the approve function

MetaMask will pop-up with a “Spending cap request for your USDC”, and since you entered in 100000 on the previous step, it will fill in 0.1 (because USDC token has only 6 decimal places) so all you need to do is click the “Next” button at the bottom right:

Click "Next"

After that, click the “Approve” button to finalize this step:

Approve the request

That's it for this step! Next you will fund your newly deployed contract with LINK tokens.

Last updated