useSimulateDepositETH
Simulates a deposit of ETH to L2.
tsx
import { useSimulateDepositETH } from 'opstack-kit'
function App() {
const result = useSimulateDepositETH({
args: {
to: '0x215db47f1B2ae03ec45024Cf62ce82879b137469',
amount: 1n,
},
l2ChainId: 11155420,
})
}Parameters
args
to
AddressThe address to deposit the ETH to.
amount
bigintThe amount of ETH to deposit.
gasLimit (optional)
numberThe minimum gas limit to use for the deposit transaction.
data (optional)
HexData to include in the transaction.
l2ChainId
number
The chain ID of the chain you want to deposit to.
