use-typechain
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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)

/use-typechain/

    Package Sidebar

    Install

    npm i use-typechain

    Weekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    1.57 kB

    Total Files

    4

    Last publish

    Collaborators

    • wizardsorb