From how it’s used, I suspect that
stakers was meant to be
address rather than
address. State variables of dynamic array types have
.pop() methods for adding and removing elements.
If that’s not it, I see two other, less likely possibilities:
push() might be a function from some library and you’re missing a
using <name of the library> for address; declaration in your contract.
- Note that since Solidity 0.7.0
using for declarations are not inherited from base contracts. This might be why people are saying the problem only occurs on 0.8.0, though I can’t say for sure since I have no idea which StackOverflow post you’re talking about.
stakers might also be supposed to be of a contract type with a public or external
If neither of these solves your problem I could try to compile it and see what’s wrong if you can provide a minimal self-contained example that reproduces this error.