MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / mintToSingleAddress

Function mintToSingleAddress

CLI/commands/token_manager.js:329–340  ·  view source on GitHub ↗
(_investor, _amount)

Source from the content-addressed store, hash-verified

327}
328
329async 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
342async function multiMint(_csvFilePath, _batchSize) {
343 let csvFilePath;

Callers 1

mintTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected