Skip to content

Commit 236e2a3

Browse files
authored
Merge pull request #627 from PolymathNetwork/dev2-to-master
Dev-2.1.0 to master
2 parents 28a77af + 6470391 commit 236e2a3

File tree

167 files changed

+22463
-8855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+22463
-8855
lines changed

.circleci/config.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,37 +39,51 @@ jobs:
3939
path: ./test-results/mocha/results.xml
4040
coverage:
4141
docker:
42-
- image: circleci/node:8
42+
- image: maxsam4/solidity-kit:0.4.24
4343
steps:
4444
- checkout
4545
- restore_cache:
4646
key: dependency-cache-{{ checksum "package.json" }}
4747
- run: yarn install
48-
- run: sudo npm i truffle -g
4948
- run: node --version
5049
- run: truffle version
50+
- run: node_modules/.bin/truffle version
5151
- run:
52-
command: npm run coverage
52+
command: scripts/coverage.sh
5353
no_output_timeout: 1h
5454
- save_cache:
5555
key: dependency-cache-{{ checksum "package.json" }}
5656
paths:
5757
- node_modules
5858
- store_artifacts:
5959
path: ./coverage/lcov.info
60-
docs:
60+
deploy_kovan:
6161
docker:
6262
- image: maxsam4/solidity-kit:0.4.24
6363
steps:
6464
- checkout
6565
- restore_cache:
6666
key: dependency-cache-{{ checksum "package.json" }}
6767
- run: yarn install
68-
- run: wget -O node_modules/solidity-docgen/lib/index.js https://raw.githubusercontent.com/maxsam4/solidity-docgen/build/lib/index.js
6968
- run: node --version
7069
- run: truffle version
71-
- run: git config --global user.email "contact@mudit.blog"
72-
- run: git config --global user.name "Docs Bot"
70+
- run: mv truffle-ci.js truffle-config.js
71+
- run: npm run deploy-kovan
72+
- save_cache:
73+
key: dependency-cache-{{ checksum "package.json" }}
74+
paths:
75+
- node_modules
76+
docs:
77+
docker:
78+
- image: circleci/node:8
79+
steps:
80+
- checkout
81+
- restore_cache:
82+
key: dependency-cache-{{ checksum "package.json" }}
83+
- run: yarn install
84+
- run: sudo npm i truffle -g
85+
- run: node --version
86+
- run: truffle version
7387
- run: npm run docs
7488
- save_cache:
7589
key: dependency-cache-{{ checksum "package.json" }}
@@ -100,3 +114,13 @@ workflows:
100114
branches:
101115
only:
102116
- master
117+
deploy:
118+
jobs:
119+
- deploy_kovan:
120+
filters:
121+
branches:
122+
only:
123+
- master
124+
- dev-2.1.0
125+
- dev-2.2.0
126+
- dev-3.0.0

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ module.exports = {
1414
"quotes": 0,
1515
"semi": 0,
1616
"no-undef": 0,
17-
"key-spacing": 0
17+
"key-spacing": 0,
18+
"no-tabs": 0,
19+
"no-mixed-spaces-and-tabs":0
1820
}
1921
};

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ allFiredEvents
2323
extract/
2424
extract.py
2525
extract.zip
26-
/test-results
26+
/test-results

.solcover.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ module.exports = {
22
norpc: true,
33
port: 8545,
44
copyPackages: ['openzeppelin-solidity'],
5-
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',
5+
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',
66
deepSkip: true,
7-
skipFiles: ['external', 'flat', 'helpers', 'mocks', 'oracles', 'libraries/KindMath.sol', 'storage', 'modules/Experimental'],
7+
skipFiles: ['external', 'flat', 'helpers', 'mocks', 'oracles', 'libraries/KindMath.sol', 'libraries/BokkyPooBahsDateTimeLibrary.sol', 'storage', 'modules/Experimental'],
88
forceParse: ['mocks', 'oracles', 'modules/Experimental']
99
};

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
include:
99
- stage: test
1010
before_script: truffle version
11-
script: npm run test
11+
script: travis_wait 120 sleep infinity & npm run test
1212
notifications:
1313
slack:
1414
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=

CHANGELOG.md

