Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit adfab67

Browse files
author
Victor Wiebe
committed
fix: 🐛 blacklistTM refactoring and abi issues
1 parent 39ab840 commit adfab67

File tree

5 files changed

+2456
-1386
lines changed

5 files changed

+2456
-1386
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = {
2121
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
2222
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
2323
'@typescript-eslint/explicit-function-return-type': 'off',
24+
"import/prefer-default-export": 'off',
2425
'jest/expect-expect': 'error',
2526
'jest/no-empty-title': 'warn',
2627
'jest/no-truthy-falsy': 'warn',

examples/blacklistTransferManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ window.addEventListener('load', async () => {
2727
const tokenName = prompt('Token Name', '');
2828

2929
// Double check available
30-
await polymathAPI.securityTokenRegistry.isTickerAvailable({
30+
await polymathAPI.securityTokenRegistry.tickerAvailable({
3131
ticker: ticker!,
3232
});
3333
// Get the ticker fee and approve the security token registry to spend

src/PolymathAPI.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@ import {
44
BigNumber,
55
providerUtils,
66
Provider,
7-
PolymathRegistry,
8-
ISecurityTokenRegistry,
9-
ISecurityToken,
10-
PolyToken,
11-
ModuleRegistry,
12-
CappedSTO,
13-
ModuleFactory,
14-
USDTieredSTO,
15-
FeatureRegistry,
16-
GeneralTransferManager,
17-
GeneralPermissionManager,
18-
ERC20DividendCheckpoint,
19-
ManualApprovalTransferManager,
20-
CountTransferManager,
21-
PercentageTransferManager,
22-
LockUpTransferManager,
23-
BlacklistTransferManager,
24-
EtherDividendCheckpoint,
25-
VolumeRestrictionTransferManager,
26-
PolyTokenFaucet,
27-
Module,
28-
ERC20Detailed,
7+
BlacklistTransferManagerContract,
8+
CappedSTOContract,
9+
CountTransferManagerContract,
10+
ERC20DetailedContract,
11+
ERC20DividendCheckpointContract,
12+
EtherDividendCheckpointContract,
13+
FeatureRegistryContract,
14+
GeneralPermissionManagerContract,
15+
GeneralTransferManagerContract,
16+
ISecurityTokenContract,
17+
ISecurityTokenRegistryContract,
18+
LockUpTransferManagerContract,
19+
ManualApprovalTransferManagerContract,
20+
ModuleContract,
21+
ModuleFactoryContract,
22+
ModuleRegistryContract,
23+
PercentageTransferManagerContract,
24+
PolymathRegistryContract,
25+
PolyTokenContract,
26+
PolyTokenFaucetContract,
27+
USDTieredSTOContract,
28+
VolumeRestrictionTMContract,
2929
} from '@polymathnetwork/abi-wrappers';
3030
import PolymathRegistryWrapper from './contract_wrappers/registries/polymath_registry_wrapper';
3131
import SecurityTokenRegistryWrapper from './contract_wrappers/registries/security_token_registry_wrapper';

src/contract_wrappers/modules/transfer_manager/blacklist_transfer_manager_wrapper.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {
22
BigNumber,
3-
ContractAbi,
4-
BlacklistTransferManager,
53
BlacklistTransferManagerContract,
64
BlacklistTransferManagerEventArgs,
75
BlacklistTransferManagerEvents,
@@ -223,8 +221,6 @@ interface BlacklistsDetails {
223221
* This class includes the functionality related to interacting with the Blacklist Transfer Manager contract.
224222
*/
225223
export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
226-
public abi: ContractAbi = BlacklistTransferManager.abi;
227-
228224
protected contract: Promise<BlacklistTransferManagerContract>;
229225

230226
/**
@@ -687,11 +683,10 @@ export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
687683
assert.doesConformToSchema('indexFilterValues', params.indexFilterValues, schemas.indexFilterValuesSchema);
688684
assert.isFunction('callback', params.callback);
689685
const normalizedContractAddress = (await this.contract).address.toLowerCase();
690-
const subscriptionToken = this.subscribeInternal<ArgsType>(
686+
const subscriptionToken = await this.subscribeInternal<ArgsType>(
691687
normalizedContractAddress,
692688
params.eventName,
693689
params.indexFilterValues,
694-
BlacklistTransferManager.abi,
695690
params.callback,
696691
params.isVerbose,
697692
);
@@ -716,7 +711,6 @@ export default class BlacklistTransferManagerWrapper extends ModuleWrapper {
716711
params.eventName,
717712
params.blockRange,
718713
params.indexFilterValues,
719-
BlacklistTransferManager.abi,
720714
);
721715
return logs;
722716
};

0 commit comments

Comments
 (0)