AugurProject/augur-core

View on GitHub

Showing 833 of 833 total issues

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

        public getOrderMoneyEscrowed_ = async(orderId: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_orderId","type":"bytes32"}],"name":"getOrderMoneyEscrowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [orderId], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public getOutcome_ = async(orderId: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_orderId","type":"bytes32"}],"name":"getOutcome","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [orderId], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public getOrderSharesEscrowed_ = async(orderId: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_orderId","type":"bytes32"}],"name":"getOrderSharesEscrowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [orderId], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public balanceOf_ = async(owner: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [owner], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public balanceOf_ = async(owner: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [owner], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public getPrice_ = async(orderId: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_orderId","type":"bytes32"}],"name":"getPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [orderId], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public getAmount_ = async(orderId: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_orderId","type":"bytes32"}],"name":"getAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [orderId], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public balanceOf_ = async(owner: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [owner], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public balanceOf_ = async(owner: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [owner], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5734..5739
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public getOrderType_ = async(orderId: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_orderId","type":"bytes32"}],"name":"getOrderType","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [orderId], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 988..993
source/libraries/ContractInterfaces.ts on lines 1205..1210
source/libraries/ContractInterfaces.ts on lines 2248..2253
source/libraries/ContractInterfaces.ts on lines 2521..2526
source/libraries/ContractInterfaces.ts on lines 2759..2764
source/libraries/ContractInterfaces.ts on lines 3599..3604
source/libraries/ContractInterfaces.ts on lines 4026..4031
source/libraries/ContractInterfaces.ts on lines 5104..5109
source/libraries/ContractInterfaces.ts on lines 5524..5529
source/libraries/ContractInterfaces.ts on lines 5594..5599
source/libraries/ContractInterfaces.ts on lines 5601..5606
source/libraries/ContractInterfaces.ts on lines 5622..5627
source/libraries/ContractInterfaces.ts on lines 5636..5641
source/libraries/ContractInterfaces.ts on lines 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949
source/libraries/ContractInterfaces.ts on lines 6259..6264

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 165.

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 17 locations. Consider refactoring.
Open

        public faucet = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"faucet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "faucet", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public setTimestamp = async(timestamp: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_timestamp","type":"uint256"}],"name":"setTimestamp","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [timestamp], "setTimestamp", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public incrementOpenInterestFromMarket = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"incrementOpenInterestFromMarket","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "incrementOpenInterestFromMarket", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public buyParticipationTokens = async(attotokens: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_attotokens","type":"uint256"}],"name":"buyParticipationTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [attotokens], "buyParticipationTokens", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public getOrCreateFeeWindowByTimestamp = async(timestamp: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_timestamp","type":"uint256"}],"name":"getOrCreateFeeWindowByTimestamp","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [timestamp], "getOrCreateFeeWindowByTimestamp", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public incrementOpenInterest = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"incrementOpenInterest","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "incrementOpenInterest", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public withdrawEther = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdrawEther","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "withdrawEther", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766

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 164.

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 17 locations. Consider refactoring.
Open

        public mintFeeTokens = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"mintFeeTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "mintFeeTokens", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public faucet = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"faucet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "faucet", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4663..4668
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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 17 locations. Consider refactoring.
Open

        public decrementOpenInterest = async(amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"decrementOpenInterest","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [amount], "decrementOpenInterest", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 16 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 638..643
source/libraries/ContractInterfaces.ts on lines 946..951
source/libraries/ContractInterfaces.ts on lines 1156..1161
source/libraries/ContractInterfaces.ts on lines 1394..1399
source/libraries/ContractInterfaces.ts on lines 1562..1567
source/libraries/ContractInterfaces.ts on lines 1576..1581
source/libraries/ContractInterfaces.ts on lines 2843..2848
source/libraries/ContractInterfaces.ts on lines 2969..2974
source/libraries/ContractInterfaces.ts on lines 3879..3884
source/libraries/ContractInterfaces.ts on lines 4215..4220
source/libraries/ContractInterfaces.ts on lines 4306..4311
source/libraries/ContractInterfaces.ts on lines 4334..4339
source/libraries/ContractInterfaces.ts on lines 4439..4444
source/libraries/ContractInterfaces.ts on lines 4677..4682
source/libraries/ContractInterfaces.ts on lines 4761..4766
source/libraries/ContractInterfaces.ts on lines 5055..5060

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 164.

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