AugurProject/augur-core

View on GitHub

Showing 833 of 833 total issues

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

        public logShareTokensTransferred = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logShareTokensTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, from, to, value], "logShareTokensTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 694..699
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public logFeeWindowTransferred = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logFeeWindowTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, from, to, value], "logFeeWindowTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 694..699
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public logFeeTokenTransferred = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logFeeTokenTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, from, to, value], "logFeeTokenTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 694..699
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public logReputationTokensTransferred = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logReputationTokensTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, from, to, value], "logReputationTokensTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public logCompleteSetsPurchased = async(universe: string, market: string, account: string, numCompleteSets: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_account","type":"address"},{"name":"_numCompleteSets","type":"uint256"}],"name":"logCompleteSetsPurchased","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, market, account, numCompleteSets], "logCompleteSetsPurchased", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 694..699
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public logCompleteSetsSold = async(universe: string, market: string, account: string, numCompleteSets: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_account","type":"address"},{"name":"_numCompleteSets","type":"uint256"}],"name":"logCompleteSetsSold","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, market, account, numCompleteSets], "logCompleteSetsSold", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 694..699

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

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

        public logDisputeCrowdsourcerTokensTransferred = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logDisputeCrowdsourcerTokensTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, from, to, value], "logDisputeCrowdsourcerTokensTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 680..685
source/libraries/ContractInterfaces.ts on lines 694..699
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public trustedTransfer = async(token: string, from: string, to: string, amount: BN, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"trustedTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [token, from, to, amount], "trustedTransfer", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 232..237
source/libraries/ContractInterfaces.ts on lines 302..307
source/libraries/ContractInterfaces.ts on lines 400..405
source/libraries/ContractInterfaces.ts on lines 456..461
source/libraries/ContractInterfaces.ts on lines 610..615
source/libraries/ContractInterfaces.ts on lines 694..699
source/libraries/ContractInterfaces.ts on lines 708..713

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

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

        public logFeeTokenTransferred_ = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logFeeTokenTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, from, to, value], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 701..706
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public logShareTokensTransferred_ = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logShareTokensTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, from, to, value], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 701..706
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public logDisputeCrowdsourcerTokensTransferred_ = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logDisputeCrowdsourcerTokensTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, from, to, value], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 701..706
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public logFeeWindowTransferred_ = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logFeeWindowTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, from, to, value], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 701..706
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public logReputationTokensTransferred_ = async(universe: string, from: string, to: string, value: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"logReputationTokensTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, from, to, value], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public logCompleteSetsSold_ = async(universe: string, market: string, account: string, numCompleteSets: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_account","type":"address"},{"name":"_numCompleteSets","type":"uint256"}],"name":"logCompleteSetsSold","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, market, account, numCompleteSets], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 701..706

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

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

        public logCompleteSetsPurchased_ = async(universe: string, market: string, account: string, numCompleteSets: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_account","type":"address"},{"name":"_numCompleteSets","type":"uint256"}],"name":"logCompleteSetsPurchased","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, market, account, numCompleteSets], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 687..692
source/libraries/ContractInterfaces.ts on lines 701..706
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public trustedTransfer_ = async(token: string, from: string, to: string, amount: BN, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"trustedTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [token, from, to, amount], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 7 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 239..244
source/libraries/ContractInterfaces.ts on lines 309..314
source/libraries/ContractInterfaces.ts on lines 407..412
source/libraries/ContractInterfaces.ts on lines 463..468
source/libraries/ContractInterfaces.ts on lines 617..622
source/libraries/ContractInterfaces.ts on lines 701..706
source/libraries/ContractInterfaces.ts on lines 715..720

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

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

        public registerContract = async(key: string, address: string, commitHash: string, bytecodeHash: string, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_key","type":"bytes32"},{"name":"_address","type":"address"},{"name":"_commitHash","type":"bytes20"},{"name":"_bytecodeHash","type":"bytes32"}],"name":"registerContract","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [key, address, commitHash, bytecodeHash], "registerContract", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 2 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 218..223
source/libraries/ContractInterfaces.ts on lines 652..657

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

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

        public logInitialReporterTransferred = async(universe: string, market: string, from: string, to: string, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"logInitialReporterTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, market, from, to], "logInitialReporterTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 2 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 218..223
source/libraries/ContractInterfaces.ts on lines 750..755

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

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

        public logMarketMailboxTransferred = async(universe: string, market: string, from: string, to: string, options?: { sender?: string, gasPrice?: BN }): Promise<void> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"logMarketMailboxTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            await this.remoteCall(abi, [universe, market, from, to], "logMarketMailboxTransferred", options.sender, options.gasPrice);
            return;
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 2 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 652..657
source/libraries/ContractInterfaces.ts on lines 750..755

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

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

        public logInitialReporterTransferred_ = async(universe: string, market: string, from: string, to: string, options?: { sender?: string }): Promise<boolean> => {
            options = options || {};
            const abi: AbiFunction = {"constant":false,"inputs":[{"name":"_universe","type":"address"},{"name":"_market","type":"address"},{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"logInitialReporterTransferred","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"};
            const result = await this.localCall(abi, [universe, market, from, to], options.sender);
            return <boolean>result[0];
Severity: Major
Found in source/libraries/ContractInterfaces.ts and 2 other locations - About 1 day to fix
source/libraries/ContractInterfaces.ts on lines 225..230
source/libraries/ContractInterfaces.ts on lines 757..762

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

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