Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ERC165 to PeriodicPrizeStrategyListenerInterface
- Loading branch information
1 parent
ccf05d8
commit fc4a436
Showing
5 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
contracts/prize-strategy/PeriodicPrizeStrategyListener.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
pragma solidity ^0.6.12; | ||
|
||
import "./PeriodicPrizeStrategyListenerInterface.sol"; | ||
import "./PeriodicPrizeStrategyListenerLibrary.sol"; | ||
import "../Constants.sol"; | ||
|
||
abstract contract PeriodicPrizeStrategyListener is PeriodicPrizeStrategyListenerInterface { | ||
function supportsInterface(bytes4 interfaceId) external override view returns (bool) { | ||
return ( | ||
interfaceId == Constants.ERC165_INTERFACE_ID_ERC165 || | ||
interfaceId == PeriodicPrizeStrategyListenerLibrary.ERC165_INTERFACE_ID_PERIODIC_PRIZE_STRATEGY_LISTENER | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
contracts/prize-strategy/PeriodicPrizeStrategyListenerLibrary.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pragma solidity ^0.6.12; | ||
|
||
library PeriodicPrizeStrategyListenerLibrary { | ||
/* | ||
* bytes4(keccak256('afterPrizePoolAwarded(uint256,uint256)')) == 0x575072c6 | ||
*/ | ||
bytes4 public constant ERC165_INTERFACE_ID_PERIODIC_PRIZE_STRATEGY_LISTENER = 0x575072c6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters