Skip to content

Commit

Permalink
Merge pull request #627 from PolymathNetwork/dev2-to-master
Browse files Browse the repository at this point in the history
Dev-2.1.0 to master
  • Loading branch information
pabloruiz55 committed Apr 5, 2019
2 parents 28a77af + 6470391 commit 236e2a3
Show file tree
Hide file tree
Showing 167 changed files with 22,463 additions and 8,855 deletions.
38 changes: 31 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,51 @@ jobs:
path: ./test-results/mocha/results.xml
coverage:
docker:
- image: circleci/node:8
- image: maxsam4/solidity-kit:0.4.24
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: yarn install
- run: sudo npm i truffle -g
- run: node --version
- run: truffle version
- run: node_modules/.bin/truffle version
- run:
command: npm run coverage
command: scripts/coverage.sh
no_output_timeout: 1h
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- store_artifacts:
path: ./coverage/lcov.info
docs:
deploy_kovan:
docker:
- image: maxsam4/solidity-kit:0.4.24
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: yarn install
- run: wget -O node_modules/solidity-docgen/lib/index.js https://raw.githubusercontent.com/maxsam4/solidity-docgen/build/lib/index.js
- run: node --version
- run: truffle version
- run: git config --global user.email "contact@mudit.blog"
- run: git config --global user.name "Docs Bot"
- run: mv truffle-ci.js truffle-config.js
- run: npm run deploy-kovan
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
docs:
docker:
- image: circleci/node:8
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: yarn install
- run: sudo npm i truffle -g
- run: node --version
- run: truffle version
- run: npm run docs
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
Expand Down Expand Up @@ -100,3 +114,13 @@ workflows:
branches:
only:
- master
deploy:
jobs:
- deploy_kovan:
filters:
branches:
only:
- master
- dev-2.1.0
- dev-2.2.0
- dev-3.0.0
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module.exports = {
"quotes": 0,
"semi": 0,
"no-undef": 0,
"key-spacing": 0
"key-spacing": 0,
"no-tabs": 0,
"no-mixed-spaces-and-tabs":0
}
};
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ allFiredEvents
extract/
extract.py
extract.zip
/test-results
/test-results
4 changes: 2 additions & 2 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = {
norpc: true,
port: 8545,
copyPackages: ['openzeppelin-solidity'],
testCommand: 'node ../node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js` --network coverage',
testCommand: 'node ../node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js -and ! -name q_usd_tiered_sto_sim.js -and ! -name z_general_permission_manager_fuzzer.js` --network coverage',
deepSkip: true,
skipFiles: ['external', 'flat', 'helpers', 'mocks', 'oracles', 'libraries/KindMath.sol', 'storage', 'modules/Experimental'],
skipFiles: ['external', 'flat', 'helpers', 'mocks', 'oracles', 'libraries/KindMath.sol', 'libraries/BokkyPooBahsDateTimeLibrary.sol', 'storage', 'modules/Experimental'],
forceParse: ['mocks', 'oracles', 'modules/Experimental']
};
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
include:
- stage: test
before_script: truffle version
script: npm run test
script: travis_wait 120 sleep infinity & npm run test
notifications:
slack:
secure: W4FZSabLrzF74f317hutolEHnlq2GBlQxU6b85L5XymrjgLEhlgE16c5Qz7Emoyt6le6PXL+sfG2ujJc3XYys/6hppgrHSAasuJnKCdQNpmMZ9BNyMs6WGkmB3enIf3K/FLXb26AQdwpQdIXuOeJUTf879u+YoiZV0eZH8d3+fsIOyovq9N6X5pKOpDM9iT8gGB4t7fie7xf51s+iUaHxyO9G7jDginZ4rBXHcU7mxCub9z+Z1H8+kCTnPWaF+KKVEXx4Z0nI3+urboD7E4OIP02LwrThQls2CppA3X0EoesTcdvj/HLErY/JvsXIFiFEEHZzB1Wi+k2TiOeLcYwEuHIVij+HPxxlJNX/j8uy01Uk8s4rd+0EhvfdKHJqUKqxH4YN2npcKfHEss7bU3y7dUinXQfYShW5ZewHdvc7pnnxBTfhvmdi64HdNrXAPq+s1rhciH7MmnU+tsm4lhrpr+FBuHzUMA9fOCr7b0SQytZEgWpiUls88gdbh3yG8TjyZxmZJGx09cwEP0q7VoH0UwFh7mIu5XmYdd5tWUhavTiO7YV8cUPn7MvwMsTltB3YBpF/fB26L7ka8zBhCsjm9prW6SVYU/dyO3m91VeZtO/zJFHRDA6Q58JGVW2rgzO39z193qC1EGRXqTie96VwAAtNg8+hRb+bI/CWDVzSPc=
90 changes: 81 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,87 @@
# Changelog
All notable changes to this project will be documented in this file.

