From 3c3a01b80f29722c5276ef9e2c8065b1ba39201a Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 15 Sep 2020 15:20:32 +0200 Subject: [PATCH] Updated events on debt tokens --- contracts/tokenization/StableDebtToken.sol | 6 ++++++ contracts/tokenization/VariableDebtToken.sol | 3 +++ 2 files changed, 9 insertions(+) diff --git a/contracts/tokenization/StableDebtToken.sol b/contracts/tokenization/StableDebtToken.sol index 8e5da21b..39f614ad 100644 --- a/contracts/tokenization/StableDebtToken.sol +++ b/contracts/tokenization/StableDebtToken.sol @@ -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); } } diff --git a/contracts/tokenization/VariableDebtToken.sol b/contracts/tokenization/VariableDebtToken.sol index e52f7c61..106c4520 100644 --- a/contracts/tokenization/VariableDebtToken.sol +++ b/contracts/tokenization/VariableDebtToken.sol @@ -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); } }