Fix: Remove referrer as it's not used

This commit is contained in:
eccheung4 2021-09-02 13:43:23 -07:00
parent 09aa2913e7
commit 3a052b9800
3 changed files with 9 additions and 11 deletions

View File

@ -3,7 +3,7 @@ pragma solidity ^0.7.0;
import { TokenFaucetInterface } from "./interface.sol";
contract Events {
event LogDepositTo(address prizePool, address to, uint256 amount, address controlledToken, address referrer, uint256 getId, uint256 setId);
event LogDepositTo(address prizePool, address to, uint256 amount, address controlledToken, uint256 getId, uint256 setId);
event LogWithdrawInstantlyFrom(address prizePool, address from, uint256 amount, address controlledToken, uint256 maximumExitFee, uint256 getId, uint256 setId);
event LogClaim(address tokenFaucet, address user, uint256 claimed, uint256 setId);
event LogClaimAll(address tokenFaucetProxyFactory, address user, TokenFaucetInterface[] tokenFaucets);

View File

@ -23,7 +23,6 @@ abstract contract PoolTogetherResolver is Events, DSMath, Basic {
* @param prizePool PrizePool address to deposit to
* @param amount The amount of the underlying asset the user wishes to deposit. The Prize Pool contract should have been pre-approved by the caller to transfer the underlying ERC20 tokens.
* @param controlledToken The address of the token that they wish to mint. For our default Prize Strategy this will either be the Ticket address or the Sponsorship address. Those addresses can be looked up on the Prize Strategy.
* @param referrer The address that should receive referral awards, if any.
* @param getId Get token amount at this ID from `InstaMemory` Contract.
* @param setId Set token amount at this ID in `InstaMemory` Contract.
*/
@ -32,7 +31,6 @@ abstract contract PoolTogetherResolver is Events, DSMath, Basic {
address prizePool,
uint256 amount,
address controlledToken,
address referrer,
uint256 getId,
uint256 setId
) external payable returns ( string memory _eventName, bytes memory _eventParam) {
@ -46,12 +44,12 @@ abstract contract PoolTogetherResolver is Events, DSMath, Basic {
_amount = _amount == uint256(-1) ? tokenContract.balanceOf(address(this)) : _amount;
tokenContract.approve(prizePool, _amount);
prizePoolContract.depositTo(address(this), _amount, controlledToken, referrer);
prizePoolContract.depositTo(address(this), _amount, controlledToken, address(0));
setUint(setId, _amount);
_eventName = "LogDepositTo(address,address,uint256,address,address,uint256, uint256)";
_eventParam = abi.encode(address(prizePool), address(this), _amount, address(controlledToken), address(referrer), getId, setId);
_eventName = "LogDepositTo(address,address,uint256,address,uint256,uint256)";
_eventParam = abi.encode(address(prizePool), address(this), _amount, address(controlledToken), getId, setId);
}
/**

View File

@ -129,7 +129,7 @@ describe("PoolTogether", function () {
{
connector: ptConnectorName,
method: "depositTo",
args: [DAI_PRIZE_POOL_ADDR, amount, PT_DAI_TICKET_ADDR, constants.address_zero, setId, 0]
args: [DAI_PRIZE_POOL_ADDR, amount, PT_DAI_TICKET_ADDR, setId, 0]
}
]
// Before Spell
@ -210,7 +210,7 @@ describe("PoolTogether", function () {
{
connector: ptConnectorName,
method: "depositTo",
args: [DAI_PRIZE_POOL_ADDR, amount, PT_DAI_TICKET_ADDR, constants.address_zero, 0, 0]
args: [DAI_PRIZE_POOL_ADDR, amount, PT_DAI_TICKET_ADDR, 0, 0]
},
{
connector: ptConnectorName,
@ -256,7 +256,7 @@ describe("PoolTogether", function () {
{
connector: ptConnectorName,
method: "depositTo",
args: [DAI_PRIZE_POOL_ADDR, amount, PT_DAI_TICKET_ADDR, constants.address_zero, 0, 0]
args: [DAI_PRIZE_POOL_ADDR, amount, PT_DAI_TICKET_ADDR, 0, 0]
}
]
@ -472,7 +472,7 @@ describe("PoolTogether", function () {
{
connector: ptConnectorName,
method: "depositTo",
args: [UNISWAP_POOLETHLP_PRIZE_POOL_ADDR, 0, PT_UNISWAP_POOLETHLP_TICKET_ADDR, constants.address_zero, setId, 0]
args: [UNISWAP_POOLETHLP_PRIZE_POOL_ADDR, 0, PT_UNISWAP_POOLETHLP_TICKET_ADDR, setId, 0]
}
]
@ -529,7 +529,7 @@ describe("PoolTogether", function () {
{
connector: ptConnectorName,
method: "depositTo",
args: [POOL_PRIZE_POOL_ADDR, 0, PT_POOL_TICKET_ADDR, constants.address_zero, setId, 0]
args: [POOL_PRIZE_POOL_ADDR, 0, PT_POOL_TICKET_ADDR, setId, 0]
}
]