Skip to content

Commit

Permalink
deployed mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Aodhgan committed May 7, 2021
1 parent 4e7ef65 commit 42760eb
Show file tree
Hide file tree
Showing 10 changed files with 604 additions and 37 deletions.
18 changes: 15 additions & 3 deletions contracts/PrizeStrategyUpkeep.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import "./interfaces/PrizePoolInterface.sol";
import "./utils/SafeAwardable.sol";

import "@pooltogether/pooltogether-generic-registry/contracts/AddressRegistry.sol";
import "@openzeppelin/contracts/access/Ownable.sol"
;
import "@openzeppelin/contracts/access/Ownable.sol";

///@notice Contract implements Chainlink's Upkeep system interface, automating the upkeep of PrizePools in the associated registry.
contract PrizeStrategyUpkeep is KeeperCompatibleInterface, Ownable {
Expand All @@ -30,11 +29,16 @@ contract PrizeStrategyUpkeep is KeeperCompatibleInterface, Ownable {
/// @notice Emitted when the upkeepBatchSize has been changed
event UpkeepBatchSizeUpdated(uint256 upkeepBatchSize);

/// @notice Emitted when the prize pool registry has been changed
event UpkeepPrizePoolRegistryUpdated(AddressRegistry prizePoolRegistry);


constructor(AddressRegistry _prizePoolRegistry, uint256 _upkeepBatchSize) Ownable() public {
prizePoolRegistry = _prizePoolRegistry;
emit UpkeepPrizePoolRegistryUpdated(_prizePoolRegistry);

upkeepBatchSize = _upkeepBatchSize;
UpkeepBatchSizeUpdated(_upkeepBatchSize);
emit UpkeepBatchSizeUpdated(_upkeepBatchSize);
}


Expand Down Expand Up @@ -96,6 +100,14 @@ contract PrizeStrategyUpkeep is KeeperCompatibleInterface, Ownable {
emit UpkeepBatchSizeUpdated(_upkeepBatchSize);
}


/// @notice Updates the prize pool registry
/// @param _prizePoolRegistry New registry address
function updatePrizePoolRegistry(AddressRegistry _prizePoolRegistry) external onlyOwner {
prizePoolRegistry = _prizePoolRegistry;
emit UpkeepPrizePoolRegistryUpdated(_prizePoolRegistry);
}

}


6 changes: 3 additions & 3 deletions deploy/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ module.exports = async (hardhat) => {
const namedSigners = await ethers.getNamedSigners()
const deployerSigner = namedSigners.deployer

const batchSize = 5
const batchSize = 3

dim(`deploying PrizeStrategyUpkeep contract from ${deployer}`)
console.log("prizePoolRegistry at ", prizePoolRegistry)

const prizePoolUpkeep = await deploy('PrizeStrategyUpkeep', {
args: [prizePoolRegistry, batchSize],
from: deployer,
skipIfAlreadyDeployed: false
})
green(`Deployed PrizeStrategyUpkeep: ${prizePoolUpkeep.address}`)

// do we want to add the governance prize pools and transfer ownership in here?

}
1 change: 1 addition & 0 deletions deployments/mainnet/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
372 changes: 372 additions & 0 deletions deployments/mainnet/PrizeStrategyUpkeep.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

105 changes: 77 additions & 28 deletions deployments/rinkeby/PrizeStrategyUpkeep.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ module.exports = {
4: "0x72c9aA4c753fc36cbF3d1fF6fEc0bC44ad41D7f2"
},
prizePoolRegistry: {
1 : "0x34733851E2047F8d0e1aa91124A6f9EaDc54D253",
4: "0xF76f17682888a738a6DF40aa63ac2b4B1a380831"
}
},
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pooltogether/pooltogether-prizestrategy-upkeep",
"version": "0.1.0",
"version": "1.0.0-beta.1",
"description": "Upkeep integration contracts for the PoolTogether protocol",
"author": "Aodhgan Gleeson",
"license": "MIT",
Expand All @@ -23,7 +23,7 @@
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "^3.4.0",
"@pooltogether/pooltogether-contracts": "^3.3.0",
"@pooltogether/pooltogether-generic-registry": "^1.0.8",
"@pooltogether/pooltogether-generic-registry": "^1.0.9",
"chai": "^4.3.0",
"chalk": "^4.1.0",
"ethereum-waffle": "^3.2.0\n",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@
deploy-eip-1820 "1.0.0"
sortition-sum-tree-factory "0.1.0"

"@pooltogether/pooltogether-generic-registry@^1.0.8":
"@pooltogether/pooltogether-generic-registry@^1.0.9":
version "1.0.9"
resolved "https://registry.yarnpkg.com/@pooltogether/pooltogether-generic-registry/-/pooltogether-generic-registry-1.0.9.tgz#f16fba214b40153144a2fca78c1b798d1bbf49bf"
integrity sha512-NsgvwbSD2k+hok7xefNtdGa10adLd3Xzs/JMs/Ib+w+7BXbvV87mAo66fZEBxLRXxUKk2aXvS2LGHNdsvrpYaA==
Expand Down

0 comments on commit 42760eb

Please sign in to comment.