# v2.1.0 - Release Candidate

[__2.1.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-089-18__
# v2.1.0 - Release Candidate

[__2.1.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-09-18__


## CappedSTO 2.1.0
* `rate` is now accepted as multiplied by 10^18 to allow settting higher price than 1ETH/POLY per token.
* Indivisble tokens are now supported. When trying to buy partial tokens, allowed full units of tokens will be purchased and remaining funds will be returned.

## USDTieredSTO 2.1.0
* Added `stableCoinsRaised` function that returns amount of individual stable coin raised when address of that stable coin is passed.
* Added support for multiple stable coins in USDTSTO.
* Added `buyTokensView` and `getTokensMintedByTier` to USDTSTO.
* Added `getSTODetails` to USDTSTO.
* Added an Array of Tiers that will hold data about every tier in USDTSTO.
* Added `buyWithETHRateLimited`, `buyWithPOLYRateLimited` and `buyWithUSDRateLimited` to USDTSTO.
* Added `getTokensSoldByTier` to return sold (not minted during finalisation) tokens in each tier to USDTSTO.
* Removed individual mappings for tier data removed in UDSTSTO.
* Removed the old Proxy deployment method of USDTieredSTO and adopt the new inherited proxy deployment approach.
* Bump the version to `2.1.0`
* Added `getAccreditedData` to return accredited & non-accredited investor data.
* Event `TokenPurchase` has uint256 tier instead of uint8 tier.
* Event `SetAddresses` has non-indexed array of address of `_usdTokens` rather than single indexed address.
* Added `getUsdTokens()` function that returns array of accepted stable coin (usd token) addresses.
* Pass an array of `_usdToken` address in `configure` function instead of singleton address. This will require changes in bytes data generation when deploying a usdtsto through factory.

## GeneralTransferManager
* `getInvestors`, `getAllInvestorsData`, `getInvestorsData` added to GTM to allow easy data queries.
* `changeDefaults(uint64 _defaultFromTime, uint64 _defaultToTime)` added which sets a default timestamp used when `fromTime` or `toTime` are 0.
* Add `address[] public investors` to record a list of all addresses that have been added to the whitelist (`getInvestors`).
* Fix for when `allowAllWhitelistIssuances` is FALSE
* Make GTM a Proxy based implementation to reduce deployment gas costs
* Changed the version of `GeneralTransferManagerFactory` from `1.0.0` to `2.1.0`.
* `_investor` and `_addedBy` is now indexed in the `ModifyWhitelist` event.
* Add public variable `defaults` to get the offset timing.

## Manual Approval TransferManager
* Removed `0x0` check for the `_from` address to `ManualApprovalTransferManager`. This allows for the Issuer/Transfer Agent to approve a one-off mint of tokens that otherwise would not be possible.
* Changed the version of `ManualApprovalTransferManagerFactory` from `1.0.0` to `2.0.1`.
* Removed `0x0` check for the `_from` address to `ManualApprovalTransferManager`. This allows for the Issuer/Transfer Agent to approve a one-off mint of tokens that otherwise would not be possible.
* Changed the version of `ManualApprovalTransferManagerFactory` from `1.0.0` to `2.1.0`.
* Deployed 2.0.1 `ManualApprovalTransferManagerFactory` to address 0x6af2afad53cb334e62b90ddbdcf3a086f654c298
* Add `getActiveApprovalsToUser()` function to access all the active approvals for a user whether user is in the `from` or in `to`.
* Add `getApprovalDetails()` to get the details of the approval corresponds to `_from` and `_to` address.
* Add feature to modify the details of the active approval using `modifyApproval()` & `modifyApprovalMulti()`.
* Add `addManualApprovalMulti()` and `revokeManualApprovalMulti()` batch function for adding and revoking the manual approval respectively.
* Add `_description` parameter during the `addManualApproval()` function call. It will be a `bytes32` variable which depicts the cause of manual approval.
* Remove `addManualBlocking()` , `revokeManualBlocking()` functions.
* Add `getTotalApprovalsLength()` to get the number of active approvals.
* Add `getAllApprovals()` to get the details of all approvals.

## Dividends
* Changed the version of `ERC20DividendCheckpointFactory` & `EtherDividendCheckpointFactory` from `1.0.0` to `2.1.0`.
* Applied proxy pattern to Dividends modules.
* During the launch of dividend module issuer need to pass the reclaimed wallet that receive the left over funds from the module.
i.e pass `_wallet` in `configure()` function of dividend module. It emits `SetWallet` event for the confirmation of the same.
* Add `changeWallet()` function to change the reclaimed wallet address (only be called by the owner).
* Add `getDividendsData()` getter to receive the details about all the dividend.
* Add `getDividendData()` getter to receive the details about the particular dividend by passing a corresponding dividend index.
* Add `getDividendProgress()` getter to retrieves the list of investors and their details corresponds to particular dividend.
* Add `getCheckpointData()` use to retrieves list of investors, their balances, and their current withholding tax percentage corresponds to checkpointId.
* `isExcluded()` a view function added to check whether an address is excluded from claming a dividend or not.
* `isClaimed()` a view function added to checks whether an address has claimed a dividend or not.
* DividendIndex is indexed in the events `ERC20DividendClaimed`, `ERC20DividendReclaimed`, `ERC20DividendWithholdingWithdrawn`. Similarly for the Ether dividend module `EtherDividendClaimed`, `EtherDividendReclaimed`, `EtherDividendClaimFailed`, `EtherDividendWithholdingWithdrawn`.
* `EXCLUDED_ADDRESS_LIMIT` changed from 50 to 150.

## Experimental modules
* Remove the `SingleTradeVolumeRestrictionTMFactory.sol` and its corresponding module `SingleTradeVolumeRestrictionTM.sol`.
* Add the new TM called `BlacklistTransferManager.sol` and its corresponding factory `BlacklistTransferManagerFactory.sol`.
* Chnage the name of module from `LockupVolumeRestrictionTM.sol` to `LockUpTransferManager.sol`, similarly factory become `LockUpTransferManagerFactory.sol`.
* Add new module called `VestingEscrowWallet.sol` and its corresponding factory `VestingEscrowWalletFactory.sol`.

## STR & MR
* `getArrayAddress(), getArrayBytes32(), getArrayUint()` are now public getters.
* `getUintValues(), getBoolValues(), getStringValues(), getAddressValues(), getBytes32Values(), getBytesValues()` rename to `getUintValue(), getBoolValue(), getStringValue(), getAddressValue(), getBytes32Value(), getBytesValue()`. #488

## Added
* Add new module called `VolumeRestrictionTM.sol` under the TransferManager modules list. It will be used to restrict the token
volume traded in a given rolling period.

## Changed
* `getAllModulesAndPermsFromTypes()` does not take securityToken address as a parameter anymore.


# v1.5.0 - Release Candidate

Expand Down Expand Up @@ -43,7 +116,6 @@ All notable changes to this project will be documented in this file.
* Add new function `modifyTickerDetails()`, To modify the details of undeployed ticker. #230

## Fixed
* `getAllModulesAndPermsFromTypes()` does not take securityToken address as a parameter anymore.
* 0x0 and duplicate address in exclusions are no longer allowed in dividend modules.
* All permissions are denied if no permission manager is active.
* Generalize the STO varaible names and added them in `ISTO.sol` to use the common standard in all STOs.
Expand All @@ -54,11 +126,11 @@ All notable changes to this project will be documented in this file.
* Removed investors list pruning
* Remove `swarmHash` from the `registerTicker(), addCustomTicker(), generateSecurityToken(), addCustomSecurityToken()` functions of TickerRegistry.sol and SecurityTokenRegistry.sol. #230
* Remove `Log` prefix from all the event present in the ecosystem.
* Removed `addTagByModuleType` & `removeTagsByModuleType` from MR.
* Removed `addTagByModuleType` & `removeTagsByModuleType` from MR.

======

# v1.4.1 - Release Candidate
# v1.4.1

[__1.4.1__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-08-18__

Expand All @@ -82,7 +154,7 @@ All notable changes to this project will be documented in this file.
* Fix #238: make beneficial investments optionally supported (default to not
allowed)

# v1.4.0 - Release candidate
# v1.4.0

[__1.4.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-08-18__

Expand Down

0 comments on commit 236e2a3

Please sign in to comment.