pancakeswap / lottery-contract

MIT License
83 stars 192 forks source link

TypeError: lotteryInstance.init is not a function #12

Open sinetemp opened 3 years ago

sinetemp commented 3 years ago

Hi, I get the following error on running yarn deploy:local.

TypeError: lotteryInstance.init is not a function
    at main (/home/eth/lottery-contract/scripts/deploy.js:85:27)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
error Command failed with exit code 1.

Any suggestions why this is the case?

huyiya commented 3 years ago

Change lotteryInstance.init to lotteryInstance.initialize. It works for me.