Skip to content

Commit 745747d

Browse files
authored
2.2.0 merge into 3.0.0 (#473)
* Update n_security_token_registry.js * mainnet 2.0.0 registry address * mainnet addresses * Added internal nonce management * nonce tracking fixed * minNonce fixed * Nonce not BN * None init fixed * strMigrator mainnet fixes * Send function fixed * await Optimizations * Skip token deployment if the ST address is known * migrator fixes * Function modifier changes * Minimum investment logic change * Only tickers option * Possibility to skip tickers * Fix * removing CLI from README * Merge remote-tracking branch 'origin/dev-2.1.0' into CLI-st20generator-refactoring * Whitelist refactor * Updated documentation * minor fix * ignore the certificate * Allow unauthenticated repos * Removed travis before install * Configuration by factory allowed only once * Multi mint refactor * Accredit refactor * token_manager command * Non accredited limit refactor + delete old files and packages dependencies * sto_manager command * Support for indivisible tokens * bug fix * test cases for divible token capped STO * CSV sync & ST20generator fix * Updated CLI introduction and link to wiki * Add getTokensSoldByTier * Improvements over mint tokens (parseFloat for divisible tokens) * fixed issue with CLI and added more flattener commands * Update changelog * Typo * readme update * Final CSV refactor * Uploaded Solidified's 2.0.0 auditreport * replaced audit report for 2.0.0 * Added helper view functions * Updated gitignore * Bug fix * Updated changelog * Added test cases * Minor fix * CLI changes for new USDTieredSTO changes * Add transferOwnership to MR (#425) * Add transferOwnership to MR * New test case * added new MR/STR proxy addresses to readme * Typo fix Co-Authored-By: maxsam4 <guptamudit@ymail.com> * Allow 0x transfers for MATM * Fix typo * Add support to remote nodes * sto_manager improvements * Minor improvements * Get configure function from ABI * Flow changes * Skip emiting event when no tokens purchased * typo fix * dev-2.1.0 changes * General fixes * Minor fixes * Revert "STRV TM added to migration script" This reverts commit d7e97bb. * Update CHANGELOG.md * updated description for cappedSTO * fix test * Minor fix * MATM to master (#435) * Allow 0x transfers for MATM * Fix typo * changelog updated and MATM version changed * Update CHANGELOG.md * fixed MATM test w/ version change * Linter fixes * Optimise GTM (#433) - Add an Offset that can be used to move all from & to dates forwards or backwards by a fixed offset. - Add address[] public investors to record a list of all addresses that have been added to the whitelist - Fix for when allowAllWhitelistIssuances is FALSE - Clearer logic around toTime, fromTime & expiryTime - Make GTM a Proxy based implementation to reduce deployment gas costs * 2.0.1 MATM deployed to mainnet * Revert "Optimise GTM (#433)" (#436) This reverts commit 42e4a78. * Update README.md * MATM CLI support * TokenInfo scripts update * add new core 2.0.0 diagram to readme * Rate changed * changelog updated * Updated tests for rate changes * Issuance test fixed * test cases updated * resolve conflicts in changelog * resolve conflicts in readme * Update README.md * fixed link on readme * Minor fixes * minor fix in readme to reset the MATM * update readme.md Updated from introduction to core up until setting up polymath core * Updated comments * Allow to add TM modules from token_manager * Whitelist from csv fix * Deleted network variable * CLI - Fix at removing modules * CLI - Fix on exit at token selection * CLI - Support for not integer rates on CappedSTO * CLI - Minor fix * fixing audit change request from Mudit * Update script fetch correct solc version * moving multi mint to token manager * replace multi mint to token manager method in cli menu * moving accredit to sto manager file * moving accreditable and nonAccreditable to STO manager * Count transfer manager * Percentage transfer manager * Added docs generation to CI * Path fix * script fix * Testing travis * Testing travis * Testing travis * Testing travis * Testing travis * Testing travis * Testing travis * whitelist to transfer manager * added test cases for adding new holders and removing one at the same time when it is already full. * Update script fetch correct solc version * Added docs generation to CI * Path fix * script fix * Solved merge conflict * Testing travis * Testing travis * Testing travis * Testing travis * Testing travis * Testing travis * WIP * CSV parser * Data folder reorganization * Refactoring and improvements * STO manager refactoring for batch operations * Transfer manager refactoring for batches * Fix * Multi mint in batches * Fuzz test permissions manager module (#395) * count transfer manager module fuzz testfinished * fuzz test for general transfer manager * fuzz tests updates * permission manager fuzzer volumn restriction transfer manager * mint token err * minting issue * fixing some testsing issuesss * all done * fixed cleaning up and commenting of the fuzz test codes * fixed conflict and merged new development functions, deleted all code with STVRTM. * get rid of test for STVTM * adding back missing file * get rid of STVR test * Delete x_single_trade_volume_restriction.js * deleted unused code :( * modifyWhitelistMulti for PercentageTM * adjust test cases for adding and removing holders at the same time when max holder amount is full * Bump the version * adjust test logic * Optimise GTM (#443) * WIP * WIP * Fixes * Update config * Log gas for 50 txs * WIP * update * Fix tests * Fix typo * Change onWhitelist logic * Update changelog * Update all test cases * Add whitelist optimization * Make Dividend modules proxies * Updates * minor cleanup * make script dynamic * Keep ABI constant * Fixes * Update change log * Updates * add require statement in factory constructors * remove the test cases for the STVRTM * Return investor data in getAllInvestorsData * CLI changes according GTM optimizations * Bump versions * version changes * Update CHANGELOG.md * Merged conflicts with master on the CLI * Merge fix * change the type of proxy deployment for USDTieredSTO * Time travel on development network * Fix jump a period of time * bump the version * Show total investors and current percentage ownership at transfer * Modules available are read from ModuleRegistry * Removed sim and fuzz tests from coverage * Time traveling fixes * Add DateTimeLibrary * Error message * Skip DateTime library in code coverage * Update CHANGELOG.md * Update CHANGELOG.md * Fix rounding off errors (#467) * Fixed rounding off errors * Increased tolerance * Reduced tolerance to zero * Comment updated * Tolerance set to 2 * Remove unused contract * Fix test cases * Fix typo * More test fixes * Fix fuzz tests
1 parent 7d8728c commit 745747d

File tree

127 files changed

+7752
-5058
lines changed

Some content is hidden

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

127 files changed

+7752
-5058
lines changed

.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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ package-lock.json
1919
bridge.log
2020
.node-xml*
2121
.solcover.js.bk
22-
allFiredEvents
22+
allFiredEvents
23+
extract/
24+
extract.py
25+
extract.zip

.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: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,22 @@ cache:
66
- node_modules
77
matrix:
88
fast_finish: true
9-
before_install:
10-
- echo -ne '\n' | sudo add-apt-repository ppa:ethereum/ethereum
11-
- sudo apt-get -y update
12-
- sudo apt-get -y install solc
13-
before_script:
14-
- truffle version
15-
- wget -O node_modules/solidity-coverage/lib/app.js https://raw.githubusercontent.com/maxsam4/solidity-coverage/relative-path/lib/app.js
16-
script:
17-
- npm run test
9+
allow_failures:
10+
- env: 'TASK=docs'
11+
jobs:
12+
include:
13+
- stage: Tests and Coverage
14+
after_install: wget -O node_modules/solidity-coverage/lib/app.js https://raw.githubusercontent.com/maxsam4/solidity-coverage/relative-path/lib/app.js
15+
before_script: truffle version
16+
script: npm run test
17+
- stage: Docs
18+
env: 'TASK=docs'
19+
before_install:
20+
- echo -ne '\n' | sudo apt-add-repository -y ppa:hvr/z3
21+
- sudo apt-get -y update
22+
- sudo apt-get -y install libz3-dev
23+
before_script: wget -O node_modules/solidity-docgen/lib/index.js https://raw.githubusercontent.com/maxsam4/solidity-docgen/buffer-size/lib/index.js
24+
script: npm run docs
1825
notifications:
1926
slack:
20-
secure: W4FZSabLrzF74f317hutolEHnlq2GBlQxU6b85L5Xym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Pq+s1rhciH7MmnU+tsm4lhrpr+FBuHzUMA9fOCr7b0SQytZEgWpiUls88gdbh3yG8TjyZxmZJGx09cwEP0q7VoH0UwFh7mIu5XmYdd5tWUhavTiO7YV8cUPn7MvwMsTltB3YBpF/fB26L7ka8zBhCsjm9prW6SVYU/dyO3m91VeZtO/zJFHRDA6Q58JGVW2rgzO39z193qC1EGRXqTie96VwAAtNg8+hRb+bI/CWDVzSPc=

CHANGELOG.md

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,52 @@ All notable changes to this project will be documented in this file.
99
* Added new function `addModuleWithLabel()` which takes an extra param `_label` that used for giving the customize label to the module for display purpose. #428
1010

1111
## Fixed
12-
* Fixed `addModule` function to be backwards compatible and call the new `addModuleWithLabel` function with an empty label.
12+
* Fixed `addModule` function to be backwards compatible and call the new `addModuleWithLabel` function with an empty label.
1313
* Fixed event `ModuleAdded` to also emit `_label`.
1414
* Fixed function `getModule` to also return the respective module label.
1515
* Replaced `updatePolyTokenAddress()` function with `updateFromRegistry()` in `SecurityTokenRegistry`.
1616

1717
## Removed
1818
* Removed `_polyAddress` parameter from constructors of all modules and module factories.
1919
* Removed `_polyToken` parameter from `initialize` function in `SecurityTokenRegistry`.
20-
20+
21+
# v2.1.0 - Release Candidate
22+
23+
[__2.1.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-09-18__
24+
25+
## CappedSTO 2.0.1
26+
* `rate` is now accepted as multiplied by 10^18 to allow settting higher price than 1ETH/POLY per token.
27+
* 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.
28+
29+
## USDTieredSTO 2.1.0
30+
* Added `buyTokensView` and `getTokensMintedByTier` to USDTSTO.
31+
* Added `getSTODetails` to USDTSTO.
32+
* Added an Array of Tiers that will hold data about every tier in USDTSTO.
33+
* Added `buyWithETHRateLimited`, `buyWithPOLYRateLimited` and `buyWithUSDRateLimited` to USDTSTO.
34+
* Added `getTokensSoldByTier` to return sold (not minted during finalisation) tokens in each tier to USDTSTO.
35+
* Removed individual mappings for tier data removed in UDSTSTO.
36+
* Removed the old Proxy deployment method of USDTieredSTO and adopt the new inherited proxy deployment approach.
37+
* Bump the version to `2.1.0`
38+
39+
## GeneralTransferManager
40+
* `getInvestors`, `getAllInvestorsData`, `getInvestorsData` added to GTM to allow easy data queries.
41+
* `modifyDefaults(uint64 _defaultFromTime, uint64 _defaultToTime)` added which sets a default timestamp used when `fromTime` or `toTime` are 0
42+
* Add `address[] public investors` to record a list of all addresses that have been added to the whitelist (`getInvestors`).
43+
* General Transfer Manager: Fix for when `allowAllWhitelistIssuances` is FALSE
44+
* General Transfer Manager: Make GTM a Proxy based implementation to reduce deployment gas costs
45+
* Changed the version of `GeneralTransferManagerFactory` from `1.0.0` to `2.1.0`.
46+
47+
## Manual Approval TransferManager
48+
* 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.
49+
* Changed the version of `ManualApprovalTransferManagerFactory` from `1.0.0` to `2.1.0`.
50+
* Deployed 2.0.1 `ManualApprovalTransferManagerFactory` to address 0x6af2afad53cb334e62b90ddbdcf3a086f654c298
51+
52+
## Dividends
53+
* Changed the version of `ERC20DividendCheckpointFactory` & `EtherDividendCheckpointFactory` from `1.0.0` to `2.1.0`.
54+
* Applied proxy pattern to Dividends modules
55+
56+
## Changed
57+
* `getAllModulesAndPermsFromTypes()` does not take securityToken address as a parameter anymore.
2158

2259
# v1.5.0 - Release Candidate
2360

@@ -49,17 +86,16 @@ All notable changes to this project will be documented in this file.
4986
* Add `getReputationOfFactory()` & `getModuleListOfType()` functions to get the array type data from the ModuleRegistry contract.
5087
* Add `_setupCost` in `LogGenerateModuleFromFactory` event.
5188
* Add new function `getAllModulesByName()`, To get the list of modules having the same name. #198.
52-
* Add new function `modifyTickerDetails()`, To modify the details of undeployed ticker. #230
53-
89+
* Add new function `modifyTickerDetails()`, To modify the details of undeployed ticker. #230
90+
5491

5592

5693
## Fixed
57-
* `getAllModulesAndPermsFromTypes()` does not take securityToken address as a parameter anymore.
5894
* 0x0 and duplicate address in exclusions are no longer allowed in dividend modules.
5995
* All permissions are denied if no permission manager is active.
6096
* Generalize the STO varaible names and added them in `ISTO.sol` to use the common standard in all STOs.
6197
* Generalize the event when any new token get registered with the polymath ecosystem. `LogNewSecurityToken` should emit _ticker, _name, _securityTokenAddress, _owner, _addedAt, _registrant respectively. #230
62-
* Change the function name of `withdraPoly` to `withdrawERC20` and make the function generalize to extract tokens from the ST contract. parmeters are contract address and the value need to extract from the securityToken.
98+
* Change the function name of `withdraPoly` to `withdrawERC20` and make the function generalize to extract tokens from the ST contract. parmeters are contract address and the value need to extract from the securityToken.
6399

64100
## Removed
65101
* Removed investors list pruning
@@ -69,7 +105,7 @@ All notable changes to this project will be documented in this file.
69105

70106
======
71107

72-
# v1.4.1 - Release Candidate
108+
# v1.4.1
73109

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

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

96-
# v1.4.0 - Release candidate
132+
# v1.4.0
97133

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

0 commit comments

Comments
 (0)