Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions contracts/tokens/SecurityToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,19 @@ contract SecurityToken is StandardToken, DetailedERC20, ReentrancyGuard, Registr
* @param _data data to indicate validation
* @return bool success
*/
function _updateTransfer(address _from, address _to, uint256 _value, bytes _data) internal returns(bool) {
function _updateTransfer(address _from, address _to, uint256 _value, bytes _data) internal nonReentrant returns(bool) {
// NB - the ordering in this function implies the following:
// - investor counts are updated before transfer managers are called - i.e. transfer managers will see
//investor counts including the current transfer.
// - checkpoints are updated after the transfer managers are called. This allows TMs to create
//checkpoints as though they have been created before the current transactions,
// - to avoid the situation where a transfer manager transfers tokens, and this function is called recursively,
//the function is marked as nonReentrant. This means that no TM can transfer (or mint / burn) tokens.
_adjustInvestorCount(_from, _to, _value);
bool verified = _verifyTransfer(_from, _to, _value, _data, true);
_adjustBalanceCheckpoints(_from);
_adjustBalanceCheckpoints(_to);
return _verifyTransfer(_from, _to, _value, _data, true);
return verified;
}

/**
Expand Down