'Uncaught ReferenceError: TodoList is not defined at evalmachine.<anonymous>:1:7
I've been following a tutorial for the past couple of days and I keep getting this error.
todoList = await TodoList.deployed()
My contract is migrated to the blockchain but I cannot deploy it.
Solution 1:[1]
Hi instead of taskCount = await app.taskCount()
write and run
taskCount = await todoList.taskCount()
and then,
taskCount.toNumber()
we are doing this because truffle when retrieves a value it stores into BN(big number) format to convert it into a (number) we are using these lines.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |