mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
removed referral param
This commit is contained in:
parent
cb89771f7e
commit
2d308f2e35
|
@ -1,10 +1,5 @@
|
||||||
pragma solidity ^0.7.0;
|
pragma solidity ^0.7.0;
|
||||||
|
|
||||||
contract Events {
|
contract Events {
|
||||||
event LogDeposit(
|
event LogDeposit(uint256 Amt, uint256 getId, uint256 setId);
|
||||||
uint256 Amt,
|
|
||||||
address referral,
|
|
||||||
uint256 getId,
|
|
||||||
uint256 setId
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,5 +6,7 @@ import { ILido } from "./interface.sol";
|
||||||
abstract contract Helpers {
|
abstract contract Helpers {
|
||||||
ILido internal constant lidoInterface =
|
ILido internal constant lidoInterface =
|
||||||
ILido(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);
|
ILido(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);
|
||||||
|
|
||||||
|
address treasury = 0x28849D2b63fA8D361e5fc15cB8aBB13019884d09; // Instadapp's treasury address
|
||||||
}
|
}
|
||||||
//0xC7B5aF82B05Eb3b64F12241B04B2cF14469E39F7
|
//0xC7B5aF82B05Eb3b64F12241B04B2cF14469E39F7
|
||||||
|
|
|
@ -15,13 +15,11 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers {
|
||||||
* @dev deposit ETH into Lido.
|
* @dev deposit ETH into Lido.
|
||||||
* @notice sends Eth into lido and in return you get equivalent of stEth tokens
|
* @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 amt The amount of ETH to deposit. (For max: `uint256(-1)`)
|
||||||
* @param referral optional referral parameter
|
|
||||||
* @param getId ID to retrieve amt.
|
* @param getId ID to retrieve amt.
|
||||||
* @param setId ID stores the amount of ETH deposited.
|
* @param setId ID stores the amount of ETH deposited.
|
||||||
*/
|
*/
|
||||||
function deposit(
|
function deposit(
|
||||||
uint256 amt,
|
uint256 amt,
|
||||||
address referral,
|
|
||||||
uint256 getId,
|
uint256 getId,
|
||||||
uint256 setId
|
uint256 setId
|
||||||
)
|
)
|
||||||
|
@ -32,11 +30,11 @@ abstract contract Resolver is Events, DSMath, Basic, Helpers {
|
||||||
uint256 _amt = getUint(getId, amt);
|
uint256 _amt = getUint(getId, amt);
|
||||||
|
|
||||||
_amt = _amt == uint256(-1) ? address(this).balance : _amt;
|
_amt = _amt == uint256(-1) ? address(this).balance : _amt;
|
||||||
lidoInterface.submit{ value: amt }(referral);
|
lidoInterface.submit{ value: amt }(treasury);
|
||||||
setUint(setId, _amt);
|
setUint(setId, _amt);
|
||||||
|
|
||||||
_eventName = "LogDeposit(uint256,address,uint256,uint256)";
|
_eventName = "LogDeposit(uint256,uint256,uint256)";
|
||||||
_eventParam = abi.encode(_amt, referral, getId, setId);
|
_eventParam = abi.encode(_amt, getId, setId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ describe("LidoStEth", function() {
|
||||||
{
|
{
|
||||||
connector: connectorName,
|
connector: connectorName,
|
||||||
method: "deposit",
|
method: "deposit",
|
||||||
args: [_amt,"0x0000000000000000000000000000000000000000",0,0]
|
args: [_amt,0,0]
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const tx = await dsaWallet0
|
const tx = await dsaWallet0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user