This library helps you in easy way for transfering ethereum, ERC20, ERC721 and ERC1155 tokens from matic chain to ethereum chain and from matic chain to ethereum chain.
It uses the Matic SDK under the hood.
Note: it can take up to 10 minutes on the testnet and up to 30 minutes on the mainnet. Please don't shut the program during this time as it waits and listens for the proof of burn to occur on the ethereum.
Property
Required
Default value
Description
maticApiUrl
✅
-
Matic url to the node api
accountPrivateKey
✅
-
Account private key to the account from where you send ERC20
ethereumHttpsApiUrl
✅
-
Ethereum https url to the node api
ethereumWebsocktesApiUrl
✅
-
Ethereum websockets url to the node api
recipientAddress
✅
-
Address of the recipient
amountWei
✅
-
Amount to send in wei
childTokenAddress
✅
-
Token address on the matic chain
rootChainProxyAddress
❌
0x2890ba17efe978480615e330ecb65333b880928e
Address of the chain proxy on the ethereum. Set to 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287 for mainnet transfer
maticNetwork
❌
testnet
Network of matic. Set to mainnet for mainnet transfer
Note: it can take up to 10 minutes on the testnet and up to 30 minutes on the mainnet. Please don't shut the program during this time as it waits and listens for the proof of burn to occur on the ethereum.
Property
Required
Default value
Description
maticApiUrl
✅
-
Matic url to the node api
accountPrivateKey
✅
-
Account private key to the account from where you send ERC20
ethereumHttpsApiUrl
✅
-
Ethereum https url to the node api
ethereumWebsocktesApiUrl
✅
-
Ethereum websockets url to the node api
recipientAddress
✅
-
Address of the recipient
tokenId
✅
-
Token id
childTokenAddress
✅
-
Token address on the matic chain
rootChainProxyAddress
❌
0x2890ba17efe978480615e330ecb65333b880928e
Address of the chain proxy on the ethereum. Set to 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287 for mainnet transfer
maticNetwork
❌
testnet
Network of matic. Set to mainnet for mainnet transfer
Note: it can take up to 10 minutes on the testnet and up to 30 minutes on the mainnet. Please don't shut the program during this time as it waits and listens for the proof of burn to occur on the ethereum.
Property
Required
Default value
Description
maticApiUrl
✅
-
Matic url to the node api
accountPrivateKey
✅
-
Account private key to the account from where you send ERC20
ethereumHttpsApiUrl
✅
-
Ethereum https url to the node api
ethereumWebsocktesApiUrl
✅
-
Ethereum websockets url to the node api
recipientAddress
✅
-
Address of the recipient
tokenIds
✅
-
Token ids
amounts
✅
-
Amounts in wei
childTokenAddress
✅
-
Token address on the matic chain
rootChainProxyAddress
❌
0x2890ba17efe978480615e330ecb65333b880928e
Address of the chain proxy on the ethereum. Set to 0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287 for mainnet transfer
maticNetwork
❌
testnet
Network of matic. Set to mainnet for mainnet transfer