Skip to content

Commit 2c818be

Browse files
authored
Merge pull request #283 from PolymathNetwork/withholding_tax_on_dividends
Minor changes and CLI support for withholding tax
2 parents 4570480 + fe71172 commit 2c818be

File tree

9 files changed

+194
-65
lines changed

9 files changed

+194
-65
lines changed

CLI/commands/ST20Generator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ async function step_ticker_reg(){
144144
});
145145
let transferTickerOwnershipAction = securityTokenRegistry.methods.transferTickerOwnership(newOwner, tokenSymbol);
146146
let receipt = await common.sendTransaction(Issuer, transferTickerOwnershipAction, defaultGasPrice, 0, 1.5);
147-
let event = common.getEventFromLogs(securityTokenRegistry._jsonInterface, receipt.logs, 'LogChangeTickerOwnership');
147+
let event = common.getEventFromLogs(securityTokenRegistry._jsonInterface, receipt.logs, 'ChangeTickerOwnership');
148148
console.log(chalk.green(`Ownership trasferred successfully. The new owner is ${event._newOwner}`));
149149
process.exit(0);
150150
}
@@ -187,7 +187,7 @@ async function step_token_deploy(){
187187
await approvePoly(securityTokenRegistryAddress, launchFee);
188188
let generateSecurityTokenAction = securityTokenRegistry.methods.generateSecurityToken(tokenName, tokenSymbol, tokenDetails, divisibility);
189189
let receipt = await common.sendTransaction(Issuer, generateSecurityTokenAction, defaultGasPrice);
190-
let event = common.getEventFromLogs(securityTokenRegistry._jsonInterface, receipt.logs, 'LogNewSecurityToken');
190+
let event = common.getEventFromLogs(securityTokenRegistry._jsonInterface, receipt.logs, 'NewSecurityToken');
191191
console.log(`Deployed Token at address: ${event._securityTokenAddress}`);
192192
let securityTokenABI = abis.securityToken();
193193
securityToken = new web3.eth.Contract(securityTokenABI, event._securityTokenAddress);
@@ -444,7 +444,7 @@ async function cappedSTO_launch() {
444444

445445
let addModuleAction = securityToken.methods.addModule(cappedSTOFactoryAddress, bytesSTO, new BigNumber(stoFee).times(new BigNumber(10).pow(18)), 0);
446446
let receipt = await common.sendTransaction(Issuer, addModuleAction, defaultGasPrice);
447-
let event = common.getEventFromLogs(securityToken._jsonInterface, receipt.logs, 'LogModuleAdded');
447+
let event = common.getEventFromLogs(securityToken._jsonInterface, receipt.logs, 'ModuleAdded');
448448
console.log(`STO deployed at address: ${event._module}`);
449449

450450
STO_Address = event._module;
@@ -828,7 +828,7 @@ async function usdTieredSTO_launch() {
828828

829829
let addModuleAction = securityToken.methods.addModule(usdTieredSTOFactoryAddress, bytesSTO, new BigNumber(stoFee).times(new BigNumber(10).pow(18)), 0);
830830
let receipt = await common.sendTransaction(Issuer, addModuleAction, defaultGasPrice);
831-
let event = common.getEventFromLogs(securityToken._jsonInterface, receipt.logs, 'LogModuleAdded');
831+
let event = common.getEventFromLogs(securityToken._jsonInterface, receipt.logs, 'ModuleAdded');
832832
console.log(`STO deployed at address: ${event._module}`);
833833

834834
STO_Address = event._module;

CLI/commands/contract_manager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ async function strActions() {
173173
let newExpiryLimit = duration.days(readlineSync.questionInt('Enter a new value in days for expiry limit: '));
174174
let changeExpiryLimitAction = currentContract.methods.changeExpiryLimit(newExpiryLimit);
175175
let changeExpiryLimitReceipt = await common.sendTransaction(Issuer, changeExpiryLimitAction, defaultGasPrice);
176-
let changeExpiryLimitEvent = common.getEventFromLogs(currentContract._jsonInterface, changeExpiryLimitReceipt.logs, 'LogChangeExpiryLimit');
176+
let changeExpiryLimitEvent = common.getEventFromLogs(currentContract._jsonInterface, changeExpiryLimitReceipt.logs, 'ChangeExpiryLimit');
177177
console.log(chalk.green(`Expiry limit was changed successfuly. New limit is ${Math.floor(parseInt(changeExpiryLimitEvent._newExpiry)/60/60/24)} days\n`));
178178
break;
179179
case 'Change registration fee':
@@ -182,7 +182,7 @@ async function strActions() {
182182
let newRegFee = web3.utils.toWei(readlineSync.questionInt('Enter a new value in POLY for ticker registration fee: ').toString());
183183
let changeRegFeeAction = currentContract.methods.changeTickerRegistrationFee(newRegFee);
184184
let changeRegFeeReceipt = await common.sendTransaction(Issuer, changeRegFeeAction, defaultGasPrice);
185-
let changeRegFeeEvent = common.getEventFromLogs(currentContract._jsonInterface, changeRegFeeReceipt.logs, 'LogChangeTickerRegistrationFee');
185+
let changeRegFeeEvent = common.getEventFromLogs(currentContract._jsonInterface, changeRegFeeReceipt.logs, 'ChangeTickerRegistrationFee');
186186
console.log(chalk.green(`Fee was changed successfuly. New fee is ${web3.utils.fromWei(changeRegFeeEvent._newFee)} POLY\n`));
187187
break;
188188
case 'Change ST launch fee':
@@ -191,7 +191,7 @@ async function strActions() {
191191
let newLaunchFee = web3.utils.toWei(readlineSync.questionInt('Enter a new value in POLY for ST launch fee: ').toString());
192192
let changeLaunchFeeAction = currentContract.methods.changeSecurityLaunchFee(newLaunchFee);
193193
let changeLaunchFeeReceipt = await common.sendTransaction(Issuer, changeLaunchFeeAction, defaultGasPrice);
194-
let changeLaunchFeeEvent = common.getEventFromLogs(currentContract._jsonInterface, changeLaunchFeeReceipt.logs, 'LogChangeSecurityLaunchFee');
194+
let changeLaunchFeeEvent = common.getEventFromLogs(currentContract._jsonInterface, changeLaunchFeeReceipt.logs, 'ChangeSecurityLaunchFee');
195195
console.log(chalk.green(`Fee was changed successfuly. New fee is ${web3.utils.fromWei(changeLaunchFeeEvent._newFee)} POLY\n`));
196196
break;
197197
case 'CANCEL':

0 commit comments

Comments
 (0)