import { Abi, AccountInterface, CompiledContract, Contract, ContractFactory } from 'starknet'; /** Arguments for `useContract`. */ export interface UseContractProps { /** The contract abi. */ abi?: Abi; /** The contract address. */ address?: string; } /** Value returned from `useContract`. */ export interface UseContractResult { /** The contract. */ contract?: Contract; } /** * Hook to bind a `Contract` instance. * * @remarks * * The returned contract is a starknet.js `Contract` object. * * @example * This example creates a new contract from its address and abi. * ```tsx * function Component() { * const { contract } = useContract({ * address: ethAddress, * abi: compiledErc20.abi * }) * * return {contract.address} * } * ``` */ export declare function useContract({ abi, address }: UseContractProps): UseContractResult; /** Arguments for `useContractFactory`. */ export interface UseContractFactoryProps { /** The compiled contract. */ compiledContract?: CompiledContract; /** The class hash */ classHash: string; /** The contract abi. */ abi?: Abi; /** The account or provider used for deploying. */ account?: AccountInterface; } /** Value returned from `useContractFactory`. */ export interface UseContractFactoryResult { /** The contract factory. */ contractFactory?: ContractFactory; } /** * Hook to create a `ContractFactory`. * * @remarks * * The returned contract factory is a starknet.js `ContractFactory` object. * * This hook works well with `useDeploy`. * * @example * This example shows how to create a contract factory. * ```tsx * function Component() { * const { account } = useAccount() * const { contractFactory } = useContractFactory({ * compiledContract: compiledErc20, * classHash: * abi: compiledErc20.abi, * account: account * }) * * return
Nothing to see here...
* } * ``` */ export declare function useContractFactory({ compiledContract, classHash, abi, account, }: UseContractFactoryProps): UseContractFactoryResult;