Parameters
- params: {
args:
| readonly [`0x${string}`, `0x${string}`]
| readonly [`0x${string}`, bigint]
| readonly [`0x${string}`, `0x${string}`, bigint]
| readonly [`0x${string}`, boolean]
| readonly [`0x${string}`, `0x${string}`, `0x${string}`, bigint]
| readonly [`0x${string}`, `0x${string}`, `0x${string}`]
| readonly [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, bigint]
| readonly [`0x${string}`, `0x${string}`, number];
contractName:
| "ERC20"
| "SpecialERC20WithAddress"
| "EnsRegistry"
| "L1CrossDomainMessengerProxy";
fromChain: {} | {};
functionName:
| "approve"
| "transfer"
| "transferFrom"
| "setApprovalForAll"
| "setOwner"
| "setRecord"
| "setResolver"
| "setSubnodeOwner"
| "setSubnodeRecord"
| "setTTL"
| "sendMessage";
l2ContractAddress: `0x${string}`;
value: bigint;
}args:
| readonly [`0x${string}`, `0x${string}`]
| readonly [`0x${string}`, bigint]
| readonly [`0x${string}`, `0x${string}`, bigint]
| readonly [`0x${string}`, boolean]
| readonly [`0x${string}`, `0x${string}`, `0x${string}`, bigint]
| readonly [`0x${string}`, `0x${string}`, `0x${string}`]
| readonly [`0x${string}`, `0x${string}`, `0x${string}`, `0x${string}`, bigint]
| readonly [`0x${string}`, `0x${string}`, number]
contractName:
| "ERC20"
| "SpecialERC20WithAddress"
| "EnsRegistry"
| "L1CrossDomainMessengerProxy"
fromChain: {} | {}
functionName:
| "approve"
| "transfer"
| "transferFrom"
| "setApprovalForAll"
| "setOwner"
| "setRecord"
| "setResolver"
| "setSubnodeOwner"
| "setSubnodeRecord"
| "setTTL"
| "sendMessage"
l2ContractAddress: `0x${string}`
value: bigint
Returns (() => Promise<`0x${string}`>)
The function to send the cross-domain message.
- (): Promise<`0x${string}`>
Returns Promise<`0x${string}`>
Custom hook to send a cross-domain message from L1 (mainnet or sepolia) to Optimism.