@eth-optimism/viem • Docs
@eth-optimism/viem / actions / DepositERC20Parameters
DepositERC20Parameters<
TChain,TAccount,TChainOverride,TDerivedChain>:GetChainParameter<TChain,TChainOverride> &GetContractAddressParameter<TDerivedChain,"l1StandardBridge"> &BaseWriteContractActionParameters<TChain,TAccount,TChainOverride,TDerivedChain> &object
Action to deposit an ERC20 into an OptimismMintableERC20 | OptimismSuperchainERC20 counterpart.
Unless unsafe is set or the targetChain hasn’t been specified, the remote token address will
be checked to ensure a pair-wise relationship between the tokens. Specify remoteClient to use an
already constructed client for the destination chain.
amount:
bigint
The amount of tokens to bridge
optionalextraData:Hex
Metadata to attach to the bridged message
optionalminGasLimit:number
The minimums gas the relaying message will be executed with
optionalremoteClient:Client
Client to use for the destination chain safety check
remoteTokenAddress:
Address
| The address of the OptimismMintableERC20 | OptimismSuperchainERC20 to bridge into |
optionalto:Address
The recipient address to bridge to. Defaults to the calling account
tokenAddress:
Address
The address of the ERC20 to bridge
optionalunsafe:boolean
Whether to skip the remote token check on the destination chain
• TChain extends Chain | undefined = Chain | undefined
• TAccount extends Account | undefined = Account | undefined
• TChainOverride extends Chain | undefined = Chain | undefined
• TDerivedChain extends Chain | undefined = DeriveChain<TChain, TChainOverride>