AugurProject/augur-core

View on GitHub

Showing 833 of 833 total issues

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

        public claimTradingProceeds_ = async(market: string, shareHolder: string, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_shareHolder","type":"address"}],"name":"claimTradingProceeds","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [market, shareHolder], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 6 other locations - About 7 hrs to fix
source/libraries/ContractInterfaces.ts on lines 148..153
source/libraries/ContractInterfaces.ts on lines 162..167
source/libraries/ContractInterfaces.ts on lines 2017..2022
source/libraries/ContractInterfaces.ts on lines 3102..3107
source/libraries/ContractInterfaces.ts on lines 3312..3317
source/libraries/ContractInterfaces.ts on lines 4705..4710

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

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

        public initialize_ = async(market: string, size: BN, payoutDistributionHash: string, payoutNumerators: Array<BN>, invalid: boolean, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_size","type":"uint256"},{"name":"_payoutDistributionHash","type":"bytes32"},{"name":"_payoutNumerators","type":"uint256[]"},{"name":"_invalid","type":"bool"}],"name":"initialize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [market, size, payoutDistributionHash, payoutNumerators, invalid], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 7 hrs to fix
source/libraries/ContractInterfaces.ts on lines 323..328

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

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

        public initialize = async(market: string, size: BN, payoutDistributionHash: string, payoutNumerators: Array<BN>, invalid: boolean, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_market","type":"address"},{"name":"_size","type":"uint256"},{"name":"_payoutDistributionHash","type":"bytes32"},{"name":"_payoutNumerators","type":"uint256[]"},{"name":"_invalid","type":"bool"}],"name":"initialize","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [market, size, payoutDistributionHash, payoutNumerators, invalid], "initialize", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 316..321

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

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

        public logDisputeCrowdsourcerContribution = async(universe: string, reporter: string, market: string, disputeCrowdsourcer: string, amountStaked: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_reporter","type":"address"},{"name":"_market","type":"address"},{"name":"_disputeCrowdsourcer","type":"address"},{"name":"_amountStaked","type":"uint256"}],"name":"logDisputeCrowdsourcerContribution","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, reporter, market, disputeCrowdsourcer, amountStaked], "logDisputeCrowdsourcerContribution", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 2269..2274

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        public migrateBalancesFromLegacyRep = async(holders: Array<string>, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_holders","type":"address[]"}],"name":"migrateBalancesFromLegacyRep","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [holders], "migrateBalancesFromLegacyRep", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 4047..4052

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        public migrateBalancesFromLegacyRep = async(holders: Array<string>, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_holders","type":"address[]"}],"name":"migrateBalancesFromLegacyRep","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [holders], "migrateBalancesFromLegacyRep", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 1226..1231

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        public migrateBalancesFromLegacyRep_ = async(holders: Array<string>, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_holders","type":"address[]"}],"name":"migrateBalancesFromLegacyRep","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [holders], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 4054..4059

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

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

        public getPayoutNumerator_ = async(outcome: BN, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_outcome","type":"uint256"}],"name":"getPayoutNumerator","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [outcome], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 4 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 2381..2386
source/libraries/ContractInterfaces.ts on lines 3522..3527
source/libraries/ContractInterfaces.ts on lines 3844..3849
source/libraries/ContractInterfaces.ts on lines 4789..4794

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

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

        public deriveMarketCreatorFeeAmount_ = async(amount: BN, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_amount","type":"uint256"}],"name":"deriveMarketCreatorFeeAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [amount], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 4 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 2381..2386
source/libraries/ContractInterfaces.ts on lines 3228..3233
source/libraries/ContractInterfaces.ts on lines 3522..3527
source/libraries/ContractInterfaces.ts on lines 4789..4794

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

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

        public getPayoutNumerator_ = async(outcome: BN, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_outcome","type":"uint256"}],"name":"getPayoutNumerator","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [outcome], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 4 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 3228..3233
source/libraries/ContractInterfaces.ts on lines 3522..3527
source/libraries/ContractInterfaces.ts on lines 3844..3849
source/libraries/ContractInterfaces.ts on lines 4789..4794

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

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

        public getFeeWindowId_ = async(timestamp: BN, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_timestamp","type":"uint256"}],"name":"getFeeWindowId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [timestamp], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 4 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 2381..2386
source/libraries/ContractInterfaces.ts on lines 3228..3233
source/libraries/ContractInterfaces.ts on lines 3522..3527
source/libraries/ContractInterfaces.ts on lines 3844..3849

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

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        public migrateBalancesFromLegacyRep_ = async(holders: Array<string>, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_holders","type":"address[]"}],"name":"migrateBalancesFromLegacyRep","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [holders], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 1 other location - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 1233..1238

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

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

        public getWinningPayoutNumerator_ = async(outcome: BN, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_outcome","type":"uint256"}],"name":"getWinningPayoutNumerator","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [outcome], options.sender);
            return <BN>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 4 other locations - About 6 hrs to fix
source/libraries/ContractInterfaces.ts on lines 2381..2386
source/libraries/ContractInterfaces.ts on lines 3228..3233
source/libraries/ContractInterfaces.ts on lines 3844..3849
source/libraries/ContractInterfaces.ts on lines 4789..4794

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

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 getStakeInOutcome_ = async(payoutDistributionHash: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_payoutDistributionHash","type":"bytes32"}],"name":"getStakeInOutcome","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [payoutDistributionHash], 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 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 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 getTotalEscrowed_ = async(market: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_market","type":"address"}],"name":"getTotalEscrowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"};
            const result = await this.localCall(abi, [market], 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 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 getFrozenShareValueInMarket_ = async(market: string, options?: { sender?: string }): Promise<BN> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_market","type":"address"}],"name":"getFrozenShareValueInMarket","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [market], 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 5755..5760
source/libraries/ContractInterfaces.ts on lines 5944..5949

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 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 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 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 4026..4031
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

Severity
Category
Status
Source
Language