| 327 | } |
| 328 | |
| 329 | async function mintToSingleAddress(_investor, _amount) { |
| 330 | try { |
| 331 | let mintAction = securityToken.methods.mint(_investor, web3.utils.toWei(_amount)); |
| 332 | let receipt = await common.sendTransaction(mintAction); |
| 333 | let event = common.getEventFromLogs(securityToken._jsonInterface, receipt.logs, 'Minted'); |
| 334 | console.log(chalk.green(`${web3.utils.fromWei(event._value)} tokens have been minted to ${event._to} successfully.`)); |
| 335 | } |
| 336 | catch (e) { |
| 337 | console.log(e); |
| 338 | console.log(chalk.red(`Minting was not successful - Please make sure beneficiary address has been whitelisted`)); |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | async function multiMint(_csvFilePath, _batchSize) { |
| 343 | let csvFilePath; |