Getting number of tokens from NFT contract #5721
-
I have a simple NFT contract and trying to extract the number of tokens using _tokenIds.current(); but after deployment I call the function and it gives me this : BN { negative: 0, words: [ 0, <1 empty item> ], length: 1, red: null } while I am expecting a uint 256. this is the contract //should I add payable here????
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
turns out the answer is in the "words" attribute and solution is here https://www.preciouschicken.com/blog/posts/decomposing-a-bignumber-in-truffle-console/ |
Beta Was this translation helpful? Give feedback.
turns out the answer is in the "words" attribute and solution is here
https://www.preciouschicken.com/blog/posts/decomposing-a-bignumber-in-truffle-console/