Skip to content
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
Empty file removed 0
Empty file.
24 changes: 11 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
# Changelog
All notable changes to this project will be documented in this file.

# v3.0.0

[__3.0.0__]

## Changed
* Changed the first three params in Security Token `event ModuleAdded()` to be indexed for search. Params are `unit8[] types`, `bytes32 _name` and `address _moduleFactory`

# v3.0.0 - Release Candidate

[__3.0.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __10-11-18__

## Added
## SecurityToken
* Added new function `addModuleWithLabel()` which takes an extra param `_label` that used for giving the customize label to the module for display purpose. #428
* Introduce new contract `STRGetter.sol`. It only contains the getter functions of the STR.

## Fixed
* Changed the first three params in Security Token `event ModuleAdded()` to be indexed for search. Params are `unit8[] types`, `bytes32 _name` and `address _moduleFactory`
* Fixed `addModule` function to be backwards compatible and call the new `addModuleWithLabel` function with an empty label.
* Fixed event `ModuleAdded` to also emit `_label`.
* Fixed function `getModule` to also return the respective module label.

## STR
* Introduce new contract `STRGetter.sol`. It only contains the getter functions of the STR.
* Replaced `updatePolyTokenAddress()` function with `updateFromRegistry()` in `SecurityTokenRegistry`.
* Migrate all the getters of `SecurityTokenRegsitry.sol` to `STRGetter.sol` contract.
* Removed `_polyToken` parameter from `initialize` function in `SecurityTokenRegistry`.

## Removed
## GeneralTransferManager
* Add `_isAccredited` variable in the `modifyWhitelist()` function of the GeneralTransferManager.

## Generalize
* Removed `_polyAddress` parameter from constructors of all modules and module factories.
* Removed `_polyToken` parameter from `initialize` function in `SecurityTokenRegistry`.


# v2.1.0 - Release Candidate

Expand Down
1 change: 1 addition & 0 deletions contracts/interfaces/IBoot.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ interface IBoot {
* @return bytes4 Configure function signature
*/
function getInitFunction() external pure returns(bytes4);

}
21 changes: 21 additions & 0 deletions contracts/libraries/VersionUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,25 @@ library VersionUtils {
return _unpackVersion;
}


/**
* @notice Used to packed the KYC data
*/
function packKYC(uint64 _a, uint64 _b, uint64 _c, uint8 _d, uint8 _e, uint8 _f) internal pure returns(uint256) {
return (uint256(_a) << 152) | (uint256(_b) << 88) | (uint256(_c) << 24) | (uint256(_d) << 16) | (uint256(_e) << 8) | uint256(_f);
}

/**
* @notice Used to convert packed data into KYC data
* @param _packedVersion Packed data
*/
function unpackKYC(uint256 _packedVersion) internal pure returns(uint64 fromTime, uint64 toTime, uint64 expiryTime, uint8 canBuy, uint8 added, uint8 accredited) {
fromTime = uint64(_packedVersion >> 152);
toTime = uint64(_packedVersion >> 88);
expiryTime = uint64(_packedVersion >> 24);
canBuy = uint8(_packedVersion >> 16);
added = uint8(_packedVersion >> 8);
accredited = uint8(_packedVersion);
}

}
1 change: 0 additions & 1 deletion contracts/modules/Checkpoint/DividendCheckpoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pragma solidity ^0.5.0;
import "./ICheckpoint.sol";
import "./DividendCheckpointStorage.sol";
import "../Module.sol";
import "../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/math/Math.sol";

Expand Down
1 change: 0 additions & 1 deletion contracts/modules/Experimental/Burn/TrackedRedemption.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pragma solidity ^0.5.0;

import "../../Burn/IBurn.sol";
import "../../Module.sol";
import "../../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pragma solidity ^0.5.0;

import "./../../Checkpoint/ICheckpoint.sol";
import "../../TransferManager/TransferManager.sol";
import "../../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma solidity ^0.5.0;

import "../../TransferManager/TransferManager.sol";
import "../../../interfaces/IDataStore.sol";
import "../../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
pragma solidity ^0.5.0;

import "../../TransferManager/TransferManager.sol";
import "../../../interfaces/IDataStore.sol";
import "../../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/cryptography/ECDSA.sol";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "../../../storage/VestingEscrowWalletStorage.sol";
import "./IWallet.sol";
import "../../../interfaces/ISecurityToken.sol";

/**
* @title Wallet for core vesting escrow functionality
Expand Down
8 changes: 7 additions & 1 deletion contracts/modules/Module.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
pragma solidity ^0.5.0;

import "./ModuleStorage.sol";
import "../interfaces/IModule.sol";
import "../interfaces/IDataStore.sol";
import "../interfaces/ISecurityToken.sol";
import "../interfaces/ICheckPermission.sol";
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "./ModuleStorage.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";

/**
Expand Down Expand Up @@ -58,4 +60,8 @@ contract Module is IModule, ModuleStorage {
require(polyToken.transferFrom(securityToken, Ownable(factory).owner(), _amount), "Unable to take fee");
return true;
}

function getDataStore() public view returns(address) {
return ISecurityToken(securityToken).dataStore();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pragma solidity ^0.5.0;
import "./IPermissionManager.sol";
import "../Module.sol";
import "./GeneralPermissionManagerStorage.sol";
import "../../interfaces/ISecurityToken.sol";

/**
* @title Permission Manager module for core permissioning functionality
Expand Down
1 change: 0 additions & 1 deletion contracts/modules/STO/CappedSTO.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma solidity ^0.5.0;

import "./STO.sol";
import "../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "./CappedSTOStorage.sol";
Expand Down
3 changes: 1 addition & 2 deletions contracts/modules/STO/DummySTO.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma solidity ^0.5.0;

import "./STO.sol";
import "../../interfaces/ISecurityToken.sol";
import "./DummySTOStorage.sol";

/**
Expand Down Expand Up @@ -37,7 +36,7 @@ contract DummySTO is DummySTOStorage, STO {
* @notice This function returns the signature of configure function
*/
function getInitFunction() public pure returns(bytes4) {
return bytes4(keccak256("configure(uint256,uint256,uint256,string)"));
return this.configure.selector;
}

/**
Expand Down
1 change: 0 additions & 1 deletion contracts/modules/STO/PreSaleSTO.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma solidity ^0.5.0;

import "./STO.sol";
import "../../interfaces/ISecurityToken.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "./PreSaleSTOStorage.sol";

Expand Down
1 change: 0 additions & 1 deletion contracts/modules/STO/USDTieredSTO.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pragma solidity ^0.5.0;

import "./STO.sol";
import "../../interfaces/ISecurityToken.sol";
import "../../interfaces/IOracle.sol";
import "../../RegistryUpdater.sol";
import "../../libraries/DecimalMath.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/modules/TransferManager/CountTransferManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ pragma solidity ^0.5.0;

import "./TransferManager.sol";
import "./CountTransferManagerStorage.sol";
import "../../interfaces/ISecurityToken.sol";

/**
* @title Transfer Manager for limiting maximum number of token holders
Expand Down
Loading