• Type Parameters

    • TContractAddress extends string

    Parameters

    Returns UseContractResult<TContractAddress extends GeneratedContractAddress
        ? SmartContract<BaseContractForAddress<TContractAddress>>
        : SmartContract>

  • Use this resolve a contract address to a smart contract instance.

    Parameters

    • contractAddress: RequiredParam<string>

      the address of the deployed contract

    Returns UseContractResult<SmartContract>

    a response object that includes the contract once it is resolved

    Example

    const { contract, isLoading, error } = useContract("{{contract_address}}");
    

    See

    Documentation

  • Use this resolve a contract address to a smart contract instance.

    Type Parameters

    • TContractType extends "split" | "token" | "vote" | "edition-drop" | "edition" | "marketplace" | "marketplace-v3" | "multiwrap" | "nft-collection" | "nft-drop" | "pack" | "signature-drop" | "token-drop" | "custom"

    Parameters

    • contractAddress: RequiredParam<string>

      the address of the deployed contract

    • _contractType: TContractType

      the type of the contract

    Returns UseContractResult<TContractType extends PrebuiltContractType
        ? ContractForPrebuiltContractType<TContractType>
        : SmartContract>

    a response object that includes the contract once it is resolved

    Example

    const { contract, isLoading, error } = useContract("{{contract_address}}", "nft-drop");
    

    See

    Documentation

  • Use this resolve a contract address to a smart contract instance.

    Parameters

    • contractAddress: RequiredParam<string>

      the address of the deployed contract

    • _abi: ContractInterface

      the ABI of the contract to use

    Returns UseContractResult<SmartContract>

    a response object that includes the contract once it is resolved

    Example

    const { contract, isLoading, error } = useContract("{{contract_address}}", ABI);
    

    See

    Documentation

Generated using TypeDoc