Lines changed: 81 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,87 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4-
# v2.1.0 - Release Candidate
5-
6-
[__2.1.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-089-18__
4+
# v2.1.0 - Release Candidate
5+
6+
[__2.1.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-09-18__
7+
8+
9+
## CappedSTO 2.1.0
10+
* `rate` is now accepted as multiplied by 10^18 to allow settting higher price than 1ETH/POLY per token.
11+
* 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.
12+
13+
## USDTieredSTO 2.1.0
14+
* Added `stableCoinsRaised` function that returns amount of individual stable coin raised when address of that stable coin is passed.
15+
* Added support for multiple stable coins in USDTSTO.
16+
* Added `buyTokensView` and `getTokensMintedByTier` to USDTSTO.
17+
* Added `getSTODetails` to USDTSTO.
18+
* Added an Array of Tiers that will hold data about every tier in USDTSTO.
19+
* Added `buyWithETHRateLimited`, `buyWithPOLYRateLimited` and `buyWithUSDRateLimited` to USDTSTO.
20+
* Added `getTokensSoldByTier` to return sold (not minted during finalisation) tokens in each tier to USDTSTO.
21+
* Removed individual mappings for tier data removed in UDSTSTO.
22+
* Removed the old Proxy deployment method of USDTieredSTO and adopt the new inherited proxy deployment approach.
23+
* Bump the version to `2.1.0`
24+
* Added `getAccreditedData` to return accredited & non-accredited investor data.
25+
* Event `TokenPurchase` has uint256 tier instead of uint8 tier.
26+
* Event `SetAddresses` has non-indexed array of address of `_usdTokens` rather than single indexed address.
27+
* Added `getUsdTokens()` function that returns array of accepted stable coin (usd token) addresses.
28+
* 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.
29+
30+
## GeneralTransferManager
31+
* `getInvestors`, `getAllInvestorsData`, `getInvestorsData` added to GTM to allow easy data queries.
32+
* `changeDefaults(uint64 _defaultFromTime, uint64 _defaultToTime)` added which sets a default timestamp used when `fromTime` or `toTime` are 0.
33+
* Add `address[] public investors` to record a list of all addresses that have been added to the whitelist (`getInvestors`).
34+
* Fix for when `allowAllWhitelistIssuances` is FALSE
35+
* Make GTM a Proxy based implementation to reduce deployment gas costs
36+
* Changed the version of `GeneralTransferManagerFactory` from `1.0.0` to `2.1.0`.
37+
* `_investor` and `_addedBy` is now indexed in the `ModifyWhitelist` event.
38+
* Add public variable `defaults` to get the offset timing.
739

840
## Manual Approval TransferManager
9-
* 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.
10-
* Changed the version of `ManualApprovalTransferManagerFactory` from `1.0.0` to `2.0.1`.
41+
* 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.
42+
* Changed the version of `ManualApprovalTransferManagerFactory` from `1.0.0` to `2.1.0`.
1143
* Deployed 2.0.1 `ManualApprovalTransferManagerFactory` to address 0x6af2afad53cb334e62b90ddbdcf3a086f654c298
44+
* Add `getActiveApprovalsToUser()` function to access all the active approvals for a user whether user is in the `from` or in `to`.
45+
* Add `getApprovalDetails()` to get the details of the approval corresponds to `_from` and `_to` address.
46+
* Add feature to modify the details of the active approval using `modifyApproval()` & `modifyApprovalMulti()`.
47+
* Add `addManualApprovalMulti()` and `revokeManualApprovalMulti()` batch function for adding and revoking the manual approval respectively.
48+
* Add `_description` parameter during the `addManualApproval()` function call. It will be a `bytes32` variable which depicts the cause of manual approval.
49+
* Remove `addManualBlocking()` , `revokeManualBlocking()` functions.
50+
* Add `getTotalApprovalsLength()` to get the number of active approvals.
51+
* Add `getAllApprovals()` to get the details of all approvals.
52+
53+
## Dividends
54+
* Changed the version of `ERC20DividendCheckpointFactory` & `EtherDividendCheckpointFactory` from `1.0.0` to `2.1.0`.
55+
* Applied proxy pattern to Dividends modules.
56+
* During the launch of dividend module issuer need to pass the reclaimed wallet that receive the left over funds from the module.
57+
i.e pass `_wallet` in `configure()` function of dividend module. It emits `SetWallet` event for the confirmation of the same.
58+
* Add `changeWallet()` function to change the reclaimed wallet address (only be called by the owner).
59+
* Add `getDividendsData()` getter to receive the details about all the dividend.
60+
* Add `getDividendData()` getter to receive the details about the particular dividend by passing a corresponding dividend index.
61+
* Add `getDividendProgress()` getter to retrieves the list of investors and their details corresponds to particular dividend.
62+
* Add `getCheckpointData()` use to retrieves list of investors, their balances, and their current withholding tax percentage corresponds to checkpointId.
63+
* `isExcluded()` a view function added to check whether an address is excluded from claming a dividend or not.
64+
* `isClaimed()` a view function added to checks whether an address has claimed a dividend or not.
65+
* DividendIndex is indexed in the events `ERC20DividendClaimed`, `ERC20DividendReclaimed`, `ERC20DividendWithholdingWithdrawn`. Similarly for the Ether dividend module `EtherDividendClaimed`, `EtherDividendReclaimed`, `EtherDividendClaimFailed`, `EtherDividendWithholdingWithdrawn`.
66+
* `EXCLUDED_ADDRESS_LIMIT` changed from 50 to 150.
67+
68+
## Experimental modules
69+
* Remove the `SingleTradeVolumeRestrictionTMFactory.sol` and its corresponding module `SingleTradeVolumeRestrictionTM.sol`.
70+
* Add the new TM called `BlacklistTransferManager.sol` and its corresponding factory `BlacklistTransferManagerFactory.sol`.
71+
* Chnage the name of module from `LockupVolumeRestrictionTM.sol` to `LockUpTransferManager.sol`, similarly factory become `LockUpTransferManagerFactory.sol`.
72+
* Add new module called `VestingEscrowWallet.sol` and its corresponding factory `VestingEscrowWalletFactory.sol`.
73+
74+
## STR & MR
75+
* `getArrayAddress(), getArrayBytes32(), getArrayUint()` are now public getters.
76+
* `getUintValues(), getBoolValues(), getStringValues(), getAddressValues(), getBytes32Values(), getBytesValues()` rename to `getUintValue(), getBoolValue(), getStringValue(), getAddressValue(), getBytes32Value(), getBytesValue()`. #488
77+
78+
## Added
79+
* Add new module called `VolumeRestrictionTM.sol` under the TransferManager modules list. It will be used to restrict the token
80+
volume traded in a given rolling period.
81+
82+
## Changed
83+
* `getAllModulesAndPermsFromTypes()` does not take securityToken address as a parameter anymore.
84+
1285

1386
# v1.5.0 - Release Candidate
1487

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

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

59131
======
60132

61-
# v1.4.1 - Release Candidate
133+
# v1.4.1
62134

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

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

85-
# v1.4.0 - Release candidate
157+
# v1.4.0
86158

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

0 commit comments

Comments
 (0)