(fromStrAddress)
| 178 | } |
| 179 | |
| 180 | async function step_instance_fromSTR(fromStrAddress) { |
| 181 | let _fromStrAddress; |
| 182 | if (typeof fromStrAddress !== 'undefined') { |
| 183 | if (web3.utils.isAddress(fromStrAddress)) { |
| 184 | _fromStrAddress = fromStrAddress; |
| 185 | } else { |
| 186 | console.log(chalk.red("Entered fromStrAddress is not a valid address.")); |
| 187 | return; |
| 188 | } |
| 189 | } else { |
| 190 | // _fromStrAddress = readlineSync.question('Enter the old SecurityTokenRegistry address to migrate FROM: ', { |
| 191 | // limit: function(input) { |
| 192 | // return web3.utils.isAddress(input); |
| 193 | // }, |
| 194 | // limitMessage: "Must be a valid address" |
| 195 | // }); |
| 196 | _fromStrAddress = "0xef58491224958d978facf55d2120c55a24516b98"; |
| 197 | } |
| 198 | |
| 199 | console.log(`Creating SecurityTokenRegistry contract instance of address: ${_fromStrAddress}...`); |
| 200 | let securityTokenRegistryABI = await getABIfromEtherscan(_fromStrAddress); |
| 201 | let fromSTR = new web3.eth.Contract(securityTokenRegistryABI, _fromStrAddress); |
| 202 | fromSTR.setProvider(web3.currentProvider); |
| 203 | |
| 204 | return fromSTR; |
| 205 | } |
| 206 | |
| 207 | async function step_get_deployed_tokens(securityTokenRegistry, singleTicker) { |
| 208 | let tokens = []; |
no test coverage detected