Skip to main content

Getting a Contract

The SDK is capable of getting any smart contract deployed to one of our supported blockchains.

When you deploy one of our pre-built contracts, or your contract implements a contract extension, you unlock specific features of the SDK that help you interact with your contract and it's functions more easily.

Get Any Contract Instance

Using the React SDK's useContract hook or the TypeScript SDK's getContract method, you can get an instance of any custom contract using it's contract address.

React:

const { contract } = useContract("{{contract_address}}");

TypeScript:

const contract = sdk.getContract("{{contract_address}}");

Getting Specific Contracts

If your contract is a pre-built contract, or implements contract extensions, you can get a typed instance of the contract with specialized functions.

Use the resources below to learn more about the specific contracts you can get.

Contract Documentation in SDKs

Learn how to use specific contracts from the SDK documentation: