(account_polymath)
| 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 |
| 176 | let USDPOLY = new BN(25).mul(new BN(10).pow(new BN(16))); // 0.25 USD/POLY |
| 177 | let StableChange = new BN(10).mul(new BN(10).pow(new BN(16))); // 0.25 USD/POLY |
| 178 | I_USDOracle = await MockOracle.new("0x0000000000000000000000000000000000000000", web3.utils.fromAscii("ETH"), web3.utils.fromAscii("USD"), USDETH, { from: account_polymath }); // 500 dollars per POLY |
| 179 | I_POLYOracle = await MockOracle.new(I_PolyToken.address, web3.utils.fromAscii("POLY"), web3.utils.fromAscii("USD"), USDPOLY, { from: account_polymath }); // 25 cents per POLY |
| 180 | I_StablePOLYOracle = await StableOracle.new(I_POLYOracle.address, StableChange, { from: account_polymath }); |
| 181 | await I_PolymathRegistry.changeAddress("EthUsdOracle", I_USDOracle.address, { from: account_polymath }); |
| 182 | await I_PolymathRegistry.changeAddress("PolyUsdOracle", I_POLYOracle.address, { from: account_polymath }); |
| 183 | await I_PolymathRegistry.changeAddress("StablePolyUsdOracle", I_StablePOLYOracle.address, { from: account_polymath }); |
| 184 | } |
| 185 | |
| 186 | export async function deployPolyRegistryAndPolyToken(account_polymath, token_owner) { |
| 187 | // Step 0: Deploy the PolymathRegistry |
no outgoing calls
no test coverage detected