more types & package.json scripts updated

pull/7/head
aniket-engg 5 years ago committed by Aniket
parent 81c27a2678
commit b2fe02ba96
  1. 6
      package.json
  2. 11
      remix-analyzer/src/solidity-analyzer/modules/gasCosts.ts

@ -7,15 +7,15 @@
"scripts": {
"diff": "lerna diff",
"updated": "lerna updated",
"bootstrap": "lerna bootstrap",
"build-ts-packages": "lerna run --scope 'remix-solidity' --scope 'remix-tests' --scope 'remix-url-resolver' --scope 'remix-astwalker' build",
"bootstrap": "npm run build-ts-packages; lerna bootstrap",
"build-ts-packages": "lerna run --scope 'remix-analyzer' --scope 'remix-astwalker' --scope 'remix-solidity' --scope 'remix-tests' --scope 'remix-url-resolver' build",
"publish": "npm run build-ts-packages; lerna publish",
"release": "lerna bootstrap; lerna publish;",
"tag": "gulp; gulp publishTag;",
"updateChangelog": "gulp; gulp updateChangelog --prev $previousVersion;",
"remove-all-install": "npm run remove-install; npm run remove-install-analyzer; npm run remove-install-astwalker; npm run remove-install-debug; npm run remove-install-lib; npm run remove-install-simulator; npm run remove-install-tests; npm run remove-install-url-resolver; npm run remove-install-solidity;",
"remove-install": "rm package-lock.json; rm -rf node_modules",
"remove-install-analyzer": "rm remix-analyzer/package-lock.json; rm -rf remix-analyzer/node_modules",
"remove-install-analyzer": "rm remix-analyzer/package-lock.json; rm -rf remix-analyzer/node_modules; rm -rf remix-analyzer/dist",
"remove-install-astwalker": "rm remix-astwalker/package-lock.json; rm -rf remix-astwalker/node_modules; rm -rf remix-astwalker/dist",
"remove-install-debug": "rm remix-debug/package-lock.json; rm -rf remix-debug/node_modules",
"remove-install-lib": "rm remix-lib/package-lock.json; rm -rf remix-lib/node_modules",

@ -1,11 +1,12 @@
import { default as category } from './categories'
import { default as algorithm } from './algorithmCategories'
import { ModuleAlgorithm, ModuleCategory, ReportObj, CompilationResult} from './../../types'
export default class gasCosts {
name = 'Gas costs: '
desc = 'Warn if the gas requirements of functions are too high.'
categories = category.GAS
algorithm = algorithm.EXACT
name: string = 'Gas costs: '
description: string = 'Warn if the gas requirements of functions are too high.'
category: ModuleCategory = category.GAS
algorithm: ModuleAlgorithm = algorithm.EXACT
/**
@ -22,7 +23,7 @@ export default class gasCosts {
}
}
report (compilationResults) {
report (compilationResults: CompilationResult): ReportObj[] {
const report: any[] = []
this.visitContracts(compilationResults.contracts, (contract) => {
if (

Loading…
Cancel
Save