Skip to content

Commit

Permalink
STRV TM added to migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVicente committed Oct 23, 2018
1 parent 023632a commit d7e97bb
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const PolymathRegistry = artifacts.require('./PolymathRegistry.sol')
const GeneralTransferManagerFactory = artifacts.require('./GeneralTransferManagerFactory.sol')
const GeneralPermissionManagerFactory = artifacts.require('./GeneralPermissionManagerFactory.sol')
const PercentageTransferManagerFactory = artifacts.require('./PercentageTransferManagerFactory.sol')
const SingleTradeVolumeRestrictionTMFactory = artifacts.require('./SingleTradeVolumeRestrictionTMFactory.sol')
const USDTieredSTOProxyFactory = artifacts.require('./USDTieredSTOProxyFactory.sol');
const CountTransferManagerFactory = artifacts.require('./CountTransferManagerFactory.sol')
const EtherDividendCheckpointFactory = artifacts.require('./EtherDividendCheckpointFactory.sol')
Expand Down Expand Up @@ -157,6 +158,10 @@ module.exports = function (deployer, network, accounts) {
// D) Deploy the CountTransferManagerFactory Contract (Factory used to generate the CountTransferManager contract use
// to track the counts of the investors of the security token)
return deployer.deploy(CountTransferManagerFactory, PolyToken, 0, 0, 0, {from: PolymathAccount});
}).then(() => {
// D) Deploy the SingleTradeVolumeRestrictionTMFactory Contract (Factory used to generate the SingleTradeVolumeRestrictionTM contract use
// to impose volume restriction on a single trade that the investors could do for a particular security token)
return deployer.deploy(SingleTradeVolumeRestrictionTMFactory, PolyToken, 0, 0, 0, {from: PolymathAccount});
}).then(() => {
// D) Deploy the PercentageTransferManagerFactory Contract (Factory used to generate the PercentageTransferManager contract use
// to track the percentage of investment the investors could do for a particular security token)
Expand Down Expand Up @@ -196,6 +201,10 @@ module.exports = function (deployer, network, accounts) {
}).then(() => {
// Update all addresses into the registry contract by calling the function updateFromregistry
return moduleRegistry.updateFromRegistry({from: PolymathAccount});
}).then(() => {
// D) Register the SingleTradeVolumeRestrictionTMFactory in the ModuleRegistry to make the factory available at the protocol level.
// So any securityToken can use that factory to generate the SingleTradeVolumeRestrictionTM contract.
return moduleRegistry.registerModule(SingleTradeVolumeRestrictionTMFactory.address, {from: PolymathAccount});
}).then(() => {
// D) Register the PercentageTransferManagerFactory in the ModuleRegistry to make the factory available at the protocol level.
// So any securityToken can use that factory to generate the PercentageTransferManager contract.
Expand Down Expand Up @@ -239,6 +248,11 @@ module.exports = function (deployer, network, accounts) {
// contract, Factory should comes under the verified list of factories or those factories deployed by the securityToken issuers only.
// Here it gets verified because it is deployed by the third party account (Polymath Account) not with the issuer accounts.
return moduleRegistry.verifyModule(PercentageTransferManagerFactory.address, true, {from: PolymathAccount});
}).then(() => {
// G) Once the SingleTradeVolumeRestrictionTMFactory registered with the ModuleRegistry contract then for making them accessble to the securityToken
// contract, Factory should comes under the verified list of factories or those factories deployed by the securityToken issuers only.
// Here it gets verified because it is deployed by the third party account (Polymath Account) not with the issuer accounts.
return moduleRegistry.verifyModule(SingleTradeVolumeRestrictionTMFactory.address, true, {from: PolymathAccount});
}).then(() => {
// G) Once the GeneralPermissionManagerFactory registered with the ModuleRegistry contract then for making them accessble to the securityToken
// contract, Factory should comes under the verified list of factories or those factories deployed by the securityToken issuers only.
Expand Down Expand Up @@ -294,27 +308,28 @@ module.exports = function (deployer, network, accounts) {
console.log('\n');
console.log(`
----------------------- Polymath Network Smart Contracts: -----------------------
PolymathRegistry: ${PolymathRegistry.address}
SecurityTokenRegistry (Proxy): ${SecurityTokenRegistryProxy.address}
ModuleRegistry (Proxy): ${ModuleRegistryProxy.address}
FeatureRegistry: ${FeatureRegistry.address}
ETHOracle: ${ETHOracle}
POLYOracle: ${POLYOracle}
PolymathRegistry: ${PolymathRegistry.address}
SecurityTokenRegistry (Proxy): ${SecurityTokenRegistryProxy.address}
ModuleRegistry (Proxy): ${ModuleRegistryProxy.address}
FeatureRegistry: ${FeatureRegistry.address}
STFactory: ${STFactory.address}
GeneralTransferManagerFactory: ${GeneralTransferManagerFactory.address}
GeneralPermissionManagerFactory: ${GeneralPermissionManagerFactory.address}
ETHOracle: ${ETHOracle}
POLYOracle: ${POLYOracle}
CappedSTOFactory: ${CappedSTOFactory.address}
USDTieredSTOFactory: ${USDTieredSTOFactory.address}
USDTieredSTOProxyFactory: ${USDTieredSTOProxyFactory.address}
STFactory: ${STFactory.address}
GeneralTransferManagerFactory: ${GeneralTransferManagerFactory.address}
GeneralPermissionManagerFactory: ${GeneralPermissionManagerFactory.address}
CappedSTOFactory: ${CappedSTOFactory.address}
USDTieredSTOFactory: ${USDTieredSTOFactory.address}
USDTieredSTOProxyFactory: ${USDTieredSTOProxyFactory.address}
CountTransferManagerFactory: ${CountTransferManagerFactory.address}
PercentageTransferManagerFactory: ${PercentageTransferManagerFactory.address}
ManualApprovalTransferManagerFactory: ${ManualApprovalTransferManagerFactory.address}
EtherDividendCheckpointFactory: ${EtherDividendCheckpointFactory.address}
ERC20DividendCheckpointFactory: ${ERC20DividendCheckpointFactory.address}
CountTransferManagerFactory: ${CountTransferManagerFactory.address}
PercentageTransferManagerFactory: ${PercentageTransferManagerFactory.address}
ManualApprovalTransferManagerFactory: ${ManualApprovalTransferManagerFactory.address}
SingleTradeVolumeRestrictionTMFactory: ${SingleTradeVolumeRestrictionTMFactory.address}
EtherDividendCheckpointFactory: ${EtherDividendCheckpointFactory.address}
ERC20DividendCheckpointFactory: ${ERC20DividendCheckpointFactory.address}
---------------------------------------------------------------------------------
`);
console.log('\n');
Expand Down

0 comments on commit d7e97bb

Please sign in to comment.