-
Notifications
You must be signed in to change notification settings - Fork 126
Loopring Transfers
Depositing/Withdrawing can be done with a UI using our Smart Wallet app or https://exchange.loopring.io, where you can connect your Ethereum Wallet, create an account and manage the funds. You will definitely want to automate the L2 transfers and you can our API for that. To sign L2 transactions you'll have to use the EdDSA keypair and API keys which can be exported from our apps and the website:
- L2 -> L2 (L2 transfer, cost: ~1k gas): https://docs.loopring.io/en/dex_apis/submitTransfer.html
Of course you can also manually/automatically do the deposit/withdrawal transactions:
- L1 -> L2 (deposit, cost: ~60k gas): Call a dedicated smart function contract on our rollup contract from the Ethereum address that provides the funds (L1 transaction): https://github.com/Loopring/protocols/blob/d496dee74c74bf60eb5e57cad25b04a6152ee19e/packages/loopring_v3/contracts/core/iface/IExchangeV3.sol#L312. For ETH the ETH is transferred directly with the smart contract function call, for ERC20 tokens our deposit contract (0x674bdf20A0F284D710BC40872100128e2d66Bd3f) needs to be approved first.
- L2 -> L1 (withdrawal, cost: ~40k gas): https://docs.loopring.io/en/dex_apis/submitOffChainWithdrawal.html
We have Python and TypeScript sample code to use the API and if you need extra help just let us know.
Standard transfer to the Ethereum address of the Smart Wallet. Nothing special, a standard ETH transfer/ERC20 transfer/... Any Ethereum wallet can do this.
Loopring Foundation
nothing here