AugurProject/augur-core

View on GitHub

Showing 833 of 833 total issues

Similar blocks of code found in 53 locations. Consider refactoring.
Open

        public decreaseApproval = async(spender: string, subtractedValue: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [spender, subtractedValue], "decreaseApproval", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 52 other locations - About 7 hrs to fix
source/libraries/ContractInterfaces.ts on lines 491..496
source/libraries/ContractInterfaces.ts on lines 890..895
source/libraries/ContractInterfaces.ts on lines 974..979
source/libraries/ContractInterfaces.ts on lines 1023..1028
source/libraries/ContractInterfaces.ts on lines 1037..1042
source/libraries/ContractInterfaces.ts on lines 1086..1091
source/libraries/ContractInterfaces.ts on lines 1177..1182
source/libraries/ContractInterfaces.ts on lines 1191..1196
source/libraries/ContractInterfaces.ts on lines 1289..1294
source/libraries/ContractInterfaces.ts on lines 1317..1322
source/libraries/ContractInterfaces.ts on lines 1366..1371
source/libraries/ContractInterfaces.ts on lines 2150..2155
source/libraries/ContractInterfaces.ts on lines 2234..2239
source/libraries/ContractInterfaces.ts on lines 2255..2260
source/libraries/ContractInterfaces.ts on lines 2325..2330
source/libraries/ContractInterfaces.ts on lines 2367..2372
source/libraries/ContractInterfaces.ts on lines 2451..2456
source/libraries/ContractInterfaces.ts on lines 2549..2554
source/libraries/ContractInterfaces.ts on lines 2563..2568
source/libraries/ContractInterfaces.ts on lines 2598..2603
source/libraries/ContractInterfaces.ts on lines 2633..2638
source/libraries/ContractInterfaces.ts on lines 2661..2666
source/libraries/ContractInterfaces.ts on lines 2745..2750
source/libraries/ContractInterfaces.ts on lines 2766..2771
source/libraries/ContractInterfaces.ts on lines 2857..2862
source/libraries/ContractInterfaces.ts on lines 2934..2939
source/libraries/ContractInterfaces.ts on lines 2955..2960
source/libraries/ContractInterfaces.ts on lines 3921..3926
source/libraries/ContractInterfaces.ts on lines 3998..4003
source/libraries/ContractInterfaces.ts on lines 4012..4017
source/libraries/ContractInterfaces.ts on lines 4110..4115
source/libraries/ContractInterfaces.ts on lines 4138..4143
source/libraries/ContractInterfaces.ts on lines 4187..4192
source/libraries/ContractInterfaces.ts on lines 4992..4997
source/libraries/ContractInterfaces.ts on lines 5013..5018
source/libraries/ContractInterfaces.ts on lines 5090..5095
source/libraries/ContractInterfaces.ts on lines 5146..5151
source/libraries/ContractInterfaces.ts on lines 5167..5172
source/libraries/ContractInterfaces.ts on lines 5195..5200
source/libraries/ContractInterfaces.ts on lines 5230..5235
source/libraries/ContractInterfaces.ts on lines 5300..5305
source/libraries/ContractInterfaces.ts on lines 5335..5340
source/libraries/ContractInterfaces.ts on lines 5391..5396
source/libraries/ContractInterfaces.ts on lines 5545..5550
source/libraries/ContractInterfaces.ts on lines 5706..5711
source/libraries/ContractInterfaces.ts on lines 5846..5851
source/libraries/ContractInterfaces.ts on lines 5860..5865
source/libraries/ContractInterfaces.ts on lines 5930..5935
source/libraries/ContractInterfaces.ts on lines 6007..6012
source/libraries/ContractInterfaces.ts on lines 6028..6033
source/libraries/ContractInterfaces.ts on lines 6042..6047
source/libraries/ContractInterfaces.ts on lines 6056..6061

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 182.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

FeeWindow has 52 functions (exceeds 20 allowed). Consider refactoring.
Open

    export class FeeWindow extends Controlled {
        public constructor(connector: Connector, accountManager: AccountManager, address: string, defaultGasPrice: BN) {
            super(connector, accountManager, address, defaultGasPrice);
        }

Severity: Major
Found in source/libraries/ContractInterfaces.ts - About 7 hrs to fix

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public decreaseApproval_ = async(spender: string, subtractedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, subtractedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public transfer_ = async(to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [to, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public initialize_ = async(universe: string, feeWindowId: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_feeWindowId","type":"uint256"}],"name":"initialize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [universe, feeWindowId], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public decreaseApproval_ = async(spender: string, subtractedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, subtractedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public transfer_ = async(to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [to, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public decreaseApproval_ = async(spender: string, subtractedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, subtractedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public increaseApproval_ = async(spender: string, addedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, addedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public approve_ = async(spender: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public transfer_ = async(to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [to, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public feeWindowBurn_ = async(target: string, amount: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_amount","type":"uint256"}],"name":"feeWindowBurn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [target, amount], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public migrateIn_ = async(reporter: string, attotokens: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_reporter","type":"address"},{"name":"_attotokens","type":"uint256"}],"name":"migrateIn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [reporter, attotokens], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public approve_ = async(spender: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public increaseApproval_ = async(spender: string, addedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, addedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public transfer_ = async(to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [to, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public increaseApproval_ = async(spender: string, addedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, addedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public increaseApproval_ = async(spender: string, addedValue: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, addedValue], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public mintForReportingParticipant_ = async(target: string, amount: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mintForReportingParticipant","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [target, amount], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1093..1098
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 51 locations. Consider refactoring.
    Open

            public approve_ = async(spender: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
                options = options || {};
                const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
                const result = await this.localCall(abi, [spender, value], options.sender);
                return <boolean>result[0];
    Severity: Major
    Found in source/libraries/ContractInterfaces.ts and 50 other locations - About 7 hrs to fix
    source/libraries/ContractInterfaces.ts on lines 498..503
    source/libraries/ContractInterfaces.ts on lines 897..902
    source/libraries/ContractInterfaces.ts on lines 981..986
    source/libraries/ContractInterfaces.ts on lines 1030..1035
    source/libraries/ContractInterfaces.ts on lines 1044..1049
    source/libraries/ContractInterfaces.ts on lines 1184..1189
    source/libraries/ContractInterfaces.ts on lines 1198..1203
    source/libraries/ContractInterfaces.ts on lines 1296..1301
    source/libraries/ContractInterfaces.ts on lines 1324..1329
    source/libraries/ContractInterfaces.ts on lines 1373..1378
    source/libraries/ContractInterfaces.ts on lines 2157..2162
    source/libraries/ContractInterfaces.ts on lines 2241..2246
    source/libraries/ContractInterfaces.ts on lines 2332..2337
    source/libraries/ContractInterfaces.ts on lines 2374..2379
    source/libraries/ContractInterfaces.ts on lines 2458..2463
    source/libraries/ContractInterfaces.ts on lines 2514..2519
    source/libraries/ContractInterfaces.ts on lines 2556..2561
    source/libraries/ContractInterfaces.ts on lines 2570..2575
    source/libraries/ContractInterfaces.ts on lines 2605..2610
    source/libraries/ContractInterfaces.ts on lines 2640..2645
    source/libraries/ContractInterfaces.ts on lines 2668..2673
    source/libraries/ContractInterfaces.ts on lines 2752..2757
    source/libraries/ContractInterfaces.ts on lines 2773..2778
    source/libraries/ContractInterfaces.ts on lines 2864..2869
    source/libraries/ContractInterfaces.ts on lines 2941..2946
    source/libraries/ContractInterfaces.ts on lines 2962..2967
    source/libraries/ContractInterfaces.ts on lines 3928..3933
    source/libraries/ContractInterfaces.ts on lines 4005..4010
    source/libraries/ContractInterfaces.ts on lines 4019..4024
    source/libraries/ContractInterfaces.ts on lines 4117..4122
    source/libraries/ContractInterfaces.ts on lines 4145..4150
    source/libraries/ContractInterfaces.ts on lines 4194..4199
    source/libraries/ContractInterfaces.ts on lines 4999..5004
    source/libraries/ContractInterfaces.ts on lines 5020..5025
    source/libraries/ContractInterfaces.ts on lines 5097..5102
    source/libraries/ContractInterfaces.ts on lines 5153..5158
    source/libraries/ContractInterfaces.ts on lines 5174..5179
    source/libraries/ContractInterfaces.ts on lines 5202..5207
    source/libraries/ContractInterfaces.ts on lines 5307..5312
    source/libraries/ContractInterfaces.ts on lines 5342..5347
    source/libraries/ContractInterfaces.ts on lines 5398..5403
    source/libraries/ContractInterfaces.ts on lines 5552..5557
    source/libraries/ContractInterfaces.ts on lines 5713..5718
    source/libraries/ContractInterfaces.ts on lines 5853..5858
    source/libraries/ContractInterfaces.ts on lines 5867..5872
    source/libraries/ContractInterfaces.ts on lines 5937..5942
    source/libraries/ContractInterfaces.ts on lines 6014..6019
    source/libraries/ContractInterfaces.ts on lines 6035..6040
    source/libraries/ContractInterfaces.ts on lines 6049..6054
    source/libraries/ContractInterfaces.ts on lines 6063..6068

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 181.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language