| 40 | } |
| 41 | |
| 42 | async function step_instance_toSTR(toStrAddress) { |
| 43 | let _toStrAddress; |
| 44 | if (typeof toStrAddress !== 'undefined') { |
| 45 | if (web3.utils.isAddress(toStrAddress)) { |
| 46 | _toStrAddress = toStrAddress; |
| 47 | } else { |
| 48 | console.log(chalk.red("Entered toStrAddress is not a valid address.")); |
| 49 | return; |
| 50 | } |
| 51 | } else { |
| 52 | // _toStrAddress = readlineSync.question('Enter the new SecurityTokenRegistry address to migrate TO: ', { |
| 53 | // limit: function(input) { |
| 54 | // return web3.utils.isAddress(input); |
| 55 | // }, |
| 56 | // limitMessage: "Must be a valid address" |
| 57 | // }); |
| 58 | _toStrAddress = "0x240f9f86b1465bf1b8eb29bc88cbf65573dfdd97"; |
| 59 | } |
| 60 | |
| 61 | console.log(`Creating SecurityTokenRegistry contract instance of address: ${_toStrAddress}...`); |
| 62 | let securityTokenRegistryABI = abis.securityTokenRegistry(); |
| 63 | let toSTR = new web3.eth.Contract(securityTokenRegistryABI, _toStrAddress); |
| 64 | toSTR.setProvider(web3.currentProvider); |
| 65 | |
| 66 | return toSTR; |
| 67 | } |
| 68 | |
| 69 | async function step_instance_fromTR(fromTrAddress) { |
| 70 | let _fromTrAddress; |