defi-wonderland / smock

The Solidity mocking library
MIT License
320 stars 40 forks source link

Cannot set variable with type address,uint256 used from library (Address, SafeMath) #65

Closed leodinh closed 2 years ago

leodinh commented 3 years ago

Describe the bug I cannot set variable with type address, uint256. These types I used from library (Address, SafeMath). using Address for address; using SafeMath for uint256 I got error TypeError: bn.toBigInt is not a function. Could you please confirm that is an expected bug or may be I setup wrong ? Hardhat version: '2.6.1" @defi-wonderland/smock : "^2.0.2"

smartcontracts commented 3 years ago

Hi, can you give an example code snippet that I could use to test this locally?

ashhanai commented 3 years ago

I have same issue with plain uint256. My contract is using library, but not for uint256 (maybe is relevant).

BitByTheByte commented 2 years ago

I solved this issue by updating my ethers dependency (from 5.0 to 5.5)