I'm new to solidity and OOP. I'm trying to understand the code in this simple lottery game example:
https://github.com/alphachainio/chainlink-lottery/blob/master/ethereum/contracts/
I am confused when they call governance.randomness()
in line 57 in Lottery.sol. but I don't see the randomness()
function implemented any where in any of the contract files.
The answer below explains that the unimplemented function will be implemented in the contract provided in CEth cToken = CEth(_cEtherContract);
https://stackoverflow.com/a/64734548/4488843
But in the GitHub lottery example, I see the function is no where declared in any of the contracts (lottery.sol, randomness.sol and governance.sol).
is the function initiated when governance contract's init()
function is called and it sets the randomness
state variable? or is there something I'm missing in the code?