Updated events on debt tokens

This commit is contained in:
The3D 2020-09-15 15:20:32 +02:00
parent 191f65c7f0
commit 3c3a01b80f
2 changed files with 9 additions and 0 deletions

View File

@ -132,6 +132,9 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
_mint(user, amount.add(balanceIncrease));
// transfer event to track balances
emit Transfer(address(0), user, amount);
emit MintDebt(
user,
amount,
@ -180,6 +183,9 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
_burn(user, amount.sub(balanceIncrease));
}
// transfer event to track balances
emit Transfer(user, address(0), amount);
emit BurnDebt(user, amount, previousBalance, currentBalance, balanceIncrease);
}
}

View File

@ -79,6 +79,7 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
require(newUserIndex < (1 << 128), 'Debt token: Index overflow');
_usersData[user] = newUserIndex;
emit Transfer(address(0), user, amount);
emit MintDebt(user, amount, previousBalance, currentBalance, balanceIncrease, newUserIndex);
}
@ -108,6 +109,8 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
}
_usersData[user] = newUserIndex;
// transfer event to track the balances
emit Transfer(user, address(0), amount);
emit BurnDebt(user, amount, previousBalance, currentBalance, balanceIncrease, newUserIndex);
}
}