use typechained contracts
import Web3 from 'web3'
import { useTypechain } from 'use-typechain'
import { abi } from '../my/typechained/abi'
import type { MyContract } from '../my/typechained/contract'
const web3 = new Web3(new Web3.providers.HttpProvider(
'http://localhost:8545'
))
const contractAddress = '0x0..'
const exchange = useTypechain<Exchange>(web3, abi, contractAddress)