Skip to content

Commit

Permalink
Merge branch 'master' into pool-1956-rename-beacon-push-and-lock-rout…
Browse files Browse the repository at this point in the history
…er-to
  • Loading branch information
kamescg committed Dec 16, 2021
2 parents 260265f + de41f05 commit 2180bda
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
13 changes: 7 additions & 6 deletions contracts/ReceiverTimelockTrigger.sol
Expand Up @@ -3,18 +3,19 @@ pragma solidity 0.8.6;
import "@pooltogether/v4-core/contracts/interfaces/IDrawBeacon.sol";
import "@pooltogether/v4-core/contracts/interfaces/IDrawBuffer.sol";
import "@pooltogether/owner-manager-contracts/contracts/Manageable.sol";
import "./interfaces/IReceiverTimelockAndPushRouter.sol";
import "./interfaces/IReceiverTimelockTrigger.sol";
import "./interfaces/IPrizeDistributionFactory.sol";
import "./interfaces/IDrawCalculatorTimelock.sol";

/**
* @title PoolTogether V4 ReceiverTimelockAndPushRouter
* @title PoolTogether V4 ReceiverTimelockTrigger
* @author PoolTogether Inc Team
* @notice The ReceiverTimelockAndPushRouter smart contract is an upgrade of the L2TimelockTimelock smart contract.
* @notice The ReceiverTimelockTrigger smart contract is an upgrade of the L2TimelockTimelock smart contract.
Reducing protocol risk by eliminating off-chain computation of PrizeDistribution parameters. The timelock will
only pass the total supply of all tickets in a "PrizePool Network" to the prize distribution factory contract.
*/
contract ReceiverTimelockAndPushRouter is IReceiverTimelockAndPushRouter, Manageable {
contract ReceiverTimelockTrigger is IReceiverTimelockTrigger, Manageable {
/* ============ Global Variables ============ */

/// @notice The DrawBuffer contract address.
Expand All @@ -29,7 +30,7 @@ contract ReceiverTimelockAndPushRouter is IReceiverTimelockAndPushRouter, Manage
/* ============ Constructor ============ */

/**
* @notice Initialize ReceiverTimelockAndPushRouter smart contract.
* @notice Initialize ReceiverTimelockTrigger smart contract.
* @param _owner The smart contract owner
* @param _drawBuffer DrawBuffer address
* @param _prizeDistributionFactory PrizeDistributionFactory address
Expand All @@ -47,7 +48,7 @@ contract ReceiverTimelockAndPushRouter is IReceiverTimelockAndPushRouter, Manage
emit Deployed(_drawBuffer, _prizeDistributionFactory, _timelock);
}

/// @inheritdoc IReceiverTimelockAndPushRouter
/// @inheritdoc IReceiverTimelockTrigger
function push(IDrawBeacon.Draw memory _draw, uint256 _totalNetworkTicketSupply)
external
override
Expand Down
Expand Up @@ -6,11 +6,11 @@ import "./IPrizeDistributionFactory.sol";
import "./IDrawCalculatorTimelock.sol";

/**
* @title PoolTogether V4 IReceiverTimelockAndPushRouter
* @title PoolTogether V4 IReceiverTimelockTrigger
* @author PoolTogether Inc Team
* @notice The IReceiverTimelockAndPushRouter smart contract interface...
* @notice The IReceiverTimelockTrigger smart contract interface...
*/
interface IReceiverTimelockAndPushRouter {
interface IReceiverTimelockTrigger {
/// @notice Emitted when the contract is deployed.
event Deployed(
IDrawBuffer indexed drawBuffer,
Expand Down
10 changes: 5 additions & 5 deletions test/ReceiverTimelockAndPushRouter.test.ts
Expand Up @@ -4,7 +4,7 @@ import { ethers, artifacts } from 'hardhat';
import { BigNumber, Contract, ContractFactory } from 'ethers';
const { getSigners } = ethers;

describe('ReceiverTimelockAndPushRouter', () => {
describe('ReceiverTimelockTrigger', () => {
let wallet1: any;
let wallet2: any;

Expand All @@ -14,7 +14,7 @@ describe('ReceiverTimelockAndPushRouter', () => {
let drawCalculatorTimelock: MockContract;
let drawBuffer: MockContract;

let receiverTimelockAndPushRouterFactory: ContractFactory;
let ReceiverTimelockTriggerFactory: ContractFactory;

beforeEach(async () => {
[wallet1, wallet2] = await getSigners();
Expand All @@ -28,11 +28,11 @@ describe('ReceiverTimelockAndPushRouter', () => {
const DrawCalculatorTimelock = await artifacts.readArtifact('DrawCalculatorTimelock');
drawCalculatorTimelock = await deployMockContract(wallet1, DrawCalculatorTimelock.abi);

receiverTimelockAndPushRouterFactory = await ethers.getContractFactory(
'ReceiverTimelockAndPushRouter',
ReceiverTimelockTriggerFactory = await ethers.getContractFactory(
'ReceiverTimelockTrigger',
);

drawAndPrizeDistributionTimelock = await receiverTimelockAndPushRouterFactory.deploy(
drawAndPrizeDistributionTimelock = await ReceiverTimelockTriggerFactory.deploy(
wallet1.address,
drawBuffer.address,
prizeDistributionFactory.address,
Expand Down

0 comments on commit 2180bda

Please sign in to comment.