Skip to main content

How to Withdraw From a Chain

The withdraw endpoint sends L2 funds owned by the caller to their L1 address.

// withdraw from chain to wallet
req := solo.NewCallParams(accounts.Contract.Name, accounts.FuncWithdraw.Name)
_, err := chain.PostRequestSync(req.WithMaxAffordableGasBudget(), wallet)
require.NoError(t, err)