DOCS

useSplit

Hook for getting an instance of a Split contract. This contract supports fund distribution to multiple parties.

Example

import { useContract } from '@thirdweb-dev/react'

export default function Component() {
  const { contract } = useContract("<YOUR-CONTRACT-ADDRESS>", "split")

  // Now you can use the split contract in the rest of the component

  // For example, this function will return all the recipients of the split
  async function getRecipients() {
    const recipients = await contract.getAllRecipients()
    return recipients
  }

  ...
}

Parameters

Returns