Skip to main content

Questions tagged [typechain]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
3k views

How to get deployed contract address with ethers?

I using hardhat deploy (TypeScript) and am deploying two contracts: the first is a mock ERC20 token and a second is a crowdfunding contract that uses the mock when on a hardhat chain/localhost. I am ...
Kate Johnson's user avatar
1 vote
1 answer
2k views

TypeError: glob is not a function after updating typechain-hardhat to @typechain/hardhat

After updating project from typechain-hardhat to @typechain/hardhat package. Compilation of project throws TypeError: glob is not a function error. And I can not run scripts, tests, compile etc. An ...
r0uge's user avatar
  • 11
2 votes
1 answer
1k views

How can I assign my custom contract type to a contract instance from Ethers?

Using Ethers, I'm creating an instance of my deployed contract as follows: import MySwapV2FactoryABI from "src/abis/MySwapV2Factory.json"; const provider = new ethers.providers....
code_learner93's user avatar
1 vote
0 answers
418 views

Ethers: abi.map is not a function

I'm trying to import a contract using ethers. I'm getting an error: ..\node_modules@ethersproject\abi\src.ts\interface.ts:100 defineReadOnly(this, "fragments", abi.map((fragment) => { ...
Ritzy Dev's user avatar
  • 271
1 vote
3 answers
3k views

How can I create the typechain directory in my hardhat project?

I have set up a hardhat project with typescript a while ago and want to write some tests. Now I only have a typechain-types directory and it doesn't give me the types I am used to. Where is the plain ...
Marlo's user avatar
  • 329
2 votes
2 answers
3k views

Instantiate a contract using interface generated by TypeChain

in my solidity codebase I am using an interface and these are the types generated by TypeChain: import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, ...
Jan Beneš's user avatar