From d73bf01bd8defb978b3ccd3810b6a515d60dc15c Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 12 Feb 2020 18:54:29 +0530 Subject: [PATCH] Module removed from modules --- remix-analyzer/src/solidity-analyzer/modules/assignAndCompare.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts | 1 - .../src/solidity-analyzer/modules/checksEffectsInteraction.ts | 1 - .../src/solidity-analyzer/modules/constantFunctions.ts | 1 - .../src/solidity-analyzer/modules/deleteDynamicArrays.ts | 1 - .../src/solidity-analyzer/modules/deleteFromDynamicArray.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts | 1 - .../src/solidity-analyzer/modules/etherTransferInLoop.ts | 1 - .../solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/guardConditions.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts | 1 - .../src/solidity-analyzer/modules/intDivisionTruncate.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/noReturn.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts | 1 - .../src/solidity-analyzer/modules/similarVariableNames.ts | 1 - .../src/solidity-analyzer/modules/stringBytesLength.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts | 1 - remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts | 1 - 21 files changed, 21 deletions(-) diff --git a/remix-analyzer/src/solidity-analyzer/modules/assignAndCompare.ts b/remix-analyzer/src/solidity-analyzer/modules/assignAndCompare.ts index 1067e2f263..2b9ef55c17 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/assignAndCompare.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/assignAndCompare.ts @@ -8,7 +8,6 @@ export default class assignAndCompare { description = 'The result of an operation was not used.' category = category.MISC algorithm = algorithm.EXACT - Module = this visit (node) { if (isSubScopeWithTopLevelUnAssignedBinOp(node)) getUnAssignedTopLevelBinOps(node).forEach((n) => this.warningNodes.push(n)) diff --git a/remix-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts b/remix-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts index 59e59a6b08..ea73d05d40 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/blockBlockhash.ts @@ -8,7 +8,6 @@ export default class blockBlockhash { desc = 'Semantics maybe unclear' categories = category.SECURITY algorithm = algorithm.EXACT - Module = this visit (node) { if (isBlockBlockHashAccess(node)) this.warningNodes.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts b/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts index 060fa2ca28..0b40bcc314 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/blockTimestamp.ts @@ -9,7 +9,6 @@ export default class blockTimestamp { desc = 'Semantics maybe unclear' categories = category.SECURITY algorithm = algorithm.EXACT - Module = this visit (node) { if (isNowAccess(node)) this.warningNowNodes.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts b/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts index 6d2adae592..330be24632 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts @@ -11,7 +11,6 @@ export default class checksEffectsInteraction { desc = 'Avoid potential reentrancy bugs' categories = category.SECURITY algorithm = algorithm.HEURISTIC - Module = this abstractAst = new AbstractAst() diff --git a/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts b/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts index 86f9a35946..4d9e1dd87b 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts @@ -12,7 +12,6 @@ export default class constantFunctions { desc = 'Check for potentially constant functions' categories = category.MISC algorithm = algorithm.HEURISTIC - Module = this abstractAst = new AbstractAst() diff --git a/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts b/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts index 87efdb5a78..231bfd6cee 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/deleteDynamicArrays.ts @@ -8,7 +8,6 @@ export default class deleteDynamicArrays { desc = 'Use require and appropriately' categories = category.GAS algorithm = algorithm.EXACT - Module = this visit (node) { if (isDeleteOfDynamicArray(node)) this.rel.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts b/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts index 1e7b612cdc..3ebfb94034 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/deleteFromDynamicArray.ts @@ -6,7 +6,6 @@ export default class deleteFromDynamicArray { name = 'Delete from dynamic Array: ' desc = 'Using delete on an array leaves a gap' categories = category.MISC - Module = this visit (node) { if (isDeleteFromDynamicArray(node) && !isMappingIndexAccess(node.children[0])) this.relevantNodes.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts b/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts index 8b9ff71e35..d8fc4b9616 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/erc20Decimals.ts @@ -8,7 +8,6 @@ export default class erc20Decimals { desc = 'Decimal should be uint8' categories = category.ERC algorithm = algorithm.EXACT - Module = this abstractAst = new AbstractAst() visit = this.abstractAst.build_visit((node) => false) diff --git a/remix-analyzer/src/solidity-analyzer/modules/etherTransferInLoop.ts b/remix-analyzer/src/solidity-analyzer/modules/etherTransferInLoop.ts index 97ba25d1fd..bb690e3d86 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/etherTransferInLoop.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/etherTransferInLoop.ts @@ -6,7 +6,6 @@ export default class etherTransferInLoop { name = 'Ether transfer in a loop: ' desc = 'Avoid transferring Ether to multiple addresses in a loop' category = category.GAS - Module = this visit (node) { if (isLoop(node)) { diff --git a/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts b/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts index 5914b24da0..2e7dfd4e5e 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/forLoopIteratesOverDynamicArray.ts @@ -6,7 +6,6 @@ export default class forLoopIteratesOverDynamicArray { name = 'For loop iterates over dynamic array: ' desc = 'The number of \'for\' loop iterations depends on dynamic array\'s size' categories = category.GAS - Module = this visit (node) { if (isForLoop(node)) { diff --git a/remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts b/remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts index 26b299e301..f6b2c3de3b 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts @@ -6,7 +6,6 @@ export default class gasCosts { desc = 'Warn if the gas requirements of functions are too high.' categories = category.GAS algorithm = algorithm.EXACT - Module = this /** diff --git a/remix-analyzer/src/solidity-analyzer/modules/guardConditions.ts b/remix-analyzer/src/solidity-analyzer/modules/guardConditions.ts index cd4ac6e247..8e1677144c 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/guardConditions.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/guardConditions.ts @@ -8,7 +8,6 @@ export default class guardConditions { desc = 'Use require and appropriately' categories = category.MISC algorithm = algorithm.EXACT - Module = this visit (node) { if (isRequireCall(node) || isAssertCall(node)) this.guards.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts b/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts index 570c3c8541..c40a51f381 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/inlineAssembly.ts @@ -8,7 +8,6 @@ export default class inlineAssembly { desc = 'Use of Inline Assembly' categories = category.SECURITY algorithm = algorithm.EXACT - Module = this visit (node) { if (isInlineAssembly(node)) this.inlineAssNodes.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/intDivisionTruncate.ts b/remix-analyzer/src/solidity-analyzer/modules/intDivisionTruncate.ts index 93d6c67fcb..312ea02b22 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/intDivisionTruncate.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/intDivisionTruncate.ts @@ -8,7 +8,6 @@ export default class intDivitionTruncate { desc = 'Division on int/uint values truncates the result.' categories = category.MISC algorithm = algorithm.EXACT - Module = this visit (node) { if (isIntDivision(node)) this.warningNodes.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts b/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts index a1fd6c17b0..284a25f34b 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/lowLevelCalls.ts @@ -9,7 +9,6 @@ export default class lowLevelCalls { desc = 'Semantics maybe unclear' categories = category.SECURITY algorithm = algorithm.EXACT - Module = this visit (node) { if (isLowLevelCallInst(node)) { diff --git a/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts b/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts index a5e57cc0d7..8284a059ac 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts @@ -8,7 +8,6 @@ export default class noReturn { desc = 'Function with return type is not returning' categories = category.MISC algorithm = algorithm.EXACT - Module = this abstractAst = new AbstractAst() diff --git a/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts b/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts index 7ca4224773..a3f5c603ec 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/selfdestruct.ts @@ -8,7 +8,6 @@ export default class selfdestruct { desc = 'Be aware of caller contracts.' categories = category.SECURITY algorithm = algorithm.HEURISTIC - Module = this abstractAst = new AbstractAst() diff --git a/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts b/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts index 4ef4eebccc..48175b15fd 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts @@ -11,7 +11,6 @@ export default class similarVariableNames { abstractAst = new AbstractAst() categories = category.MISC algorithm = algorithm.EXACT - Module = this visit = this.abstractAst.build_visit( (node) => false diff --git a/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts b/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts index b38ae34af6..f15fae7b8f 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts @@ -5,7 +5,6 @@ export default class stringBytesLength { name = 'String Length: ' desc = 'Bytes length != String length' categories = category.MISC - Module = this stringToBytesConversions: any[] = [] bytesLengthChecks: any[] = [] diff --git a/remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts b/remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts index 7d83318a09..9a6f05afc4 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/thisLocal.ts @@ -8,7 +8,6 @@ export default class thisLocal { desc = 'Invocation of local functions via this' categories = category.GAS algorithm = algorithm.EXACT - Module = this visit (node) { if (isThisLocalCall(node)) this.warningNodes.push(node) diff --git a/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts b/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts index c56089e2ec..b3a568d6bd 100644 --- a/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts +++ b/remix-analyzer/src/solidity-analyzer/modules/txOrigin.ts @@ -7,7 +7,6 @@ export default class txOrigin { desc = 'Warn if tx.origin is used' categories = category.SECURITY algorithm = algorithm.EXACT - Module = this visit (node) { if (node.name === 'MemberAccess' &&