Skip to content

Commit 0da0063

Browse files
maxsam4adamdossa
authored andcommitted
Merging 3.0.0 changes into old master (#775)
* PLCR voting module * WIP * Clean up types & tags * Fix test cases * Check that there is a non-zero supply when creating a dividend * improvements and fixes * factory fix * minor fix * improve the PLCR voting * add more functionality and add test cases * Ported STO fixes from dev-2.1.0 (#591) * Ported STO fixes from dev-2.1.0 * Revert when cap reached instead of failing silently * Restored missing require * USDTSTO granularity edge case fixed * add more tests * add overflow check * add overflow check * GTM minor refactoring * gtm test fix * MATM optimizations * Fixed matm tests * minor fixes * add comments * minor comment * Added a test case * Minor optimization * add getTokensByPartition in GTM and BTM * Minor optimization in verify transfer * add test for the VRTM getTokensByPartition * add the pause functionality in the getTokensByPartition() * Get subset of investors at a checkpoint (#611) * Updated checkpoint event and optimized st * Optimized dividends push payment * Added test * Minor datastore optimization * Test fixed * Add acknowledgement for irrevocable actions using EIP712 (#599) * Require signed user ack * Added test * Small fix * WIP * Cleanup * More cleanup * Cleaned up tests * Skip acknowledgement tests in coverage * Test fix * Merge fix * add pause effects in LTM * Allow to define fee in Poly * fix test * Updated factory deployments * Updated STR tests * Tests fixed * Added code comment to oracle * Add STR tests * Simplified change currency functions * Updated STR tests * Added module factory tests * Fix timestamp for checkpoints tests * Cosmetic changes * Fix timestamp for checkpoints tests * Skip cp module in coverage * Port dividend fix (#610) * port the 100% tax withholding changes * minor size optimization * add reclaim functions in every module * minor fixes * restrict the changes if dividend is expired * Allow token name change (#600) * Allow owner to change name * Reduce size * Update ST interface * Added update name event * Updated OZ * Updated storage verification test * Moved BTM, LTM, Vesting out of experimental * Typo fix * Test fix * minor fixes * start proposal Id from 1 instead of 0 * BTM optimizations and bug fix * Bug fix * Typo fix * Added clash checker script * Beutified function selector clash check script * Throw on finding a clash * Added circle CI job * Upgradable tokens (#602) * wip * Fixes for migration * Broken :-( * Fixes * Fix tests * Some more fixes * Lots more logic * Add ability to add modules as archived * Add a test * some more tests * Remove test file * Cleanup some test cases * Fix module / token versioning * Fix more tests * More version checking & fixes * Remove badtest * Reduce size of mock contract * Some updates * Remove unnecessary constructors * Updates * Merge fixes * Minor update * Merge fixes * implement all functions of ERC1410 * LTM optimizations and bug fix * minor fix * Vesting escrow wallet optimizations and bug fix * remove the approvals mapping * Added test cases for bug fixes * reduce the ST code size upto 23.84 KB * remove unnecessary mocks contract and cutdown the ST size till 23.72 KB * Increased max module types (#636) Increased the number of module types that the STFactory must check for potential incompatibilities before allowing the token to upgrade. * add test cases and fix bugs * resolve conflicts and add test cases * minor test fixes * minor test fix * Increase solidity coverage memory limit * Raised memory limits of truffle and ganache * refactoring voting modules & adding functionality * Refresh / Upgrade tokens (#632) * Added refresh token function * Reduced STR size * Added test cases for refreshToken * reuse function * Added refresh token event * fix compiler error * Port the VRTM audit fixes (#635) * port the VRTM audit fixes * cleanup code * move voting modules from experimental * fix test & add test * fix test for weighted vote module * add more tests * increase test coverage * increase more coverage * Minor optimizations (#628) * Optimized datastore batch functions * fixed ST mock compiler warnings * Optimized 10^18 * Name null check updated * GPM optimizations * CTM optimization * GTM optimization * Transfer type made enum * Added compiler version to supress warning * Minor STR optimization * Minor verify transfer optimizations * Added set bytes function * Marked initialize function of STR non-payable * Deleted registry updater * Added comments for pre computed hashes * Added more pre computed hashes * batch functions optimized * minor ST optimizations * Can transfer minor optimization * Reduced mock contract size * Removed dead code * Minor changes * Increased STR compatibility (#640) * Made STR backwards compatible * Fixed tests * Added test case * Merge fix * Hardcode version checks * Fixed pclr voting test * Revert prettification This reverts commit 7efad95. * build fix * Typo fix * Fixed tests * Updated and patched soldiity docgen * Update changelog for some extent * Copy dev-2.1.0 CLI into dev-3.0.0 * Fix Errors + add missing functions & Events * Add ISecurityTokenRegistry to contract abis + fix OZ ERC20 abi * Fix/Update ST20Generator for V3.0.0. * Add ISecurityToken to contract abis * Blue Bull - because I like it * Add events and some public constant getters to ISecurityToken * Token Manager CLI Fixes * revert yarn.lock changes * more token manager fixes * More CLI STM and TM fixes * WIP: More TM CLI fixes and updates * Update as per PR #669 to master * TM CLI updates for setting and checking investor flags * CLI Fixes for remaining transfer manager modules * Port Combine modify whitelist commands (ref PR #667) * STO CLI 3.0.0 fixes * Transfer CLI fixes * Investor CLI fixes * dividend manager CLI fixes * Contract Manager CLI Fixes and updates * Minor ST20 Generator change * Permission Manager Cli Fixes * Pin solc to 0.5.8 * made solc executable * Transfer managers with version * usd and poly fees for STR * Labeled modules Holder count * CLI Treasury wallet * CLI Change token name * CLI ST Documents * CLI controller transfer renamed * CLI partitions and operators * CLI inputs with limits abstracted to input.js * Moved OZ from devDependencies to dependencies (#707) * Approved Audit fixes (#705) * Add StatusCode library * make inline library * remove the helpers/PolyToken.sol * remove the IBoot from the contracts (#687) * cleanup (#686) * remove unnecessary modifiers (#685) * Remove KindMath from TokenLib (#684) * cleanup * remove the KindMath * Marked some functions as external (#678) * Removed redundant pause/unpause (#676) * Made onlyModuleOrOwner definition consisitent (#674) * Made onlyModuleOrOwner definition consisitent * Added braces * Added braces * minor undeflow fix in vesting ewallet (#673) * Updated license to Apache 2.0 * Update LICENSE * [3.20] Don't ask for name when registering ticker (#706) * Removed storing token name when registering ticker * Added backwards compatible functions * Updated tests to use latest functions * Renamed functions for easy testing on truffle * Fixed test * [3.38]: Add ST storage layout check script in CI pipeline (#704) * add st storage layout check script in CI pipeline * add info comment * 3.30 Remove OwnedProxy (#701) * Audit fix * Fix * Moved variable to storage contract * [3.31] Removed take usage fee (#700) * Removed takeUsageFee * Test fix * tests fixed * [3.5, 3.7, 3.8] Fix custom modules (#698) * Fix custom modules * Remove unnecessary modifier * Fix some test cases * disallow creation of 0 supply dividend (#697) * Added break in deleteDelegate (#696) * Added 0 length name check (#695) * Audit 3.4 & 3.14 Fix ST upgrades (#694) * Fixes + test cases * Small change in test * Add fixes for 3.14 * Fix setProtocolFactory() (#689) * Remove inconsistency of the index value (#688) * remove the unneccessary code from partitionsOf() (#681) * Added constructors (#672) * Added constructors The constructors prevents an exploit in case we forget to initialize the implementation contracts. Ideally, we should allways remember to initialize implementation contracts as well. * Migration fixed * test fix * test fix * Add the ability to configure the new STR atomically * Fix the returnPartition function (#680) * fix the returnPartition function * minor fix * Remove comment from codebase (#714) * Update interfaces to named parameters (#708) * WIP * Change some values * Make some mappings public for automatic getters * Put back truffle version * updated transfer manager results (#693) * Allow Custom oracle in USDTieredSTO (#691) * Added custom oracles to USDTSTO * Updated custom oracles logic * Pinned solidity version (#675) * Pinned solidity version * Fix merge conflicts * minor transfer optimization (#668) * Fix the BalanceOfPartition audit item (#679) * fix balance of partition function * fix balance of Partition function * return balance in the parent implementation of the getTokensByPartition() * Extra Items (#702) * minor improvements * permission fixes * Synchronise the ISTR with STR (#682) * synchronise the ISTR with STR * fix the interface problem * minor fixes * add some function in interface * add comment in STR * consistency in interfaces of contracts * improve the st interface * remove shadow declaration * add #706 new function declartion in the ISTR * add missing functions in interface * Specific contract type used (#683) * specific contract type used * add more type contract * remove the redundant KindMath * remove unnecessary casting * Merge fixes * Fix PLCR Proposal inconsistency (#713) * fix the proposal * minor styling and comments addition * Fix contract size issue. * Update licenses - Apache 2.0 As per https://spdx.org/licenses/ * Fix canTransfer spec (#709) * Fix spec * Fix conflict * Fix merge conflict * Small fixes * Revert package.json change * Fix test case * Set solcjs as default compiler (#716) * Set solcjs as default compiler If you want to use native solc, set the environemnt variable POLYMATH_NATIVE_SOLC as true. * Removed native solc from travis * Removed native solc version query from travis * CLI common selectToken inlcuding tokensByDelegate * Merge Dev-3.0.0 interfaces * Fix underflow in BlacklistTM (#721) * CLI Refresh security token * CLI Permissions updated * CLI Provider validator regex * Update changelog after the audit fixes * Fixed errors * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Issue with forceburn wording and no controllerredeem listed * CLI _owner issue fixed * CLI NewSecurityToken event renamed * Revert "CLI NewSecurityToken event renamed" This reverts commit 4a7fbbe. * CLI ST20 granularity support * Verify transfer on each TM Show which module failed in a TransferFailure Messages improved * Protocol upgrade fixes (#733) * Update tags, types, lower & upper bounds (#725) * Make useModule backwards compatible * Make deployToken backwards compatible (#726) * Make deployToken backwards compatible * Small fix for scheduledCheckpoint * Updated STR interface * Removed extra event * Fix interface mismatch * cleaning up as per the audit recommendation (#722) * TakeFee was removed. * ISTR script (#731) * Added Interface sync script * Added interface check script to CI * return 1 on error * Use local truffle in scripts * Removed npx dependency * minor fixes * CLI Permission manager refactoring * Fixed CTM verifyTransfer bug (#736) * Fixed CTM canTransferBug * Added test case * Added comment for devs * Move some variables / functions to internal (#737) Move some variables / functions to internal * CLI Fix * Minor fix * CLI Wallet manager * Added VEW to migrations * CLI VEW schedules in batches * Styling * Added note for valid templates * Added wallet modules to ST manager * Fixed bug at checking balance * fix: getTreasuryWallet function added to DividendCheckpoint.sol * Minor fixes * Update with v3 contract addresses * Add files via upload * Update README.md
1 parent 012e5a5 commit 0da0063

File tree

298 files changed

+30686
-18611
lines changed

Some content is hidden

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

298 files changed

+30686
-18611
lines changed

.circleci/config.yml

+33-21
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: maxsam4/solidity-kit:0.4.24
5+
- image: maxsam4/solidity-kit
66
steps:
77
- checkout
88
- restore_cache:
@@ -17,7 +17,7 @@ jobs:
1717
- node_modules
1818
test:
1919
docker:
20-
- image: maxsam4/solidity-kit:0.4.24
20+
- image: maxsam4/solidity-kit
2121
parallelism: 2
2222
steps:
2323
- checkout
@@ -37,54 +37,76 @@ jobs:
3737
path: ./test-results/mocha/results.xml
3838
coverage:
3939
docker:
40-
- image: maxsam4/solidity-kit:0.4.24
40+
- image: maxsam4/solidity-kit
4141
steps:
4242
- checkout
4343
- restore_cache:
4444
key: dependency-cache-{{ checksum "package.json" }}
4545
- run: yarn install
4646
- run: node --version
4747
- run: truffle version
48-
- run: node_modules/.bin/truffle version
49-
- run:
50-
command: scripts/coverage.sh
48+
- run:
49+
command: npm run coverage
5150
no_output_timeout: 1h
5251
- save_cache:
5352
key: dependency-cache-{{ checksum "package.json" }}
5453
paths:
5554
- node_modules
5655
- store_artifacts:
5756
path: ./coverage/lcov.info
58-
deploy_kovan:
57+
clash-check:
5958
docker:
60-
- image: maxsam4/solidity-kit:0.4.24
59+
- image: maxsam4/solidity-kit
6160
steps:
6261
- checkout
6362
- restore_cache:
6463
key: dependency-cache-{{ checksum "package.json" }}
6564
- run: yarn install
6665
- run: node --version
6766
- run: truffle version
68-
- run: mv truffle-ci.js truffle-config.js
69-
- run: npm run deploy-kovan
67+
- run: npm run clash-check
68+
- run: npm run istr-check
69+
- save_cache:
70+
key: dependency-cache-{{ checksum "package.json" }}
71+
paths:
72+
- node_modules
73+
st-storage-layout-check:
74+
docker:
75+
- image: maxsam4/solidity-kit
76+
steps:
77+
- checkout
78+
- restore_cache:
79+
key: dependency-cache-{{ checksum "package.json" }}
80+
- run: yarn install
81+
- run: node --version
82+
- run: truffle version
83+
- run: npm run st-storage-layout-check
7084
- save_cache:
7185
key: dependency-cache-{{ checksum "package.json" }}
7286
paths:
7387
- node_modules
7488
docs:
7589
docker:
76-
- image: maxsam4/solidity-kit:0.4.24
90+
- image: maxsam4/solidity-kit
7791
steps:
7892
- checkout
93+
- restore_cache:
94+
key: dependency-cache-{{ checksum "package.json" }}
7995
- run: yarn install
8096
- run: node --version
8197
- run: truffle version
8298
- run: npm run docs
99+
- save_cache:
100+
key: dependency-cache-{{ checksum "package.json" }}
101+
paths:
102+
- node_modules
83103
workflows:
84104
version: 2
85105
commit:
86106
jobs:
87107
- coverage
108+
- clash-check
109+
- st-storage-layout-check
88110
daily-builds:
89111
triggers:
90112
- schedule:
@@ -105,13 +127,3 @@ workflows:
105127
branches:
106128
only:
107129
- master
108-
deploy:
109-
jobs:
110-
- deploy_kovan:
111-
filters:
112-
branches:
113-
only:
114-
- master
115-
- dev-2.1.0
116-
- dev-2.2.0
117-
- dev-3.0.0

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ extract/
2424
extract.py
2525
extract.zip
2626
/test-results
27+
.env

.solcover.js

+2-2
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 -and ! -name q_usd_tiered_sto_sim.js -and ! -name z_general_permission_manager_fuzzer.js` --network coverage',
5+
testCommand: 'node --max-old-space-size=3500 ../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,
77
skipFiles: ['external', 'flat', 'helpers', 'mocks', 'oracles', 'libraries/KindMath.sol', 'libraries/BokkyPooBahsDateTimeLibrary.sol', 'storage', 'modules/Experimental'],
8-
forceParse: ['mocks', 'oracles', 'modules/Experimental']
8+
forceParse: ['mocks', 'oracles', 'helpers', 'modules/Experimental']
99
};

.travis.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ cache:
66
- node_modules
77
jobs:
88
include:
9-
- stage: test
10-
before_script: truffle version
11-
script: travis_wait 120 sleep infinity & npm run test
9+
- stage: Test
10+
install:
11+
- yarn install
12+
before_script:
13+
- truffle version
14+
script: npm run test
1215
notifications:
1316
slack:
14-
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=
17+
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

+102-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,101 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
# v3.0.0 - Release Candidate
5+
6+
[__3.0.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __10-11-18__
7+
8+
## SecurityToken
9+
* Added new function `addModuleWithLabel()` which takes an extra param `_label` that used for giving the customize label to the module for display purpose. #428
10+
* Changed the first three params in Security Token `event ModuleAdded()` to be indexed for search. Params are `unit8[] types`, `bytes32 _name` and `address _moduleFactory`
11+
* Fixed `addModule` function to be backwards compatible and call the new `addModuleWithLabel` function with an empty label.
12+
* Fixed event `ModuleAdded` to also emit `_label`.
13+
* Fixed function `getModule` to also return the respective module label.
14+
* Added datastore that is used to store data like investor list that is shared among modules.
15+
* `getInvestorCount()` now returns length of investor array that is everyone who ever held some st or has kyc data attached.
16+
* `holderCount()` returns the number of current st holders.
17+
* Added flags for Investors. Accredited and canbuyfromsto are now flags.
18+
* Add `_archived` flag in `addModule()` to allow issuers to add archived modules into the ST.
19+
* Add `upgradeModule()` function to upgrade the already attached module. It can only be called by owner of the token.
20+
* Add `upgradeToken()` function to upgrade the token to the latest version. Can only be executed by the owner of the token.
21+
* Add `changeDataStore()` function to change the dataStore contract address attached with the ST.
22+
* Issuer is allowed to change the name of the token using the `changeName()` function.
23+
* Add `changeTreasuryWallet()` funtion to change the treasury wallet of the token.
24+
* `transferWithData()` & `transferFromWithData()` function doesn't return the bool anymore.
25+
* Introduced `balanceOfByPartition()` function to read the balance of the token holder according to the given partition.
26+
* Add `transferByPartition()` function to transfer the tokens as per the given partition.
27+
* Removed `verifyTransfer()` function.
28+
* Add `authorizeOperator`, `revokeOperator`, `authorizeOperatorByPartition`, `revokeOperatorByPartition`, `operatorTransferByPartition` as the operator functions.
29+
* Remove `freezeMinting()` and introduced `freezeIssuance()`.
30+
* Rename the `mintWithData()` function to `issue()` function and `mintMulti()` to `issueMulti()`, remove `mint` function.
31+
* Rename the `burnWithData()` function to `redeem()` function and `burnFromWithData()` to `redeemFrom()`, remove `burn` function.
32+
* Add `redeemByPartition()` & `operatorRedeemByPartition()` function.
33+
* Add `issueByPartition()` to issue the tokens as per given partition.
34+
* `disableController()` now takes the sender signature to confirm the operation.
35+
* Introduce `canTransfer()`, `canTransferFrom()` & `canTransferByPartition()` to validate the transfer before actually executing it.
36+
* Add document specific functions `setDocument()`, `removeDocument()`.
37+
* Rename `forceTransfer()` to `controllerTransfer()` similarly `forceBurn()` to `controllerRedeem()`.
38+
* Add `isControllable()` to know whether the controller functions are allowed to execute or not.
39+
* Add `isIssuable()`, `getInvestorsSubsetAt()`, `getTreasuryWallet()`, `isOperator()`, `isOperatorForPartition()`, `partitionsOf()`, `getDocument()`, `getAllDocument()` functions as getters to support ST functionality.
40+
* Remove the `bool` return parameter from the `canTransfer` & `canTransferFrom` function.
41+
* Rename `increaseApproval()` & `decreaseApproval()` to `increaseAllowance()` & `decreaseAllowance()` respectively.
42+
43+
## STR
44+
* Introduce new contract `STRGetter.sol`. It only contains the getter functions of the STR.
45+
* Replaced `updatePolyTokenAddress()` function with `updateFromRegistry()` in `SecurityTokenRegistry`.
46+
* Migrate all the getters of `SecurityTokenRegistry.sol` to `STRGetter.sol` contract.
47+
* Removed `_polyToken` parameter from `initialize` function in `SecurityTokenRegistry`.
48+
* Allows an explicit token factory version to be used during creation of securityToken.
49+
* Rename the `getProtocolVersion()` to `getLatestProtocolVersion()`.
50+
* Add `generateNewSecurityToken()` function to generate the 3.0 tokens.
51+
* Add `refreshSecurityToken()` function to update the 2.x tokens to 3.0 tokens.
52+
* Add `changeFeesAmountAndCurrency()` function to sets the ticker registration and ST launch fee amount and currency.
53+
* Rename `setProtocolVersion()` to `setProtocolFactory()`, Add `removeProtocolFactory()`.
54+
* Add `getTokensByDelegate()`, `getSTFactoryAddressOfVersion()`, `getLatestProtocolVersion()`, `getIsFeeInPoly()` some getters.
55+
* Add `RegisterTicker` event with two new parameters `_registrationFeePoly` & `_registrationFeeUsd`. (Note- there is 2 events with the same name to maintain the backwards compatibility).
56+
* Add `NewSecurityToken` event with three new parameters `_usdFee`, `_polyFee` & `_protocolVersion`. (Note- there is 2 events with the same name to maintain the backwards compatibility).
57+
* Add `registerNewTicker()` function to register the ticker for `3.0.0` release. NB- `registerTicker()` is also present in the code to maintain the backwards compatibility.
58+
* Add `modifyExistingTicker()` to modify the ticker & `modifyExistingSecurityToken()` to modify the ST.
59+
* Add `tickerAvailable()` to get the status of ticker availability.
60+
61+
## MR
62+
* Add `_isUpgrade` param in function `useModule()`. NB - `useModule()` function exists with the same arguments to maintain the backwards compatibility.
63+
* Add `isCompatibleModule()` to check whether the given module and ST is compatible or not.
64+
* Remove `_isVerified` param from the `verifyModule()` function and introduced `unverifyModule()` function to unverify module.
65+
* Removed `getReputationByFactory()`.
66+
* `getFactoryDetails()` is now return one extra parameter i.e address of the factory owner.
67+
* `getAllModulesByType()` add new function to return array that contains the list of addresses of module factory contracts.
68+
69+
## GeneralTransferManager
70+
* `modifyWhitelist()` function renamed to `modifyKYCData()`.
71+
* Added functions to modify and get flags
72+
* `canBuyFromSto` is now `canNotBuyFromSto` and it is the flag `1`
73+
* GTM logic reworked. Now, instead of flags like allowAllTransfers, there is a matrix of transfer requirements that must be fulfilled based on type of transfer.
74+
* Remove `changeSigningAddress()`, `changeAllowAllTransfers()`, `changeAllowAllWhitelistTransfers()`, `changeAllowAllWhitelistIssuances()`, `changeAllowAllBurnTransfers`.
75+
* Introduced `modifyTransferRequirements()` & `modifyTransferRequirementsMulti()` to modify the transfer requirements.
76+
* Add `modifyInvestorFlag()` & `modifyInvestorFlagMulti()` function to modify the flag.
77+
* `modifyWhitelistSigned()` rename to `modifyKYCDataSigned()`. Add `modifyKYCDataSignedMulti`.
78+
* Add `getAllInvestorFlags()`, `getInvestorFlag()`,`getInvestorFlags()`, `getAllKYCData()`, `getKYCData()` & `getTokensByPartition()`.
79+
80+
## USDTiererdSTO
81+
* Removed `changeAccredited()` function.
82+
* `buyWithETH()`, `buyWithPOLY()`, `buyWithUSD()`, `buyWithETHRateLimited()`, `buyWithPOLYRateLimited()` & `buyWithUSDRateLimited()` will return spentUSD, spentValue & amount of mint tokens.
83+
* Remove `buyTokensView()` function.
84+
* Add `modifyOracle()` function allow issuer to add their personalize oracles.
85+
86+
## Modules
87+
* Introduced BTM, LTM, Voting and VEW modules.
88+
* Remove the `_usageCost` variable when deploying any module factory.
89+
* Remove `takeUsageFee()` function from evey module.
90+
* Remove `changeUsageCost()` & `usageCostInPoly()` from every module factory.
91+
* Remove `takeFee()` function.
92+
* `getTreasuryWallet()` function added to `DividendCheckpoint.sol`.
93+
94+
## Generalize
95+
* Removed `_polyAddress` parameter from constructors of all modules and module factories.
96+
* All modules are upgradeable now.
97+
* Permission types are only `ADMIN` and `OPERATOR` now.
98+
499
# v2.1.0 - Release Candidate
5100

6101
[__2.1.0__](https://www.npmjs.com/package/polymath-core?activeTab=readme) __13-09-18__
@@ -113,13 +208,15 @@ volume traded in a given rolling period.
113208
* Add `getReputationOfFactory()` & `getModuleListOfType()` functions to get the array type data from the ModuleRegistry contract.
114209
* Add `_setupCost` in `LogGenerateModuleFromFactory` event.
115210
* Add new function `getAllModulesByName()`, To get the list of modules having the same name. #198.
116-
* Add new function `modifyTickerDetails()`, To modify the details of undeployed ticker. #230
211+
* Add new function `modifyTickerDetails()`, To modify the details of undeployed ticker. #230
212+
213+
117214

118215
## Fixed
119216
* 0x0 and duplicate address in exclusions are no longer allowed in dividend modules.
120217
* All permissions are denied if no permission manager is active.
121218
* Generalize the STO varaible names and added them in `ISTO.sol` to use the common standard in all STOs.
122-
* Generalize the event when any new token get registered with the polymath ecosystem. `LogNewSecurityToken` should emit _ticker, _name, _securityTokenAddress, _owner, _addedAt, _registrant respectively. #230
219+
* Generalize the event when any new token get registered with the polymath ecosystem. `LogNewSecurityToken` should emit _ticker_, _name_, _securityTokenAddress_, _owner_, _addedAt_, _registrant_ respectively. #230
123220
* 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.
124221

125222
## Removed
@@ -351,7 +448,7 @@ allowed)
351448
* __buyTokensWithPoly__ has only one argument called `_investedPoly` only. Beneficiary Address should be its msg.sender.
352449
* __getRaiseEther()__ function name changed to __getRaisedEther()__.
353450
* __getRaisePoly()__ function name changed to __getRaisedPoly()__.
354-
* `LogModuleAdded` emit one more variable called ___budget__.
451+
* `LogModuleAdded` emit one more variable called __budget__.
355452
* `modules` mapping in the securityToken contract now returns __the array of ModuleData__.
356453

357454
## Removed
@@ -363,7 +460,7 @@ allowed)
363460

364461
## Added
365462
* ModuleRegistry contract will provide the list of modules by there types.
366-
* `SecurityTokenRegistry` is now working on the basis of the proxy version of the securitytoken contract. For that SecurityTokenRegistry has one more variable in the constructor called _STVersionProxy .
463+
* `SecurityTokenRegistry` is now working on the basis of the proxy version of the securitytoken contract. For that SecurityTokenRegistry has one more variable in the constructor called _STVersionProxy_ .
367464
* `setProtocolVersion` new function added in the SecurityTokenRegistry to set the protocol version followed to generate the securityToken. Only be called by the `polymath admin`.
368465
* `SecurityToken` now have the integration with polyToken. At the time of `addModule()` SecurityToken approve the cost of the module to moduleFactory as the spender.
369466
* New function `withdrawPoly(uint256 _amount)` is added to withdrawal the unused POLY from the securityToken contract. Called only by the owner of the contract.
@@ -390,7 +487,7 @@ allowed)
390487
* Deployment of the securityToken is now performed by the proxy contracts and call being generated form the SecurityTokenRegistry.
391488
* `TickerRegistrar` renamed as `TickerRegistry`.
392489
* TickerRegistry is now Ownable contract.
393-
* `setTokenRegistrar` functio of TickerRegistry renamed to `setTokenRegistry`.
490+
* `setTokenRegistrar` function of TickerRegistry renamed to `setTokenRegistry`.
394491
* SecurityToken constructor has one change in the variable. i.e `_moduleRegistry` contract address is replaced by the `_owner` address.
395492
* Their is no `_perm` parameter in the `addModule()` function of the securityToken contract. Now only 4 parameters left.
396493
* Type of Mudules changed

0 commit comments

Comments
 (0)