update mysteryboxV1

This commit is contained in:
owen05
2021-04-20 22:13:26 +08:00
parent ac927022f4
commit 861eb33e6c
4 changed files with 14 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ interface IDODOMidPrice {
function getMidPrice() external view returns (uint256 midPrice);
}
contract RandomGenerator {
contract RandomGenerator is IRandomGenerator{
address[] public pools;
constructor(address[] memory _pools) public {
@@ -24,7 +24,7 @@ contract RandomGenerator {
}
}
function random(uint256 seed) external view returns (uint256) {
function random(uint256 seed) external override view returns (uint256) {
uint256 priceSum;
for (uint256 i = 0; i < pools.length; i++) {
priceSum += IDODOMidPrice(pools[i]).getMidPrice();