As per our design, now we will define an interface for our Tontine game.
Interfaces are universal concepts in programming languages used to represent collections of abstract methods. They are useful since they implement an agreed set of functions that enable interactions without forcing a contract relationship (they might be considered as a protocol).
Nevertheless, in Solidity, unlike abstract contracts, interfaces present the following limitations:
- Cannot inherit other contracts or interfaces
- Cannot implement their own functions
- Cannot define a constructor
- Cannot define variables
- Cannot define structs
- Cannot define enums
Here is the definition of our Itontine interface:
interface Itontine {
function join() external payable returns (bool);
function ping() external returns (bool);
function eliminate(address a) external returns (bool...