Skip to content

Commit abe3ed4

Browse files
authored
Merge pull request #400 from PolymathNetwork/master
Update 3.0 dev branch
2 parents df6e6f5 + 6a9aef4 commit abe3ed4

20 files changed

+770
-1895
lines changed

CLI/commands/helpers/contract_addresses.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function getPolymathRegistryAddress(networkId) {
1616
result = JSON.parse(require('fs').readFileSync('./build/contracts/PolymathRegistry.json').toString()).networks[networkId].address;
1717
break;
1818
case 42: // KOVAN
19-
result = "0xad09dc7939f09601674c69a07132bc642abeeb10";
19+
result = "0x5b215a7d39ee305ad28da29bf2f0425c6c2a00b3";
2020
break;
2121
}
2222

CLI/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"readline-sync": "^1.4.9",
1616
"request": "^2.88.0",
1717
"request-promise": "^4.2.2",
18-
"web3": "^1.0.0-beta.35"
18+
"web3": "1.0.0-beta.34"
1919
}
2020
}

CLI/yarn.lock

Lines changed: 176 additions & 288 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Build Status](https://travis-ci.org/PolymathNetwork/polymath-core.svg?branch=master)](https://travis-ci.org/PolymathNetwork/polymath-core)
22
[![Coverage Status](https://coveralls.io/repos/github/PolymathNetwork/polymath-core/badge.svg?branch=master)](https://coveralls.io/github/PolymathNetwork/polymath-core?branch=master)
33
[![Gitter](https://img.shields.io/badge/chat-gitter-green.svg)](https://gitter.im/PolymathNetwork/Lobby)
4-
[![Telegram](https://img.shields.io/badge/50k+-telegram-blue.svg)](https://gitter.im/PolymathNetwork/Lobby)
4+
[![Telegram](https://img.shields.io/badge/50k+-telegram-blue.svg)](https://gitter.im/PolymathNetwork/Lobby) [![Greenkeeper badge](https://badges.greenkeeper.io/PolymathNetwork/polymath-core.svg)](https://greenkeeper.io/)
55

66
![Polymath logo](Polymath.png)
77

@@ -172,32 +172,35 @@ node CLI/polymath-cli dividends_manager
172172

173173
### v2.0.0 KOVAN
174174

175+
New Kovan PolyTokenFaucet: 0xb347b9f5b56b431b2cf4e1d90a5995f7519ca792
176+
175177
----------------------- Polymath Network Smart Contracts: -----------------------
176-
PolymathRegistry: 0xad09dc7939f09601674c69a07132bc642abeeb10
177-
SecurityTokenRegistry (Proxy): 0xef600e4904fe0a2f4587ae94bcbed4c9e9aeb37a
178-
ModuleRegistry (Proxy): 0xe8e30fd7d65a5e3b1134ce29d3afb49cc27b7086
179-
FeatureRegistry: 0x35a8f211763be879541656d692f057d108eec9aa
178+
PolymathRegistry: 0x5b215a7d39ee305ad28da29bf2f0425c6c2a00b3
179+
SecurityTokenRegistry (Proxy): 0x91110c2f67e2881a8540417be9eadf5bc9f2f248
180+
ModuleRegistry (Proxy): 0xde6d19d7a68d453244227b6ccc5d8e6c2314627a
181+
FeatureRegistry: 0x8967a7cfc4b455398be2356cd05cd43b7a39697e
180182

181183
ETHOracle: 0xCE5551FC9d43E9D2CC255139169FC889352405C8
182184
POLYOracle: 0x461d98EF2A0c7Ac1416EF065840fF5d4C946206C
183185

184-
STFactory: 0x1f08b1473fbb5bfc2bbaea99520291b6120be529
185-
GeneralTransferManagerFactory: 0xc100ec8f8e397b426a52a5c7acc02892e1d92a53
186-
GeneralPermissionManagerFactory: 0x96d7d693edd4a2ae773e4dd9739d997f0c38738f
186+
STFactory: 0x22f56100c6f18b656dbf1b156334206326fc672a
187+
GeneralTransferManagerFactory: 0x650e9507e983077d6f822472a7dcc37626d55c7f
188+
GeneralPermissionManagerFactory: 0xbf0bd6305b523ce055baa6dfaa9676d6b9e6090b
187189

188-
CappedSTOFactory: 0xfde869904bbc1e881601b2ebde4a77ba3808dfad
189-
USDTieredSTOFactory: 0x01c17f387224148931ce03788e61836e7fe5d753
190-
USDTieredSTOProxyFactory: 0x63d0371a3dfa419a50670770b55618f6b5269057
190+
CappedSTOFactory: 0xa4a24780b93a378eb25ec4bfbf93bc8e79d7eeeb
191+
USDTieredSTOFactory: 0x9106d7fbbd2996ef787913876341d0070cbdfc95
192+
USDTieredSTOProxyFactory: 0xb004ff6893b95dc8a19b9e09b2920a44a609bae3
191193

192-
CountTransferManagerFactory: 0x6691d4e4f8e48c7a3df04c25088169cb101b2882
193-
PercentageTransferManagerFactory: 0x62dd693e8864874d3d806286983e9da41cd5a035
194-
ManualApprovalTransferManagerFactory: 0x20ba9fd6907ff42f033df5cfdbaced6426b5e682
195-
EtherDividendCheckpointFactory: 0xceba16202ce878d1c01a1f5bf3f219b58d712d5f
196-
ERC20DividendCheckpointFactory: 0x5c0051ffdc9655ae7b87a8a79542178be2e973e4
194+
CountTransferManagerFactory: 0xc7cf0c1ddc85c18672951f9bfeb7163ecc8f0e2f
195+
PercentageTransferManagerFactory: 0xfea5fcb254bcb4ada0f86903ff822d6372325cb1
196+
ManualApprovalTransferManagerFactory: 0x8e96e7199b9ba096d666033f058ebb0050786baf
197+
EtherDividendCheckpointFactory: 0x18ae137fc6581e121f3d37ed85c423dbc3c9b964
198+
ERC20DividendCheckpointFactory: 0x8c724a1504643e02bb02b23cdd414da637872c80
197199
---------------------------------------------------------------------------------
198200

199201

200202

203+
201204
## Mainnet
202205

203206
### v1.3.0 (TORO Release)

contracts/SecurityTokenRegistry.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ contract SecurityTokenRegistry is ISecurityTokenRegistry, EternalStorage {
188188
set(PAUSED, false);
189189
set(OWNER, _owner);
190190
set(POLYMATHREGISTRY, _polymathRegistry);
191-
_setProtocolVersion(_STFactory, uint8(0), uint8(0), uint8(2));
191+
_setProtocolVersion(_STFactory, uint8(2), uint8(0), uint8(0));
192192
set(INITIALIZE, true);
193193
}
194194

contracts/tokens/SecurityToken.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ contract SecurityToken is StandardToken, DetailedERC20, ReentrancyGuard, Registr
210210
updateFromRegistry();
211211
tokenDetails = _tokenDetails;
212212
granularity = _granularity;
213-
securityTokenVersion = SemanticVersion(0,0,2);
213+
securityTokenVersion = SemanticVersion(2,0,0);
214214
}
215215

216216
/**

greenkeeper.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"groups": {
3+
"default": {
4+
"packages": [
5+
"CLI/package.json",
6+
"package.json"
7+
]
8+
}
9+
}
10+
}

migrations/2_deploy_contracts.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const STFactory = artifacts.require('./tokens/STFactory.sol')
1818
const DevPolyToken = artifacts.require('./helpers/PolyTokenFaucet.sol')
1919
const MockOracle = artifacts.require('./MockOracle.sol')
2020
const TokenLib = artifacts.require('./TokenLib.sol');
21+
const SecurityToken = artifacts.require('./tokens/SecurityToken.sol')
2122

2223
let BigNumber = require('bignumber.js');
2324
const cappedSTOSetupCost = new BigNumber(20000).times(new BigNumber(10).pow(18)); // 20K POLY fee
@@ -132,8 +133,8 @@ module.exports = function (deployer, network, accounts) {
132133
return deployer.deploy(TokenLib, {from: PolymathAccount});
133134
}).then(() => {
134135
// Link libraries
135-
return deployer.link(TokenLib, STFactory);
136-
}).then(() => {
136+
deployer.link(TokenLib, SecurityToken);
137+
deployer.link(TokenLib, STFactory);
137138
// A) Deploy the ModuleRegistry Contract (It contains the list of verified ModuleFactory)
138139
return deployer.deploy(ModuleRegistry, {from: PolymathAccount});
139140
}).then(() => {
@@ -290,6 +291,8 @@ module.exports = function (deployer, network, accounts) {
290291
return polymathRegistry.changeAddress("PolyUsdOracle", POLYOracle, {from: PolymathAccount});
291292
}).then(() => {
292293
return polymathRegistry.changeAddress("EthUsdOracle", ETHOracle, {from: PolymathAccount});
294+
}).then(() => {
295+
return deployer.deploy(SecurityToken, 'a', 'a', 18, 1, 'a', polymathRegistry.address, {from: PolymathAccount});
293296
}).then(() => {
294297
console.log('\n');
295298
console.log(`

package.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,30 @@
6060
"babel-preset-stage-2": "6.24.1",
6161
"babel-preset-stage-3": "6.24.1",
6262
"babel-register": "6.26.0",
63-
"bignumber.js": "^5.0.0",
63+
"bignumber.js": "5.0.0",
6464
"chalk": "^2.4.1",
6565
"coveralls": "^3.0.1",
6666
"ethereumjs-testrpc": "^6.0.3",
67-
"ethers": "^3.0.15",
68-
"fs": "0.0.1-security",
67+
"ethers": "^4.0.7",
68+
"fs": "0.0.2",
6969
"openzeppelin-solidity": "1.10.0",
7070
"readline-sync": "^1.4.9",
7171
"request": "^2.88.0",
7272
"request-promise": "^4.2.2",
7373
"shelljs": "^0.8.2",
7474
"solc": "^0.4.24",
7575
"truffle-contract": "^3.0.4",
76-
"truffle-hdwallet-provider-privkey": "^0.1.0",
76+
"truffle-hdwallet-provider-privkey": "0.2.0",
7777
"web3": "1.0.0-beta.34"
7878
},
7979
"devDependencies": {
8080
"@soldoc/soldoc": "^0.4.3",
81-
"eslint": "^4.19.1",
82-
"eslint-config-standard": "^11.0.0",
81+
"eslint": "^5.8.0",
82+
"eslint-config-standard": "^12.0.0",
8383
"eslint-plugin-import": "^2.10.0",
84-
"eslint-plugin-node": "^6.0.1",
85-
"eslint-plugin-promise": "^3.7.0",
86-
"eslint-plugin-standard": "^3.0.1",
84+
"eslint-plugin-node": "^8.0.0",
85+
"eslint-plugin-promise": "^4.0.1",
86+
"eslint-plugin-standard": "^4.0.0",
8787
"ethereum-bridge": "^0.6.1",
8888
"ethereumjs-abi": "^0.6.5",
8989
"fast-csv": "^2.4.1",
@@ -93,12 +93,15 @@
9393
"solidity-coverage": "^0.5.11",
9494
"solidity-docgen": "^0.1.0",
9595
"solium": "^1.1.6",
96-
"truffle": "^4.1.13",
96+
"truffle": "4.1.14",
9797
"truffle-wallet-provider": "0.0.5"
9898
},
9999
"greenkeeper": {
100100
"ignore": [
101-
"openzeppelin-solidity"
101+
"openzeppelin-solidity",
102+
"web3",
103+
"bignumber.js",
104+
"truffle-hdwallet-provider-privkey"
102105
]
103106
}
104107
}

test/b_capped_sto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ contract("CappedSTO", accounts => {
470470
it("Should fundRaised value equal to the raised value in the funds receiver wallet", async () => {
471471
const newBalance = await web3.eth.getBalance(account_fundsReceiver);
472472
//console.log("WWWW",newBalance,await I_CappedSTO.fundsRaised.call(),balanceOfReceiver);
473-
let op = BigNumber(newBalance)
473+
let op = new BigNumber(newBalance)
474474
.minus(balanceOfReceiver)
475475
.toNumber();
476476
assert.equal(

test/c_checkpoints.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,10 @@ contract("Checkpoints", accounts => {
226226
let cps = [];
227227
let ts = [];
228228
for (let j = 0; j < 10; j++) {
229-
let balance1 = BigNumber(await I_SecurityToken.balanceOf(account_investor1));
230-
let balance2 = BigNumber(await I_SecurityToken.balanceOf(account_investor2));
231-
let balance3 = BigNumber(await I_SecurityToken.balanceOf(account_investor3));
232-
let totalSupply = BigNumber(await I_SecurityToken.totalSupply());
229+
let balance1 = new BigNumber(await I_SecurityToken.balanceOf(account_investor1));
230+
let balance2 = new BigNumber(await I_SecurityToken.balanceOf(account_investor2));
231+
let balance3 = new BigNumber(await I_SecurityToken.balanceOf(account_investor3));
232+
let totalSupply = new BigNumber(await I_SecurityToken.totalSupply());
233233
cps.push([balance1, balance2, balance3]);
234234
ts.push(totalSupply);
235235
console.log(
@@ -265,18 +265,18 @@ contract("Checkpoints", accounts => {
265265
receiver = account_investor3;
266266
}
267267
let m = Math.random();
268-
let amount = BigNumber(await I_SecurityToken.balanceOf(sender))
268+
let amount = new BigNumber(await I_SecurityToken.balanceOf(sender))
269269
.mul(Math.random().toFixed(10))
270270
.toFixed(0);
271271
if (m > 0.8) {
272272
console.log("Sending full balance");
273-
amount = BigNumber(await I_SecurityToken.balanceOf(sender));
273+
amount = new BigNumber(await I_SecurityToken.balanceOf(sender));
274274
}
275275
console.log("Sender: " + sender + " Receiver: " + receiver + " Amount: " + JSON.stringify(amount));
276276
await I_SecurityToken.transfer(receiver, amount, { from: sender });
277277
}
278278
if (Math.random() > 0.5) {
279-
let n = BigNumber(Math.random().toFixed(10))
279+
let n = new BigNumber(Math.random().toFixed(10))
280280
.mul(10 ** 17)
281281
.toFixed(0);
282282
let p = Math.random() * 3;
@@ -293,7 +293,7 @@ contract("Checkpoints", accounts => {
293293
await I_SecurityToken.mint(minter, n, { from: token_owner });
294294
}
295295
if (Math.random() > 0.5) {
296-
let n = BigNumber(Math.random().toFixed(10)).mul(10 ** 17);
296+
let n = new BigNumber(Math.random().toFixed(10)).mul(10 ** 17);
297297
let p = Math.random() * 3;
298298
let r = Math.random() * 3;
299299
let burner;
@@ -304,7 +304,7 @@ contract("Checkpoints", accounts => {
304304
} else {
305305
burner = account_investor3;
306306
}
307-
let burnerBalance = BigNumber(await I_SecurityToken.balanceOf(burner));
307+
let burnerBalance = new BigNumber(await I_SecurityToken.balanceOf(burner));
308308
if (n.gt(burnerBalance.div(2))) {
309309
n = burnerBalance.div(2);
310310
}
@@ -314,10 +314,10 @@ contract("Checkpoints", accounts => {
314314
}
315315
console.log("Checking Interim...");
316316
for (let k = 0; k < cps.length; k++) {
317-
let balance1 = BigNumber(await I_SecurityToken.balanceOfAt(account_investor1, k + 1));
318-
let balance2 = BigNumber(await I_SecurityToken.balanceOfAt(account_investor2, k + 1));
319-
let balance3 = BigNumber(await I_SecurityToken.balanceOfAt(account_investor3, k + 1));
320-
let totalSupply = BigNumber(await I_SecurityToken.totalSupplyAt(k + 1));
317+
let balance1 = new BigNumber(await I_SecurityToken.balanceOfAt(account_investor1, k + 1));
318+
let balance2 = new BigNumber(await I_SecurityToken.balanceOfAt(account_investor2, k + 1));
319+
let balance3 = new BigNumber(await I_SecurityToken.balanceOfAt(account_investor3, k + 1));
320+
let totalSupply = new BigNumber(await I_SecurityToken.totalSupplyAt(k + 1));
321321
let balances = [balance1, balance2, balance3];
322322
console.log("Checking TotalSupply: " + totalSupply + " is " + ts[k] + " at checkpoint: " + (k + 1));
323323
assert.isTrue(totalSupply.eq(ts[k]));
@@ -330,10 +330,10 @@ contract("Checkpoints", accounts => {
330330
}
331331
console.log("Checking...");
332332
for (let k = 0; k < cps.length; k++) {
333-
let balance1 = BigNumber(await I_SecurityToken.balanceOfAt(account_investor1, k + 1));
334-
let balance2 = BigNumber(await I_SecurityToken.balanceOfAt(account_investor2, k + 1));
335-
let balance3 = BigNumber(await I_SecurityToken.balanceOfAt(account_investor3, k + 1));
336-
let totalSupply = BigNumber(await I_SecurityToken.totalSupplyAt(k + 1));
333+
let balance1 = new BigNumber(await I_SecurityToken.balanceOfAt(account_investor1, k + 1));
334+
let balance2 = new BigNumber(await I_SecurityToken.balanceOfAt(account_investor2, k + 1));
335+
let balance3 = new BigNumber(await I_SecurityToken.balanceOfAt(account_investor3, k + 1));
336+
let totalSupply = new BigNumber(await I_SecurityToken.totalSupplyAt(k + 1));
337337
let balances = [balance1, balance2, balance3];
338338
console.log("Checking TotalSupply: " + totalSupply + " is " + ts[k] + " at checkpoint: " + (k + 1));
339339
assert.isTrue(totalSupply.eq(ts[k]));

0 commit comments

Comments
 (0)