Typechain * wagmi
import { abi as CommitmentAbi } from './utils/commitment';
import { useContract, useSigner } from 'wagmi';
import { Commitment } from './typechain-types';
export const commitmentContract = () => {
const { data: signer, isError, isLoading } = useSigner();
const commitmentContract: Commitment = useContract({
addressOrName: '0x9bB958093B0cc151977aD85F7d085654f3838BC5',
contractInterface: CommitmentAbi,
signerOrProvider: signer,
});
return commitmentContract;
};