In the process of transferring USDC from Ethereum to Polygon, you'll need to give the TokenMessenger contract the necessary permissions to execute the USDC transfer on your behalf. In essence, you're empowering the TokenMessenger contract to access and transfer the specified amount of USDC from your source wallet.
For this, the Programmable Wallets' contract execution API will be put into play:
You will be interacting with the USDC contract on the source chain, so the contractAddress parameter of the request is 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238.
The function being called on the USDC contract is approve(address spender, uint256 value). Calling approve allows spender to spend value USDC on your behalf. This will be necessary in the depositForBurn step later on.
value is denominated in the smallest unit of USDC, which is a millionth of a dollar.
In this case it's approve(address,uint256)
In this case, address is the TokenMessenger contract's address and value is 100000000 (100 USDC).
In this case it's ["0x9f3B8679c73C2Fef8b59B4f3444d4e156fb70AA5", 100000000]
The wallet that is performing the contract execution. This will be the ID of the developer-controlled wallet you created earlier.
A dynamic blockchain fee level setting (LOW, MEDIUM, or HIGH) that will be used to pay gas for the transaction. HIGH is used for this transaction.
Universally unique identifier (UUID v4) idempotency key. This is automatically generated for you.
A base64 string expression of the entity secret ciphertext. Refer to this helpful tool.
Note: The input parameters of this component differ from those of the actual endpoint. For instance, we automatically generate the Entity Secret Ciphertext to simplify the process and ensure a better experience for you.