{"_id":"@cpuchain/typechain-ethers-v6","name":"@cpuchain/typechain-ethers-v6","dist-tags":{"latest":"0.5.1"},"versions":{"0.5.1":{"name":"@cpuchain/typechain-ethers-v6","description":"🔌 TypeChain target for ethers-v6","keywords":["ethers","ethersjs","ethereum","TypeChain","TypeScript"],"version":"0.5.1","license":"MIT","repository":{"type":"git","url":"git+https://github.com/ethereum-ts/Typechain.git"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"start":"ts-node -T ./src/index.ts","build":"tsc --build ./tsconfig.build.json --verbose","format":"prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check \"./**/*.ts\" README.md","format:fix":"prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"./**/*.ts\" README.md","lint":"eslint --ext .ts src test","lint:fix":"pnpm lint --fix","typecheck":"tsc --noEmit --incremental false --composite false","clean":"rm -rf dist && rm -f tsconfig.build.tsbuildinfo","test":"mocha --config ../../.mocharc.js","test:fix":"pnpm lint:fix && pnpm format:fix && pnpm test && pnpm typecheck"},"peerDependencies":{"ethers":"6.x","typechain":"workspace:@cpuchain/typechain@^8.3.2","typescript":">=5.8.3"},"devDependencies":{"@types/lodash":"^4.14.139","@types/proxyquire":"^1.3.28","ethers":"^6.15.0","proxyquire":"^2.1.3","test-utils":"workspace:*","typechain":"workspace:@cpuchain/typechain@^8.3.2","typescript":">=5.8.3"},"dependencies":{"lodash":"^4.17.15","ts-essentials":"^10.1.1"},"_id":"@cpuchain/typechain-ethers-v6@0.5.1","gitHead":"532768b402a6d4d0fbc37cd31a298ae6463766d1","bugs":{"url":"https://github.com/ethereum-ts/Typechain/issues"},"homepage":"https://github.com/ethereum-ts/Typechain#readme","_nodeVersion":"22.13.1","_npmVersion":"11.1.0","dist":{"integrity":"sha512-rG92rHF6Z79O104Cf7UAiUd6XuY1hx1+HAe6wSV4x85K/nQxkBZ3IkREk3Nha9hWbc4RvgLrA70hlMYTKw5sMQ==","shasum":"631b8c8b53633ea5450446114a0e4ffeab9a4648","tarball":"https://registry.npmjs.org/@cpuchain/typechain-ethers-v6/-/typechain-ethers-v6-0.5.1.tgz","fileCount":31,"unpackedSize":88777,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDeuRQK50sUn9MuTAl44dY+7tvqa+E1eEgjBTipxyK/IAIhANg0s8EjNxFXsNUj0yYQ8VsN3/0NJGIsdaXzuwtnSDbT"}]},"_npmUser":{"name":"cpuchainorg","email":"dev@cpuchain.org"},"directories":{},"maintainers":[{"name":"cpuchainorg","email":"dev@cpuchain.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typechain-ethers-v6_0.5.1_1753339652200_0.01051324445271229"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-24T06:47:32.086Z","0.5.1":"2025-07-24T06:47:32.364Z","modified":"2025-07-24T06:47:32.710Z"},"maintainers":[{"name":"cpuchainorg","email":"dev@cpuchain.org"}],"description":"🔌 TypeChain target for ethers-v6","homepage":"https://github.com/ethereum-ts/Typechain#readme","keywords":["ethers","ethersjs","ethereum","TypeChain","TypeScript"],"repository":{"type":"git","url":"git+https://github.com/ethereum-ts/Typechain.git"},"bugs":{"url":"https://github.com/ethereum-ts/Typechain/issues"},"license":"MIT","readme":"# Typechain target Ethers-v6\n\n<p align=\"center\">\n  <img src=\"https://github.com/Neufund/TypeChain/blob/d82f3cc644a11e22ca8e42505c16f035e2f2555d/docs/images/typechain-logo.png?raw=true\" width=\"300\" alt=\"TypeChain\">\n  <h3 align=\"center\">TypeChain target Ethers-v6</h3>\n  <p align=\"center\">🔌 TypeScript bindings for Ethers 6.x.x smartcontracts</p>\n\n  <p align=\"center\">\n    <a href=\"https://github.com/ethereum-ts/TypeChain/actions\"><img alt=\"Build Status\" src=\"https://github.com/ethereum-ts/TypeChain/workflows/CI/badge.svg\"></a>\n    <img alt=\"Downloads\" src=\"https://img.shields.io/npm/dm/typechain.svg\">\n    <a href=\"https://github.com/prettier/prettier\"><img alt=\"Prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg\"></a>\n    <a href=\"/package.json\"><img alt=\"Software License\" src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\"></a>\n  </p>\n\n  <p align=\"center\">\n    <a href=\"https://blog.neufund.org/introducing-typechain-typescript-bindings-for-ethereum-smart-contracts-839fc2becf22\">Medium post</a> | <a href=\"https://www.youtube.com/watch?v=9x6AkShGkwU\">DappCon Video</a>\n  </p>\n</p>\n\nThis package requires TypeScript >= 4.7 and `moduleResolution` to be set as `node16` or `nodenext`.\n\n## [TypeChain readme](https://github.com/ethereum-ts/TypeChain)\n\n## Contract typings\n\nThe main files generated by this target are `<contract-name>.ts`. They declare typesafe interfaces for your contracts on\ntop of ethers `Contract` instances:\n\n- typed contract's methods, available both at `contract.someMethod(...)`, `contract.someMethod.call(...)`,\n  `contract.someMethod.staticcall(...)` and `contract.someMethod.send(...)`\n- typed events in `contract.interface.events.AnEvent` and filters in `contract.filters.AnEvent`\n- typed method gas estimates in `contract.someMethod.estimateGas(...)`\n- overrides for the event listener methods (`on`, `once`, etc) that return the same contract type.\n- address argument types are `AddressLike`, meaning you can pass a signer or contract.\n\nNote: these are just _type declarations_ to help you call the blockchain properly, so they're not available at runtime,\nand all of the contracts are still instances of the same `Contract` class.\n\n## Contract factories\n\nThis target also generates a concrete factory class for each contract, to help you deploy or connect to contract\ninstances. The factory classes are an extension of ethers' `ContractFactory`. They serve two main purposes:\n\n- wrap passing contract ABI and bytecode to the `ContractFactory` class, so you don't have to load and parse the JSON\n  manually\n- provide a correctly typed interface to `ContractFactory` (since it returns plain `Contract` instances).\n\nAbstract contracts or solidity interfaces are handled a bit different, because they have no bytecode. For those, a\nsimplified factory is generated that doesn't extends `ContractFactory`, and only includes the static `connect` method,\nso you can easily connect to a deployed instance without having to pass the ABI manually.\n\n## Basic example\n\nSuppose you have an `Erc20Token.sol` solidity interface and a `DummyToken.sol` contract implementing it.\n\n```typescript\nimport { Wallet } from 'ethers';\n\nimport { DummyTokenFactory } from 'typechain-out-dir/DummyTokenFactory';\nimport { DummyToken } from 'typechain-out-dir/DummyToken';\nimport { Erc20TokenFactory } from 'typechain-out-dir/Erc20TokenFactory';\n\nconst provider = getYourProvider(...);\n\n// use the concrete contract factory if you need to operate on the bytecode (ie. deploy)\nasync function deployTestToken(ownerPK: string): Promise<DummyToken> {\n    const owner = new Wallet(ownerPK, provider);\n    return new DummyTokenFactory(owner).deploy();\n}\n\n// to call existing contracts, a factory for both the concrete contract and for the interface\n// can be used since the ABI is the same\nasync function getTokenBalance(walletAddress: string, tokenAddress: string): Promise<bigint> {\n    const token = Erc20TokenFactory.connect(tokenAddress, provider);\n    return token.balanceOf(walletAddress);\n}\n```\n","readmeFilename":"README.md","_rev":"1-8addc85943637eca6da3c424b5788f76"}