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

    Parameters

    • contractAddress: RequiredParam<string>

      the address of the Split contract, found in your thirdweb dashboard

    Returns Split | undefined

    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
    }

    ...
    }

    Deprecated

    This hook is deprecated and will be removed in a future major version. You should use useContract instead.

    - const split = useSplit("0x1234...");
    + const split = useContract("0x1234...", "split").contract;

Generated using TypeDoc