hello gyus
i am noob solidity dev and i have some trouble while i am testing my nft contract

when i mint for address nft and try to check balance i have this error
AssertionError: expected BigNumber{ _hex: '0x02', …(1) } to equal 1

my code: assert.equal(await artwork.balanceOf(account1.address), 5)

(i have tried to use method toString() but it did not helped)

Help me plz

Jul 20, 2022, 2:34 PM
iunderstand that i rceived big number and tried to compare it to standart number, but i cant understand why i received big number///
Jul 20, 2022, 2:35 PM
https://docs.ethers.io/v5/api/utils/bignumber/
convert something to something else, maybe a small int on solidity wont return a bignumber, but just deal with it
i'd have to test it, but i believe some of my smaller declarations come back as regular numbers
Jul 20, 2022, 2:39 PM

© 2024 Draquery.com All rights reserved.