Form component for supplying assets to the Compound III protocol
SupplyForm
component provides a user-friendly interface for supplying assets to the Compound III protocol. It handles input validation, balance checking, and transaction submission.
Prop | Type | Description |
---|---|---|
provider | Provider | The Ethereum provider to use for transactions |
chainId | number | The chain ID of the network to connect to |
defaultAsset | string | Optional default asset to select in the form |
defaultAmount | string | Optional default amount to pre-fill in the form |
className | string | Optional CSS class name to apply to the component |
onSuccess | (txHash: string) => void | Optional callback function called when a transaction is successful |
onError | (error: Error) => void | Optional callback function called when an error occurs |
SupplyForm
component includes the following features:
className
prop: