PatrickAlphaC / smartcontract-lottery

MIT License
79 stars 113 forks source link

Ownable: caller is not the owner error #74

Closed HassanSayyed closed 2 years ago

HassanSayyed commented 2 years ago

I can't run the start_lottery() function due to error bellow

VirtualMachineError: revert: Ownable: caller is not the owner modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; }

where are the possible error causing? I have my PRIVATE_KEY in the .env file and added to the wallet in the brownie-config file

notice the the first function deploy_lottery() is working fine

HassanSayyed commented 2 years ago

solved ✔

brownie run .\scripts\deploy_lottery.py --network rinkeby

solved by running on rinkeby network instead of the default development network, still didnt find the error