0.0.2 • Published 2 years ago

use-typechain v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

use-typechain

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)