mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
[WIP] events
This commit is contained in:
parent
81f8ade041
commit
584bd9a98f
|
@ -23,4 +23,15 @@ contract Events {
|
||||||
uint[] variableBorrowAmts,
|
uint[] variableBorrowAmts,
|
||||||
uint[] stableBorrowAmts
|
uint[] stableBorrowAmts
|
||||||
);
|
);
|
||||||
|
|
||||||
|
event LogUpdateVariables(
|
||||||
|
uint256 oldFee,
|
||||||
|
uint256 newFee,
|
||||||
|
uint256 oldSafeRatioGap,
|
||||||
|
uint256 newSafeRatioGap
|
||||||
|
);
|
||||||
|
|
||||||
|
event LogAddSupportedTokens(
|
||||||
|
uint256[] tokens
|
||||||
|
);
|
||||||
}
|
}
|
|
@ -15,18 +15,19 @@ contract LiquidityResolver is Helpers, Events {
|
||||||
|
|
||||||
function updateVariables(uint _safeRatioGap, uint _fee) public {
|
function updateVariables(uint _safeRatioGap, uint _fee) public {
|
||||||
require(msg.sender == instaIndex.master(), "not-master");
|
require(msg.sender == instaIndex.master(), "not-master");
|
||||||
|
emit LogUpdateVariables(fee, _fee, safeRatioGap, _safeRatioGap);
|
||||||
safeRatioGap = _safeRatioGap;
|
safeRatioGap = _safeRatioGap;
|
||||||
fee = _fee;
|
fee = _fee;
|
||||||
emit variablesUpdate(safeRatioGap, fee);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addTokenSupport(address[] memory _tokens) public {
|
function addTokenSupport(address[] memory _tokens) public {
|
||||||
require(msg.sender == instaIndex.master(), "not-master");
|
require(msg.sender == instaIndex.master(), "not-master");
|
||||||
for (uint i = 0; i < _tokens.length; i++) {
|
for (uint i = 0; i < _tokens.length; i++) {
|
||||||
|
require(!isSupportedToken[_tokens[i]], "already-added");
|
||||||
isSupportedToken[_tokens[i]] = true;
|
isSupportedToken[_tokens[i]] = true;
|
||||||
|
supportedTokens.push(_tokens[i]);
|
||||||
}
|
}
|
||||||
supportedTokens = _tokens;
|
emit LogAddSupportedTokens(_tokens);
|
||||||
// TODO: add event
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function spell(address _target, bytes memory _data) external {
|
function spell(address _target, bytes memory _data) external {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user