Depositing funds with StarkGate
Using StarkGate to deposit L1 funds into the L2 Starknet requires StarkGate’s deposit
function. The deposit
function does the following:
-
Transfers the funds from the user’s Ethereum account to the StarkGate L1 contract.
-
Emits a
Deposit
event that includes the L1 and L2 addresses of the user, and the amount deposited. -
Sends a message to the corresponding L2 bridge with the amount deposited, and the recipient’s address.
Subsequently, the funds should be transferred to Starknet so that you can begin using them.
For more information on what happens during the transfer process, see L1→L2 transfer (deposit).
-
An Ethereum block explorer, such as Etherscan.
-
Funds to transfer from L1 to L2, including enough to pay the fees required for the transfer.
-
The L1 address of the StarkGate bridge for the token you want to deposit. To view the token addresses for tokens on Mainnet or Sepolia testnet, see Bridged tokens and addresses.
-
Using an Ethereum block explorer, go to the StarkGate contract and click Write as Proxy. For example, using Etherscan, go to 0xae0ee0a63a2ce6baeeffe56e7714fb4efe48d419
-
Click the StarkGate 2.0
deposit
function (0x0efe6a8b). -
Enter the following:
-
In
payableAmount
, enter the maximum amount of ETH that you’re willing to pay for thedeposit
transaction fee. -
In
token (address)
, enter the address of the L1 contract for the token that you want to deposit to L2. -
In
amount (uint256)
, enter an integer for the amount of the token that you want to deposit to L2. -
In
l2Recipient (uint256)
, enter the address of the recipient on L2.
-
-
Click Write. The
deposit
function initiates a deposit.