Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove timestamps from the events #549

Merged
merged 1 commit into from
Feb 12, 2019
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions contracts/ModuleRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ contract ModuleRegistry is IModuleRegistry, EternalStorage {
//////////

// Emit when network becomes paused
event Pause(uint256 _timestammp);
event Pause(address account);
// Emit when network becomes unpaused
event Unpause(uint256 _timestamp);
event Unpause(address account);
// Emit when Module is used by the SecurityToken
event ModuleUsed(address indexed _moduleFactory, address indexed _securityToken);
// Emit when the Module Factory gets registered on the ModuleRegistry contract
Expand Down Expand Up @@ -359,7 +359,7 @@ contract ModuleRegistry is IModuleRegistry, EternalStorage {
function pause() external whenNotPaused onlyOwner {
set(Encoder.getKey("paused"), true);
/*solium-disable-next-line security/no-block-members*/
emit Pause(now);
emit Pause(msg.sender);
}

/**
Expand All @@ -368,7 +368,7 @@ contract ModuleRegistry is IModuleRegistry, EternalStorage {
function unpause() external whenPaused onlyOwner {
set(Encoder.getKey("paused"), false);
/*solium-disable-next-line security/no-block-members*/
emit Unpause(now);
emit Unpause(msg.sender);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/Pausable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ pragma solidity ^0.5.0;
* @title Utility contract to allow pausing and unpausing of certain functions
*/
contract Pausable {
event Pause(uint256 _timestammp);
event Unpause(uint256 _timestamp);
event Pause(address account);
event Unpause(address account);

bool public paused = false;

Expand All @@ -31,7 +31,7 @@ contract Pausable {
function _pause() internal whenNotPaused {
paused = true;
/*solium-disable-next-line security/no-block-members*/
emit Pause(now);
emit Pause(msg.sender);
}

/**
Expand All @@ -40,7 +40,7 @@ contract Pausable {
function _unpause() internal whenPaused {
paused = false;
/*solium-disable-next-line security/no-block-members*/
emit Unpause(now);
emit Unpause(msg.sender);
}

}
8 changes: 4 additions & 4 deletions contracts/SecurityTokenRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ contract SecurityTokenRegistry is EternalStorage, Proxy {
string constant POLY_ORACLE = "StablePolyUsdOracle";

// Emit when network becomes paused
event Pause(uint256 _timestammp);
event Pause(address account);
// Emit when network becomes unpaused
event Unpause(uint256 _timestamp);
event Unpause(address account);
// Emit when the ticker is removed from the registry
event TickerRemoved(string _ticker, uint256 _removedAt, address _removedBy);
// Emit when the token ticker expiry is changed
Expand Down Expand Up @@ -605,7 +605,7 @@ contract SecurityTokenRegistry is EternalStorage, Proxy {
function pause() external whenNotPaused onlyOwner {
set(PAUSED, true);
/*solium-disable-next-line security/no-block-members*/
emit Pause(now);
emit Pause(msg.sender);
}

/**
Expand All @@ -614,7 +614,7 @@ contract SecurityTokenRegistry is EternalStorage, Proxy {
function unpause() external whenPaused onlyOwner {
set(PAUSED, false);
/*solium-disable-next-line security/no-block-members*/
emit Unpause(now);
emit Unpause(msg.sender);
}

/**
Expand Down
12 changes: 6 additions & 6 deletions contracts/libraries/TokenLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ library TokenLib {
}

// Emit when Module is archived from the SecurityToken
event ModuleArchived(uint8[] _types, address _module, uint256 _timestamp);
event ModuleArchived(uint8[] _types, address _module);
// Emit when Module is unarchived from the SecurityToken
event ModuleUnarchived(uint8[] _types, address _module, uint256 _timestamp);
event ModuleUnarchived(uint8[] _types, address _module);
// Emit when Module get removed from the securityToken
event ModuleRemoved(uint8[] _types, address _module, uint256 _timestamp);
event ModuleRemoved(uint8[] _types, address _module);
// Emit when the budget allocated to a module is changed
event ModuleBudgetChanged(uint8[] _moduleTypes, address _module, uint256 _oldBudget, uint256 _budget);

Expand All @@ -51,7 +51,7 @@ library TokenLib {
require(!_moduleData.isArchived, "Module archived");
require(_moduleData.module != address(0), "Module missing");
/*solium-disable-next-line security/no-block-members*/
emit ModuleArchived(_moduleData.moduleTypes, _module, now);
emit ModuleArchived(_moduleData.moduleTypes, _module);
_moduleData.isArchived = true;
}

Expand All @@ -63,7 +63,7 @@ library TokenLib {
function unarchiveModule(ModuleData storage _moduleData, address _module) public {
require(_moduleData.isArchived, "Module unarchived");
/*solium-disable-next-line security/no-block-members*/
emit ModuleUnarchived(_moduleData.moduleTypes, _module, now);
emit ModuleUnarchived(_moduleData.moduleTypes, _module);
_moduleData.isArchived = false;
}

Expand All @@ -82,7 +82,7 @@ library TokenLib {
require(_modulesToData[_module].isArchived, "Not archived");
require(_modulesToData[_module].module != address(0), "Module missing");
/*solium-disable-next-line security/no-block-members*/
emit ModuleRemoved(_modulesToData[_module].moduleTypes, _module, now);
emit ModuleRemoved(_modulesToData[_module].moduleTypes, _module);
// Remove from module type list
uint8[] memory moduleTypes = _modulesToData[_module].moduleTypes;
for (uint256 i = 0; i < moduleTypes.length; i++) {
Expand Down
16 changes: 8 additions & 8 deletions contracts/modules/Checkpoint/DividendCheckpoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import "openzeppelin-solidity/contracts/math/Math.sol";
contract DividendCheckpoint is DividendCheckpointStorage, ICheckpoint, Module {
using SafeMath for uint256;

event SetDefaultExcludedAddresses(address[] _excluded, uint256 _timestamp);
event SetWithholding(address[] _investors, uint256[] _withholding, uint256 _timestamp);
event SetWithholdingFixed(address[] _investors, uint256 _withholding, uint256 _timestamp);
event SetWallet(address indexed _oldWallet, address indexed _newWallet, uint256 _timestamp);
event SetDefaultExcludedAddresses(address[] _excluded);
event SetWithholding(address[] _investors, uint256[] _withholding);
event SetWithholdingFixed(address[] _investors, uint256 _withholding);
event SetWallet(address indexed _oldWallet, address indexed _newWallet);

modifier validDividendIndex(uint256 _dividendIndex) {
require(_dividendIndex < dividends.length, "Invalid dividend");
Expand Down Expand Up @@ -63,7 +63,7 @@ contract DividendCheckpoint is DividendCheckpointStorage, ICheckpoint, Module {

function _setWallet(address payable _wallet) internal {
require(_wallet != address(0));
emit SetWallet(wallet, _wallet, now);
emit SetWallet(wallet, _wallet);
wallet = _wallet;
}

Expand Down Expand Up @@ -97,7 +97,7 @@ contract DividendCheckpoint is DividendCheckpointStorage, ICheckpoint, Module {
}
excluded = _excluded;
/*solium-disable-next-line security/no-block-members*/
emit SetDefaultExcludedAddresses(excluded, now);
emit SetDefaultExcludedAddresses(excluded);
}

/**
Expand All @@ -108,7 +108,7 @@ contract DividendCheckpoint is DividendCheckpointStorage, ICheckpoint, Module {
function setWithholding(address[] memory _investors, uint256[] memory _withholding) public withPerm(MANAGE) {
require(_investors.length == _withholding.length, "Mismatched input lengths");
/*solium-disable-next-line security/no-block-members*/
emit SetWithholding(_investors, _withholding, now);
emit SetWithholding(_investors, _withholding);
for (uint256 i = 0; i < _investors.length; i++) {
require(_withholding[i] <= 10 ** 18, "Incorrect withholding tax");
withholdingTax[_investors[i]] = _withholding[i];
Expand All @@ -123,7 +123,7 @@ contract DividendCheckpoint is DividendCheckpointStorage, ICheckpoint, Module {
function setWithholdingFixed(address[] memory _investors, uint256 _withholding) public withPerm(MANAGE) {
require(_withholding <= 10 ** 18, "Incorrect withholding tax");
/*solium-disable-next-line security/no-block-members*/
emit SetWithholdingFixed(_investors, _withholding, now);
emit SetWithholdingFixed(_investors, _withholding);
for (uint256 i = 0; i < _investors.length; i++) {
withholdingTax[_investors[i]] = _withholding;
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/modules/Experimental/Burn/TrackedRedemption.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ contract TrackedRedemption is IBurn, Module {

mapping(address => uint256) redeemedTokens;

event Redeemed(address _investor, uint256 _value, uint256 _timestamp);
event Redeemed(address _investor, uint256 _value);

/**
* @notice Constructor
Expand All @@ -37,7 +37,7 @@ contract TrackedRedemption is IBurn, Module {
ISecurityToken(securityToken).burnFromWithData(msg.sender, _value, "");
redeemedTokens[msg.sender] = redeemedTokens[msg.sender].add(_value);
/*solium-disable-next-line security/no-block-members*/
emit Redeemed(msg.sender, _value, now);
emit Redeemed(msg.sender, _value);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/modules/Experimental/Mixed/ScheduledCheckpoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ contract ScheduledCheckpoint is ICheckpoint, TransferManager {

mapping(bytes32 => Schedule) public schedules;

event AddSchedule(bytes32 _name, uint256 _startTime, uint256 _interval, uint256 _timestamp);
event RemoveSchedule(bytes32 _name, uint256 _timestamp);
event AddSchedule(bytes32 _name, uint256 _startTime, uint256 _interval);
event RemoveSchedule(bytes32 _name);

/**
* @notice Constructor
Expand Down Expand Up @@ -58,7 +58,7 @@ contract ScheduledCheckpoint is ICheckpoint, TransferManager {
schedules[_name].interval = _interval;
schedules[_name].index = names.length;
names.push(_name);
emit AddSchedule(_name, _startTime, _interval, now);
emit AddSchedule(_name, _startTime, _interval);
}

/**
Expand All @@ -74,7 +74,7 @@ contract ScheduledCheckpoint is ICheckpoint, TransferManager {
schedules[names[index]].index = index;
}
delete schedules[_name];
emit RemoveSchedule(_name, now);
emit RemoveSchedule(_name);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import "./GeneralPermissionManagerStorage.sol";
contract GeneralPermissionManager is GeneralPermissionManagerStorage, IPermissionManager, Module {

/// Event emitted after any permission get changed for the delegate
event ChangePermission(address indexed _delegate, address _module, bytes32 _perm, bool _valid, uint256 _timestamp);
event ChangePermission(address indexed _delegate, address _module, bytes32 _perm, bool _valid);
/// Used to notify when delegate is added in permission manager contract
event AddDelegate(address indexed _delegate, bytes32 _details, uint256 _timestamp);
event AddDelegate(address indexed _delegate, bytes32 _details);

/// @notice constructor
constructor(address _securityToken, address _polyToken) public Module(_securityToken, _polyToken) {
Expand Down Expand Up @@ -52,7 +52,7 @@ contract GeneralPermissionManager is GeneralPermissionManagerStorage, IPermissio
delegateDetails[_delegate] = _details;
allDelegates.push(_delegate);
/*solium-disable-next-line security/no-block-members*/
emit AddDelegate(_delegate, _details, now);
emit AddDelegate(_delegate, _details);
}

/**
Expand Down Expand Up @@ -207,7 +207,7 @@ contract GeneralPermissionManager is GeneralPermissionManagerStorage, IPermissio
function _changePermission(address _delegate, address _module, bytes32 _perm, bool _valid) internal {
perms[_module][_delegate][_perm] = _valid;
/*solium-disable-next-line security/no-block-members*/
emit ChangePermission(_delegate, _module, _perm, _valid, now);
emit ChangePermission(_delegate, _module, _perm, _valid);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract PercentageTransferManager is PercentageTransferManagerStorage, Transfer

event ModifyHolderPercentage(uint256 _oldHolderPercentage, uint256 _newHolderPercentage);
event ModifyWhitelist(address _investor, uint256 _dateAdded, address _addedBy, bool _valid);
event SetAllowPrimaryIssuance(bool _allowPrimaryIssuance, uint256 _timestamp);
event SetAllowPrimaryIssuance(bool _allowPrimaryIssuance);

/**
* @notice Constructor
Expand Down Expand Up @@ -117,7 +117,7 @@ contract PercentageTransferManager is PercentageTransferManagerStorage, Transfer
require(_allowPrimaryIssuance != allowPrimaryIssuance, "Must change setting");
allowPrimaryIssuance = _allowPrimaryIssuance;
/*solium-disable-next-line security/no-block-members*/
emit SetAllowPrimaryIssuance(_allowPrimaryIssuance, now);
emit SetAllowPrimaryIssuance(_allowPrimaryIssuance);
}

/**
Expand Down
12 changes: 6 additions & 6 deletions contracts/oracles/MakerDAOOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ contract MakerDAOOracle is IOracle, Ownable {
uint256 public manualPrice;

/*solium-disable-next-line security/no-block-members*/
event ChangeMedianizer(address _newMedianizer, address _oldMedianizer, uint256 _now);
event SetManualPrice(uint256 _oldPrice, uint256 _newPrice, uint256 _time);
event SetManualOverride(bool _override, uint256 _time);
event ChangeMedianizer(address _newMedianizer, address _oldMedianizer);
event SetManualPrice(uint256 _oldPrice, uint256 _newPrice);
event SetManualOverride(bool _override);

/**
* @notice Creates a new Maker based oracle
Expand All @@ -36,7 +36,7 @@ contract MakerDAOOracle is IOracle, Ownable {
function changeMedianier(address _medianizer) public onlyOwner {
require(_medianizer != address(0), "0x not allowed");
/*solium-disable-next-line security/no-block-members*/
emit ChangeMedianizer(_medianizer, medianizer, now);
emit ChangeMedianizer(_medianizer, medianizer);
medianizer = _medianizer;
}

Expand Down Expand Up @@ -80,7 +80,7 @@ contract MakerDAOOracle is IOracle, Ownable {
*/
function setManualPrice(uint256 _price) public onlyOwner {
/*solium-disable-next-line security/no-block-members*/
emit SetManualPrice(manualPrice, _price, now);
emit SetManualPrice(manualPrice, _price);
manualPrice = _price;
}

Expand All @@ -91,7 +91,7 @@ contract MakerDAOOracle is IOracle, Ownable {
function setManualOverride(bool _override) public onlyOwner {
manualOverride = _override;
/*solium-disable-next-line security/no-block-members*/
emit SetManualOverride(_override, now);
emit SetManualOverride(_override);
}

}
4 changes: 2 additions & 2 deletions contracts/oracles/PolyOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ contract PolyOracle is usingOraclize, IOracle, Ownable {

event PriceUpdated(uint256 _price, uint256 _oldPrice, bytes32 _queryId, uint256 _time);
event NewOraclizeQuery(uint256 _time, bytes32 _queryId, string _query);
event AdminSet(address _admin, bool _valid, uint256 _time);
event AdminSet(address _admin, bool _valid);
event StalePriceUpdate(bytes32 _queryId, uint256 _time, string _result);

modifier isAdminOrOwner() {
Expand Down Expand Up @@ -230,7 +230,7 @@ contract PolyOracle is usingOraclize, IOracle, Ownable {
function setAdmin(address _admin, bool _valid) public onlyOwner {
admin[_admin] = _valid;
/*solium-disable-next-line security/no-block-members*/
emit AdminSet(_admin, _valid, now);
emit AdminSet(_admin, _valid);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/oracles/StableOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ contract StableOracle is IOracle, Ownable {
/*solium-disable-next-line security/no-block-members*/
event ChangeOracle(address _oldOracle, address _newOracle);
event ChangeEvictPercentage(uint256 _oldEvictPercentage, uint256 _newEvictPercentage);
event SetManualPrice(uint256 _oldPrice, uint256 _newPrice, uint256 _time);
event SetManualOverride(bool _override, uint256 _time);
event SetManualPrice(uint256 _oldPrice, uint256 _newPrice);
event SetManualOverride(bool _override);

/**
* @notice Creates a new stable oracle based on existing oracle
Expand Down Expand Up @@ -96,7 +96,7 @@ contract StableOracle is IOracle, Ownable {
*/
function setManualPrice(uint256 _price) public onlyOwner {
/*solium-disable-next-line security/no-block-members*/
emit SetManualPrice(manualPrice, _price, now);
emit SetManualPrice(manualPrice, _price);
manualPrice = _price;
}

Expand All @@ -107,7 +107,7 @@ contract StableOracle is IOracle, Ownable {
function setManualOverride(bool _override) public onlyOwner {
manualOverride = _override;
/*solium-disable-next-line security/no-block-members*/
emit SetManualOverride(_override, now);
emit SetManualOverride(_override);
}

}
Loading