From 2d308f2e3555a3bb319b31d67d6ba3d84a58e5f4 Mon Sep 17 00:00:00 2001 From: bhavik-m Date: Mon, 7 Mar 2022 01:00:45 +0530 Subject: [PATCH] removed referral param --- contracts/mainnet/connectors/lido_stETH/events.sol | 7 +------ contracts/mainnet/connectors/lido_stETH/helpers.sol | 2 ++ contracts/mainnet/connectors/lido_stETH/main.sol | 8 +++----- test/mainnet/lido_stETH/lidoStEth.test.ts | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/contracts/mainnet/connectors/lido_stETH/events.sol b/contracts/mainnet/connectors/lido_stETH/events.sol index 60ef8ab8..2259e797 100644 --- a/contracts/mainnet/connectors/lido_stETH/events.sol +++ b/contracts/mainnet/connectors/lido_stETH/events.sol @@ -1,10 +1,5 @@ pragma solidity ^0.7.0; contract Events { - event LogDeposit( - uint256 Amt, - address referral, - uint256 getId, - uint256 setId - ); + event LogDeposit(uint256 Amt, uint256 getId, uint256 setId); } diff --git a/contracts/mainnet/connectors/lido_stETH/helpers.sol b/contracts/mainnet/connectors/lido_stETH/helpers.sol index 0bb82b04..84a7d016 100644 --- a/contracts/mainnet/connectors/lido_stETH/helpers.sol +++ b/contracts/mainnet/connectors/lido_stETH/helpers.sol @@ -6,5 +6,7 @@ import { ILido } from "./interface.sol"; abstract contract Helpers { ILido internal constant lidoInterface = ILido(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84); + + address treasury = 0x28849D2b63fA8D361e5fc15cB8aBB13019884d09; // Instadapp's treasury address } //0xC7B5aF82B05Eb3b64F12241B04B2cF14469E39F7 diff --git a/contracts/mainnet/connectors/lido_stETH/main.sol b/contracts/mainnet/connectors/lido_stETH/main.sol index d833a738..e97f0e9f 100644 --- a/contracts/mainnet/connectors/lido_stETH/main.sol +++ b/contracts/mainnet/connectors/lido_stETH/main.sol @@ -15,13 +15,11 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers { * @dev deposit ETH into Lido. * @notice sends Eth into lido and in return you get equivalent of stEth tokens * @param amt The amount of ETH to deposit. (For max: `uint256(-1)`) - * @param referral optional referral parameter * @param getId ID to retrieve amt. * @param setId ID stores the amount of ETH deposited. */ function deposit( uint256 amt, - address referral, uint256 getId, uint256 setId ) @@ -32,11 +30,11 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers { uint256 _amt = getUint(getId, amt); _amt = _amt == uint256(-1) ? address(this).balance : _amt; - lidoInterface.submit{ value: amt }(referral); + lidoInterface.submit{ value: amt }(treasury); setUint(setId, _amt); - _eventName = "LogDeposit(uint256,address,uint256,uint256)"; - _eventParam = abi.encode(_amt, referral, getId, setId); + _eventName = "LogDeposit(uint256,uint256,uint256)"; + _eventParam = abi.encode(_amt, getId, setId); } } diff --git a/test/mainnet/lido_stETH/lidoStEth.test.ts b/test/mainnet/lido_stETH/lidoStEth.test.ts index 3467a119..9cd318cd 100644 --- a/test/mainnet/lido_stETH/lidoStEth.test.ts +++ b/test/mainnet/lido_stETH/lidoStEth.test.ts @@ -85,7 +85,7 @@ describe("LidoStEth", function() { { connector: connectorName, method: "deposit", - args: [_amt,"0x0000000000000000000000000000000000000000",0,0] + args: [_amt,0,0] }, ]; const tx = await dsaWallet0