How can we do MATIC (Ethereum ⇋ Polygon) cross-chain transfer? Is there any sample script to transfer funds?

Created by Sourajyoti Gupta, Modified on Fri, 28 Jul 2023 at 07:34 PM by Sourajyoti Gupta

You can use polygon bridge to transfer funds.


Here is the script: https://gist.github.com/hukamnonceblox/67566e9c0da8a12d9cef8911e1cc5024.

This script includes deposit and withdrawal functionality. You will need to manually customize the scripts according to your requirements. For example, if you are performing a deposit, you will need to comment out the withdrawal methods, and vice versa for performing a withdrawal. 

Additionally, you can visit the maticjs-fxportal library for more ideas: https://github.com/fx-portal/maticjs-fxportal

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article