the address of the Split contract, found in your thirdweb dashboard
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
}
...
}
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
Hook for getting an instance of a
Split
contract. This contract supports fund distribution to multiple parties.