@@ -9,6 +9,8 @@ const EtherDividendCheckpointLogic = artifacts.require('./EtherDividendCheckpoin
99const ERC20DividendCheckpointLogic = artifacts . require ( './ERC20DividendCheckpoint.sol' )
1010const EtherDividendCheckpointFactory = artifacts . require ( './EtherDividendCheckpointFactory.sol' )
1111const ERC20DividendCheckpointFactory = artifacts . require ( './ERC20DividendCheckpointFactory.sol' )
12+ const VestingEscrowWalletFactory = artifacts . require ( './VestingEscrowWalletFactory.sol' ) ;
13+ const VestingEscrowWalletLogic = artifacts . require ( './VestingEscrowWallet.sol' ) ;
1214const ModuleRegistry = artifacts . require ( './ModuleRegistry.sol' ) ;
1315const ModuleRegistryProxy = artifacts . require ( './ModuleRegistryProxy.sol' ) ;
1416const ManualApprovalTransferManagerFactory = artifacts . require ( './ManualApprovalTransferManagerFactory.sol' )
@@ -154,17 +156,25 @@ module.exports = function (deployer, network, accounts) {
154156 // manager attach with the securityToken contract at the time of deployment)
155157 return deployer . deploy ( GeneralTransferManagerLogic , "0x0000000000000000000000000000000000000000" , "0x0000000000000000000000000000000000000000" , { from : PolymathAccount } ) ;
156158 } ) . then ( ( ) => {
157- // B) Deploy the GeneralTransferManagerLogic Contract (Factory used to generate the GeneralTransferManager contract and this
159+ // B) Deploy the ERC20DividendCheckpointLogic Contract (Factory used to generate the ERC20DividendCheckpoint contract and this
158160 // manager attach with the securityToken contract at the time of deployment)
159161 return deployer . deploy ( ERC20DividendCheckpointLogic , "0x0000000000000000000000000000000000000000" , "0x0000000000000000000000000000000000000000" , { from : PolymathAccount } ) ;
160162 } ) . then ( ( ) => {
161- // B) Deploy the GeneralTransferManagerLogic Contract (Factory used to generate the GeneralTransferManager contract and this
163+ // B) Deploy the EtherDividendCheckpointLogic Contract (Factory used to generate the EtherDividendCheckpoint contract and this
162164 // manager attach with the securityToken contract at the time of deployment)
163165 return deployer . deploy ( EtherDividendCheckpointLogic , "0x0000000000000000000000000000000000000000" , "0x0000000000000000000000000000000000000000" , { from : PolymathAccount } ) ;
166+ } ) . then ( ( ) => {
167+ // B) Deploy the VestingEscrowWalletLogic Contract (Factory used to generate the VestingEscrowWallet contract and this
168+ // manager attach with the securityToken contract at the time of deployment)
169+ return deployer . deploy ( VestingEscrowWalletLogic , "0x0000000000000000000000000000000000000000" , "0x0000000000000000000000000000000000000000" , { from : PolymathAccount } ) ;
164170 } ) . then ( ( ) => {
165171 // B) Deploy the USDTieredSTOLogic Contract (Factory used to generate the USDTieredSTO contract and this
166172 // manager attach with the securityToken contract at the time of deployment)
167173 return deployer . deploy ( USDTieredSTOLogic , "0x0000000000000000000000000000000000000000" , "0x0000000000000000000000000000000000000000" , { from : PolymathAccount } ) ;
174+ } ) . then ( ( ) => {
175+ // B) Deploy the VestingEscrowWalletFactory Contract (Factory used to generate the VestingEscrowWallet contract and this
176+ // manager attach with the securityToken contract at the time of deployment)
177+ return deployer . deploy ( VestingEscrowWalletFactory , PolyToken , 0 , 0 , 0 , VestingEscrowWalletLogic . address , { from : PolymathAccount } ) ;
168178 } ) . then ( ( ) => {
169179 // B) Deploy the GeneralTransferManagerFactory Contract (Factory used to generate the GeneralTransferManager contract and this
170180 // manager attach with the securityToken contract at the time of deployment)
@@ -220,6 +230,10 @@ module.exports = function (deployer, network, accounts) {
220230 // D) Register the PercentageTransferManagerFactory in the ModuleRegistry to make the factory available at the protocol level.
221231 // So any securityToken can use that factory to generate the PercentageTransferManager contract.
222232 return moduleRegistry . registerModule ( PercentageTransferManagerFactory . address , { from : PolymathAccount } ) ;
233+ } ) . then ( ( ) => {
234+ // D) Register the VestingEscrowWalletFactory in the ModuleRegistry to make the factory available at the protocol level.
235+ // So any securityToken can use that factory to generate the VestingEscrowWallet contract.
236+ return moduleRegistry . registerModule ( VestingEscrowWalletFactory . address , { from : PolymathAccount } ) ;
223237 } ) . then ( ( ) => {
224238 // D) Register the CountTransferManagerFactory in the ModuleRegistry to make the factory available at the protocol level.
225239 // So any securityToken can use that factory to generate the CountTransferManager contract.
@@ -279,6 +293,11 @@ module.exports = function (deployer, network, accounts) {
279293 // contract, Factory should comes under the verified list of factories or those factories deployed by the securityToken issuers only.
280294 // Here it gets verified because it is deployed by the third party account (Polymath Account) not with the issuer accounts.
281295 return moduleRegistry . verifyModule ( ManualApprovalTransferManagerFactory . address , true , { from : PolymathAccount } ) ;
296+ } ) . then ( ( ) => {
297+ // F) Once the VestingEscrowWalletFactory registered with the ModuleRegistry contract then for making them accessble to the securityToken
298+ // contract, Factory should comes under the verified list of factories or those factories deployed by the securityToken issuers only.
299+ // Here it gets verified because it is deployed by the third party account (Polymath Account) not with the issuer accounts.
300+ return moduleRegistry . verifyModule ( VestingEscrowWalletFactory . address , true , { from : PolymathAccount } ) ;
282301 } ) . then ( ( ) => {
283302 // M) Deploy the CappedSTOFactory (Use to generate the CappedSTO contract which will used to collect the funds ).
284303 return deployer . deploy ( CappedSTOFactory , PolyToken , cappedSTOSetupCost , 0 , 0 , { from : PolymathAccount } )
@@ -337,6 +356,8 @@ module.exports = function (deployer, network, accounts) {
337356 ERC20DividendCheckpointLogic: ${ ERC20DividendCheckpointLogic . address }
338357 EtherDividendCheckpointFactory: ${ EtherDividendCheckpointFactory . address }
339358 ERC20DividendCheckpointFactory: ${ ERC20DividendCheckpointFactory . address }
359+ VestingEscrowWalletFactory: ${ VestingEscrowWalletFactory . address }
360+ VestingEscrowWalletLogic: ${ VestingEscrowWalletLogic . address }
340361 ---------------------------------------------------------------------------------
341362 ` ) ;
342363 console . log ( '\n' ) ;
0 commit comments