(account_polymath, token_owner)
| 128 | /// Function use to launch the polymath ecossystem. |
| 129 | |
| 130 | export async function setUpPolymathNetwork(account_polymath, token_owner) { |
| 131 | // ----------- POLYMATH NETWORK Configuration ------------ |
| 132 | // Step 1: Deploy the PolyToken and PolymathRegistry |
| 133 | let a = await deployPolyRegistryAndPolyToken(account_polymath, token_owner); |
| 134 | // Step 2: Deploy the FeatureRegistry |
| 135 | let b = await deployFeatureRegistry(account_polymath); |
| 136 | // STEP 3: Deploy the ModuleRegistry |
| 137 | let c = await deployModuleRegistry(account_polymath); |
| 138 | // STEP 4a: Deploy the GeneralTransferManagerFactory |
| 139 | let logic = await deployGTMLogic(account_polymath); |
| 140 | // STEP 4b: Deploy the GeneralTransferManagerFactory |
| 141 | let d = await deployGTM(account_polymath); |
| 142 | // Step 6: Deploy the STversionProxy contract |
| 143 | let e = await deploySTFactory(account_polymath); |
| 144 | // Step 7: Deploy the SecurityTokenRegistry |
| 145 | let f = await deploySTR(account_polymath); |
| 146 | // Step 8: update the registries addresses from the PolymathRegistry contract |
| 147 | await setInPolymathRegistry(account_polymath); |
| 148 | // STEP 9: Register the Modules with the ModuleRegistry contract |
| 149 | await registerGTM(account_polymath); |
| 150 | // STEP 10: Add dummy oracles |
| 151 | await addOracles(account_polymath); |
| 152 | |
| 153 | let tempArray = new Array( |
| 154 | I_PolymathRegistry, |
| 155 | I_PolyToken, |
| 156 | I_FeatureRegistry, |
| 157 | I_ModuleRegistry, |
| 158 | I_ModuleRegistryProxy, |
| 159 | I_MRProxied, |
| 160 | I_GeneralTransferManagerFactory, |
| 161 | I_STFactory, |
| 162 | I_SecurityTokenRegistry, |
| 163 | I_SecurityTokenRegistryProxy, |
| 164 | I_STRProxied, |
| 165 | I_STRGetter, |
| 166 | I_STGetter, |
| 167 | I_USDOracle, |
| 168 | I_POLYOracle, |
| 169 | I_StablePOLYOracle |
| 170 | ); |
| 171 | return Promise.all(tempArray); |
| 172 | } |
| 173 | |
| 174 | export async function addOracles(account_polymath) { |
| 175 | let USDETH = new BN(500).mul(new BN(10).pow(new BN(18))); // 500 USD/ETH |
no test coverage detected