MCP Instructions & Processes
The realization process of MCP cross-chain payment
The main function of MCP (Multi-Chain Payment Gateway) is to support users who are active on other public chains to use a variety of tokens to pay for Filecoin storage fees. DApp developers with data storage needs can choose USDC, ETH, Matic, and other mainstream tokens when using the MCP gateway so that they can more quickly and efficiently place orders for storage space.
The main processes of MCP are to lock in fees through smart contracts, monitor the completion of data storage in the network, use Chainlink DAO to complete the transmission of cross-chain signatures, and then pay the storage provider from the smart contract, completing the payment of storage fees. The entire transaction is divided into 6 main steps, which are as follows:
- The user uploads the files that need to be stored to the IPFS server to obtain CID data.
- The user recharges fees and deposits through the MetaMask wallet.
- The backend selects the corresponding storage service provider through FilSwan’s public trading market.
- The application background will automatically scan the execution of the smart contract and CID data, and the file will be backed up to the FIL network after the transfer is confirmed by the block.
- The smart contract uses ChainLink DAO to send a data signature to Polygon to confirm the file backup.
- After the file storage is completed the deposit in the smart contract is unlocked and the storage fee is automatically paid. The remaining deposit is returned to the DApp developer.
Currently, MCP has entered the testing phase and is integrated with Polygon’s Mumbai test network. Once the test is completed, the Polygon mainnet is officially launched to implement the application of this function.
MCP Instructions
For data storage users the process of using MCP is very simple. Most of the processes are automatically completed by smart contracts. Users only need to follow simple operations to complete transactions, which are split into the following steps:
Before obtaining test coins, users are advised to perform a test through the testnet to gain familiarity with the MCP function. The current testnet is the Polygon Mumbai testnet, which will later transition to the Polygon mainnet. In addition, Ethereum, BSC, Fantom, etc. will be added as usable tokens.
1. Add testnet to MetaMask wallet, testnet parameters:
- Network name: Polygon Testnet Mumbai
RPC address: https://matic-mumbai.chainstacklabs.com
ChainID: 80001
Symbol: MATIC
- Test USDC
faucet:https://calibration-faucet.filswan.com/#/dashboard
USDC testnet contract:0xe11a86849d99f524cac3e7a0ec1241828e332c62
- Test MATIC
2. The user uses their MetaMask wallet to switch the network to the Polygon Mumbai testnet.
3. On the Upload File page, the user can upload their desired file to IPFS.
Select the file and set the duration. The system will calculate the estimated storage cost based on the average price of storage service providers across the network and provide three choices of lock plans (users can choose between low and high plans, with higher locked amounts having a higher probability of getting assigned storage service providers). After selecting, click Submit to submit.
4. The file then begins uploading to the IPFS server.
The user will need to wait for a short time before leaving the page. After the file is uploaded, the CID data will be obtained internally. After that, MetaMask will display a payment pop-up window. The user will confirm the transaction through the wallet plug-in.
5. While waiting for the transaction to be confirmed on the chain, the background will scan the transaction process.
After the transaction is confirmed, the completion prompt will pop up. At this time the user can see the stored files from the file list on the page. This process is automatic and does not require user intervention.
6. The system will automatically issue file storage orders and match the user with storage service providers.
Users can check the progress of their order at any time. At the same time, the background will perform a series of operations such as verification, DAO signature submission, and storage service provider assignment. After the operation is completed, the background will automatically send a request to unlock the deposit from the smart contract. The locked amount will be used to pay the storage fee of the storage service provider, and the remaining amount will be automatically refunded to the user. In the event that the task fails, the funds will be automatically returned to the user after 6 days.
For more information about MCP, please refer to:
Testnet USDC faucet :
https://calibration-faucet.filswan.com/#/dashboard
USDC contract:
0xe11a86849d99f524cac3e7a0ec1241828e332c62
Official MATIC faucet:
https://faucet.polygon.technology/
The English User Guide:
Contact Us
- Email: team@filswan.com
- Website: https://filswan.com
Follow Us On
- Discord: https://discord.com/invite/KKGhy8ZqzK
- Telegram: https://t.me/filswan
- Twitter: https://twitter.com/0xfilswan