pull/1585/head
filip mertens 3 years ago
commit abab74834b
  1. 2
      .circleci/config.yml
  2. 5
      apps/debugger/src/app/debugger-api.ts
  3. 3
      apps/debugger/src/app/debugger.ts
  4. 26
      apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
  5. 2
      apps/remix-ide/src/app/files/dgitProvider.js
  6. 2
      apps/remix-ide/src/app/tabs/test-tab.js
  7. 2
      apps/remix-ide/src/blockchain/providers/injected.js
  8. 4
      apps/remix-ide/src/blockchain/providers/node.js
  9. 6
      libs/remix-analyzer/package.json
  10. 6
      libs/remix-astwalker/package.json
  11. 6
      libs/remix-debug/package.json
  12. 4
      libs/remix-lib/package.json
  13. 6
      libs/remix-simulator/package.json
  14. 6
      libs/remix-solidity/package.json
  15. 14
      libs/remix-solidity/src/compiler/compiler-utils.ts
  16. 10
      libs/remix-tests/package.json
  17. 22
      libs/remix-tests/src/testRunner.ts
  18. 17
      libs/remix-ui/debugger-ui/src/lib/debugger-ui.tsx
  19. 2
      libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts
  20. 5
      libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx
  21. 18
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  22. 4
      libs/remix-url-resolver/package.json
  23. 2
      libs/remixd/package.json
  24. 9
      libs/remixd/src/services/slitherClient.ts
  25. 111
      package-lock.json
  26. 2
      package.json
  27. 20
      workspace.json

@ -105,6 +105,7 @@ jobs:
steps:
- checkout
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run:
name: Download Selenium
@ -171,6 +172,7 @@ jobs:
steps:
- checkout
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run:
name: Download Selenium

@ -62,6 +62,10 @@ export const DebuggerApiMixin = (Base) => class extends Base {
this.onEditorContentChangedListener = listener
}
onEnvChanged (listener) {
this.onEnvChangedListener = listener
}
onDebugRequested (listener) {
this.onDebugRequestedListener = listener
}
@ -126,6 +130,7 @@ export const DebuggerApiMixin = (Base) => class extends Base {
this.on('editor', 'breakpointCleared', (fileName, row) => { if (this.onBreakpointClearedListener) this.onBreakpointClearedListener(fileName, row) })
this.on('editor', 'breakpointAdded', (fileName, row) => { if (this.onBreakpointAddedListener) this.onBreakpointAddedListener(fileName, row) })
this.on('editor', 'contentChanged', () => { if (this.onEditorContentChangedListener) this.onEditorContentChangedListener() })
this.on('network', 'providerChanged', (provider) => { if (this.onEnvChangedListener) this.onEnvChangedListener(provider) })
}
onDeactivation () {

@ -1,7 +1,7 @@
import { PluginClient } from "@remixproject/plugin";
import { createClient } from "@remixproject/plugin-webview";
import { IDebuggerApi, RawLocation, Sources, Asts, LineColumnLocation,
onBreakpointClearedListener, onBreakpointAddedListener, onEditorContentChanged, TransactionReceipt } from '@remix-ui/debugger-ui'
onBreakpointClearedListener, onBreakpointAddedListener, onEditorContentChanged, onEnvChangedListener, TransactionReceipt } from '@remix-ui/debugger-ui'
import { DebuggerApiMixin, CompilerAbstract} from './debugger-api'
export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) {
@ -18,6 +18,7 @@ export class DebuggerClientApi extends DebuggerApiMixin(PluginClient) {
onBreakpointCleared: (listener: onBreakpointClearedListener) => void
onBreakpointAdded: (listener: onBreakpointAddedListener) => void
onEditorContentChanged: (listener: onEditorContentChanged) => void
onEnvChanged: (listener: onEnvChangedListener) => void
discardHighlight: () => Promise<void>
highlight: (lineColumnPos: LineColumnLocation, path: string) => Promise<void>
fetchContractAndCompile: (address: string, currentReceipt: TransactionReceipt) => Promise<CompilerAbstract>

@ -166,12 +166,7 @@ module.exports = {
.verify.attributeEquals('*[data-id="uiPathInput"]', 'value', 'tests')
},
'Solidity Unittests': function (browser: NightwatchBrowser) {
runTests(browser)
}
}
function runTests (browser: NightwatchBrowser) {
'Solidity Unit tests Basic': function (browser: NightwatchBrowser) {
browser
.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.clickLaunchIcon('filePanel')
@ -186,7 +181,26 @@ function runTests (browser: NightwatchBrowser) {
.waitForElementContainsText('#solidityUnittestsOutput', '/tests/4_Ballot_test.sol', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winning proposal', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value', 60000)
},
'Solidity Unit tests Basic Basic with local compiler': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('builtin')
.openFile('contracts/3_Ballot.sol')
.clickLaunchIcon('pluginManager')
.scrollAndClick('[data-id="pluginManagerComponentDeactivateButtonsolidityUnitTesting"]')
.pause(2000)
.scrollAndClick('[data-id="pluginManagerComponentActivateButtonsolidityUnitTesting"]')
.clickLaunchIcon('solidityUnitTesting')
.scrollAndClick('#runTestsTabRunAction')
.waitForElementVisible('*[data-id="testTabSolidityUnitTestsOutputheader"]', 120000)
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', '/tests/4_Ballot_test.sol', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winning proposal', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value', 60000)
.end()
}
}
const sources = [

@ -428,9 +428,7 @@ class DGitProvider extends Plugin {
const ipfs = IpfsHttpClient(config)
let result = false
try {
console.log('try ', config)
const data = ipfs.get(cid, { timeout: 60000 })
console.log(config, cid, workspace, data)
for await (const file of data) {
if (file.path) result = true
console.log(file.path)

@ -278,6 +278,8 @@ module.exports = class TestTab extends ViewPlugin {
</div>
`)
}
} else if (result.type === 'logOnly') {
if (result.hhLogs && result.hhLogs.length) this.printHHLogs(result.hhLogs, result.value)
}
}

@ -12,7 +12,7 @@ class InjectedProvider {
newAccount (passwordPromptCb, cb) {
passwordPromptCb((passphrase) => {
this.executionContext.web3().personal.newAccount(passphrase, cb)
this.executionContext.web3().eth.personal.newAccount(passphrase, cb)
})
}

@ -10,7 +10,7 @@ class NodeProvider {
getAccounts (cb) {
if (this.config.get('settings/personal-mode')) {
return this.executionContext.web3().personal.getListAccounts(cb)
return this.executionContext.web3().eth.personal.getAccounts(cb)
}
return this.executionContext.web3().eth.getAccounts(cb)
}
@ -20,7 +20,7 @@ class NodeProvider {
return cb('Not running in personal mode')
}
passwordPromptCb((passphrase) => {
this.executionContext.web3().personal.newAccount(passphrase, cb)
this.executionContext.web3().eth.personal.newAccount(passphrase, cb)
})
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-analyzer",
"version": "0.5.14",
"version": "0.5.15",
"description": "Tool to perform static analysis on Solidity smart contracts",
"main": "index.js",
"types": ".index.d.ts",
@ -23,7 +23,7 @@
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/vm": "^5.5.0",
"@remix-project/remix-astwalker": "^0.0.26",
"@remix-project/remix-lib": "^0.5.5",
"@remix-project/remix-lib": "^0.5.6",
"async": "^2.6.2",
"ethereumjs-util": "^7.0.10",
"ethers": "^5.4.2",
@ -51,5 +51,5 @@
"typescript": "^3.7.5"
},
"typings": "index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-astwalker",
"version": "0.0.35",
"version": "0.0.36",
"description": "Tool to walk through Solidity AST",
"main": "index.js",
"scripts": {
@ -37,7 +37,7 @@
"@ethereumjs/block": "^3.4.0",
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/vm": "^5.5.0",
"@remix-project/remix-lib": "^0.5.5",
"@remix-project/remix-lib": "^0.5.6",
"@types/tape": "^4.2.33",
"async": "^2.6.2",
"ethereumjs-util": "^7.0.10",
@ -53,5 +53,5 @@
"tap-spec": "^5.0.0"
},
"typings": "index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-debug",
"version": "0.5.5",
"version": "0.5.6",
"description": "Tool to debug Ethereum transactions",
"contributors": [
{
@ -23,7 +23,7 @@
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/vm": "^5.5.0",
"@remix-project/remix-astwalker": "^0.0.26",
"@remix-project/remix-lib": "^0.5.5",
"@remix-project/remix-lib": "^0.5.6",
"async": "^2.6.2",
"commander": "^2.19.0",
"deep-equal": "^1.0.1",
@ -61,5 +61,5 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme",
"typings": "src/index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-lib",
"version": "0.5.5",
"version": "0.5.6",
"description": "Library to various Remix tools",
"contributors": [
{
@ -53,5 +53,5 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme",
"typings": "src/index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-simulator",
"version": "0.2.5",
"version": "0.2.6",
"description": "Ethereum IDE and tools for the web",
"contributors": [
{
@ -18,7 +18,7 @@
"@ethereumjs/common": "^2.2.0",
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/vm": "^5.5.0",
"@remix-project/remix-lib": "^0.5.5",
"@remix-project/remix-lib": "^0.5.6",
"ansi-gray": "^0.1.1",
"async": "^3.1.0",
"body-parser": "^1.18.2",
@ -66,5 +66,5 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme",
"typings": "src/index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-solidity",
"version": "0.4.5",
"version": "0.4.6",
"description": "Tool to load and run Solidity compiler",
"main": "index.js",
"types": "./index.d.ts",
@ -18,7 +18,7 @@
"@ethereumjs/block": "^3.4.0",
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/vm": "^5.5.0",
"@remix-project/remix-lib": "^0.5.5",
"@remix-project/remix-lib": "^0.5.6",
"async": "^2.6.2",
"eslint-scope": "^5.0.0",
"ethereumjs-util": "^7.0.10",
@ -59,5 +59,5 @@
},
"homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme",
"typings": "index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -12,9 +12,21 @@ export const pathToURL = {}
* @param version is the version of compiler with or without 'soljson-v' prefix and .js postfix
*/
export function urlFromVersion (version) {
let url
if (version === 'builtin') {
let location: string | Location = window.document.location
let path = location.pathname
if (!path.startsWith('/')) path = '/' + path
location = `${location.protocol}//${location.host}${path}assets/js`
if (location.endsWith('index.html')) location = location.substring(0, location.length - 10)
if (!location.endsWith('/')) location += '/'
url = `${location}soljson.js`
} else {
if (!version.startsWith('soljson-v')) version = 'soljson-v' + version
if (!version.endsWith('.js')) version = version + '.js'
return `${pathToURL[version]}/${version}`
url = `${pathToURL[version]}/${version}`
}
return url
}
/**

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-tests",
"version": "0.2.5",
"version": "0.2.6",
"description": "Tool to test Solidity smart contracts",
"main": "src/index.js",
"types": "./src/index.d.ts",
@ -39,9 +39,9 @@
"@ethereumjs/common": "^2.2.0",
"@ethereumjs/tx": "^3.3.0",
"@ethereumjs/vm": "^5.5.0",
"@remix-project/remix-lib": "^0.5.5",
"@remix-project/remix-simulator": "^0.2.5",
"@remix-project/remix-solidity": "^0.4.5",
"@remix-project/remix-lib": "^0.5.6",
"@remix-project/remix-simulator": "^0.2.6",
"@remix-project/remix-solidity": "^0.4.6",
"ansi-gray": "^0.1.1",
"async": "^2.6.0",
"axios": ">=0.21.1",
@ -77,5 +77,5 @@
"typescript": "^3.3.1"
},
"typings": "src/index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -244,8 +244,15 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
const method = testObject.methods[func.name].apply(testObject.methods[func.name], [])
const startTime = Date.now()
if (func.constant) {
method.call(sendParams).then((result) => {
sendParams = {}
const tagTimestamp = 'remix_tests_tag' + Date.now()
sendParams.timestamp = tagTimestamp
method.call(sendParams).then(async (result) => {
const time = (Date.now() - startTime) / 1000.0
let tagTxHash
let hhLogs
if (web3.eth && web3.eth.getHashFromTagBySimulator) tagTxHash = await web3.eth.getHashFromTagBySimulator(tagTimestamp)
if (web3.eth && web3.eth.getHHLogsForTx) hhLogs = await web3.eth.getHHLogsForTx(tagTxHash)
if (result) {
const resp: TestResultInterface = {
type: 'testPass',
@ -254,6 +261,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
time: time,
context: testName
}
if (hhLogs) resp.hhLogs = hhLogs
testCallback(undefined, resp)
passingNum += 1
timePassed += time
@ -266,6 +274,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
errMsg: 'function returned false',
context: testName
}
if (hhLogs) resp.hhLogs = hhLogs
testCallback(undefined, resp)
failureNum += 1
timePassed += time
@ -338,6 +347,17 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
testCallback(undefined, resp)
passingNum += 1
timePassed += time
} else if (hhLogs) {
const resp: TestResultInterface = {
type: 'logOnly',
value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time,
context: testName,
hhLogs
}
testCallback(undefined, resp)
timePassed += time
}
return next()

@ -31,7 +31,8 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
},
toastMessage: '',
validationError: '',
txNumberIsEmpty: true
txNumberIsEmpty: true,
isLocalNodeUsed: false
})
useEffect(() => {
@ -62,6 +63,17 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}
setEditor()
const providerChanged = () => {
debuggerModule.onEnvChanged((provider) => {
setState(prevState => {
const isLocalNodeUsed = provider !== 'vm' && provider !== 'injected'
return { ...prevState, isLocalNodeUsed: isLocalNodeUsed }
})
})
}
providerChanged()
}, [state.debugger])
const listenToEvents = (debuggerInstance, currentReceipt) => {
@ -289,7 +301,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}} type="checkbox" title="Debug with generated sources" />
<label data-id="debugGeneratedSourcesLabel" className="form-check-label custom-control-label" htmlFor="debugGeneratedSourcesInput">Use generated sources (from Solidity v0.7.2)</label>
</div>
<div className="mt-2 mb-2 debuggerConfig custom-control custom-checkbox">
{ state.isLocalNodeUsed && <div className="mt-2 mb-2 debuggerConfig custom-control custom-checkbox">
<input className="custom-control-input" id="debugWithLocalNodeInput" onChange={({ target: { checked } }) => {
setState(prevState => {
return { ...prevState, opt: { ...prevState.opt, debugWithLocalNode: checked } }
@ -297,6 +309,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
}} type="checkbox" title="Force the debugger to use the current local node" />
<label data-id="debugLocaNodeLabel" className="form-check-label custom-control-label" htmlFor="debugWithLocalNodeInput">Force using local node</label>
</div>
}
{ state.validationError && <span className="w-100 py-1 text-danger validationError">{state.validationError}</span> }
</div>
<TxBrowser requestDebug={ requestDebug } unloadRequested={ unloadRequested } updateTxNumberFlag={ updateTxNumberFlag } transactionNumber={ state.txNumber } debugging={ state.debugging } />

@ -46,6 +46,7 @@ export type onBreakpointClearedListener = (params: string, row: number) => void
export type onBreakpointAddedListener = (params: string, row: number) => void
export type onEditorContentChanged = () => void
export type onDebugRequested = (hash: string) => void
export type onEnvChangedListener = (provider: string) => void
export interface IDebuggerApi {
offsetToLineColumnConverter: { offsetToLineColumn: (sourceLocation: RawLocation, file: number, contents: Sources, asts: Asts) => Promise<LineColumnLocation> }
@ -57,6 +58,7 @@ export interface IDebuggerApi {
onBreakpointCleared: (listener: onBreakpointClearedListener) => void
onBreakpointAdded: (listener: onBreakpointAddedListener) => void
onEditorContentChanged: (listener: onEditorContentChanged) => void
onEnvChanged: (listener: onEnvChangedListener) => void
discardHighlight: () => Promise<void>
highlight: (lineColumnPos: LineColumnLocation, path: string) => Promise<void>
fetchContractAndCompile: (address: string, currentReceipt: TransactionReceipt) => Promise<CompilationOutput>

@ -5,7 +5,6 @@ import { BN } from 'ethereumjs-util'
export const GlobalVariables = ({ block, receipt, tx }) => {
// see https://docs.soliditylang.org/en/latest/units-and-global-variables.html#block-and-transaction-properties
const globals = {
'block.basefee': (new BN(block.baseFeePerGas.replace('0x', ''), 'hex')).toString(10) + ` Wei (${block.baseFeePerGas})`,
'block.chainid': tx.chainId,
'block.coinbase': block.miner,
'block.difficulty': block.difficulty,
@ -17,6 +16,10 @@ export const GlobalVariables = ({ block, receipt, tx }) => {
'msg.value': tx.value + ' Wei',
'tx.origin': tx.from
}
if (block.baseFeePerGas) {
globals['block.basefee'] = (new BN(block.baseFeePerGas.replace('0x', ''), 'hex')).toString(10) + ` Wei (${block.baseFeePerGas})`
}
return (
<div id='globalvariable' data-id='globalvariable'>
<DropdownPanel hexHighlight={false} bodyStyle={{ fontFamily: 'monospace' }} dropdownName='Global Variables' calldata={globals || {}} />

@ -333,19 +333,15 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
updateCurrentVersion(selectedVersion)
url = customUrl
api.setParameters({ version: selectedVersion })
} else if (selectedVersion === 'builtin') {
let location: string | Location = window.document.location
let path = location.pathname
if (!path.startsWith('/')) path = '/' + path
location = `${location.protocol}//${location.host}${path}assets/js`
if (location.endsWith('index.html')) location = location.substring(0, location.length - 10)
if (!location.endsWith('/')) location += '/'
url = location + 'soljson.js'
} else {
if (selectedVersion.indexOf('soljson') !== 0 || helper.checkSpecialChars(selectedVersion)) {
return console.log('loading ' + selectedVersion + ' not allowed')
if (helper.checkSpecialChars(selectedVersion)) {
return console.log('loading ' + selectedVersion + ' not allowed, special chars not allowed.')
}
if (selectedVersion === 'builtin' || selectedVersion.indexOf('soljson') === 0) {
url = urlFromVersion(selectedVersion)
} else {
return console.log('loading ' + selectedVersion + ' not allowed, version should start with "soljson"')
}
url = `${urlFromVersion(selectedVersion)}`
}
// Workers cannot load js on "file:"-URLs and we get a

@ -1,6 +1,6 @@
{
"name": "@remix-project/remix-url-resolver",
"version": "0.0.26",
"version": "0.0.27",
"description": "Solidity import url resolver engine",
"main": "index.js",
"types": "./index.d.ts",
@ -42,5 +42,5 @@
"typescript": "^3.1.6"
},
"typings": "index.d.ts",
"gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7"
"gitHead": "39700b7c076d53d0f857f341774a8448ea5c8da9"
}

@ -1,6 +1,6 @@
{
"name": "@remix-project/remixd",
"version": "0.5.0",
"version": "0.5.1",
"description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)",
"main": "index.js",
"types": "./index.d.ts",

@ -4,6 +4,7 @@ import * as WS from 'ws' // eslint-disable-line
import { PluginClient } from '@remixproject/plugin'
import { existsSync, readFileSync, readdirSync, unlink } from 'fs'
import { OutputStandard } from '../types' // eslint-disable-line
import * as utils from '../utils'
const { spawn, execSync } = require('child_process')
export class SlitherClient extends PluginClient {
@ -25,8 +26,8 @@ export class SlitherClient extends PluginClient {
}
mapNpmDepsDir (list) {
const remixNpmDepsPath = `${this.currentSharedFolder}/.deps/npm`
const localNpmDepsPath = `${this.currentSharedFolder}/node_modules`
const remixNpmDepsPath = utils.absolutePath('.deps/npm', this.currentSharedFolder)
const localNpmDepsPath = utils.absolutePath('node_modules', this.currentSharedFolder)
const npmDepsExists = existsSync(remixNpmDepsPath)
const nodeModulesExists = existsSync(localNpmDepsPath)
let isLocalDep = false
@ -112,7 +113,7 @@ export class SlitherClient extends PluginClient {
} else console.log('\x1b[32m%s\x1b[0m', '[Slither Analysis]: Compiler version is same as installed solc version')
}
// Allow paths and set solc remapping for import URLs
const fileContent = readFileSync(`${this.currentSharedFolder}/${filePath}`, 'utf8')
const fileContent = readFileSync(utils.absolutePath(filePath, this.currentSharedFolder), 'utf8')
const importsArr = fileContent.match(/import ['"][^.|..](.+?)['"];/g)
let remaps = ''
if (importsArr?.length) {
@ -143,7 +144,7 @@ export class SlitherClient extends PluginClient {
const response = {}
child.on('close', () => {
const outputFileAbsPath: string = `${this.currentSharedFolder}/${outputFile}`
const outputFileAbsPath: string = utils.absolutePath(outputFile, this.currentSharedFolder)
// Check if slither report file exists
if (existsSync(outputFileAbsPath)) {
let report = readFileSync(outputFileAbsPath, 'utf8')

111
package-lock.json generated

@ -1,6 +1,6 @@
{
"name": "remix-project",
"version": "0.17.0-dev",
"version": "0.18.0-dev",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -3553,6 +3553,12 @@
"@fortawesome/fontawesome-common-types": "^0.2.34"
}
},
"@gar/promisify": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz",
"integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==",
"dev": true
},
"@istanbuljs/load-nyc-config": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@ -5886,6 +5892,42 @@
"integrity": "sha512-oN3y7FAROHhrAt7Rr7PnTSwrHrZVRTS2ZbyxeQwSSYD0ifwM3YNgQqbaRmjcWoPyq77MjchusjJDspbzMmip1Q==",
"dev": true
},
"@npmcli/fs": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz",
"integrity": "sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ==",
"dev": true,
"requires": {
"@gar/promisify": "^1.0.1",
"semver": "^7.3.5"
},
"dependencies": {
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"requires": {
"yallist": "^4.0.0"
}
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
}
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
},
"@npmcli/git": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.0.3.tgz",
@ -11344,17 +11386,6 @@
}
}
},
"fsevents": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
@ -12175,16 +12206,6 @@
"to-regex-range": "^2.1.0"
}
},
"fsevents": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
@ -17502,6 +17523,16 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"fstream": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz",
@ -30236,17 +30267,6 @@
}
}
},
"fsevents": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
@ -37033,11 +37053,12 @@
"dev": true
},
"cacache": {
"version": "15.2.0",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.2.0.tgz",
"integrity": "sha512-uKoJSHmnrqXgthDFx/IU6ED/5xd+NNGe+Bb+kLZy7Ku4P+BaiWEUflAKPZ7eAzsYGcsAGASJZsybXp+quEcHTw==",
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz",
"integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==",
"dev": true,
"requires": {
"@npmcli/fs": "^1.0.0",
"@npmcli/move-file": "^1.0.1",
"chownr": "^2.0.0",
"fs-minipass": "^2.0.0",
@ -37064,9 +37085,9 @@
"dev": true
},
"find-cache-dir": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
"integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
"integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
"dev": true,
"requires": {
"commondir": "^1.0.1",
@ -37257,9 +37278,9 @@
}
},
"tar": {
"version": "6.1.10",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.10.tgz",
"integrity": "sha512-kvvfiVvjGMxeUNB6MyYv5z7vhfFRwbwCXJAeL0/lnbrttBVqcMOnpHUf0X42LrPMR8mMpgapkJMchFH4FSHzNA==",
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true,
"requires": {
"chownr": "^2.0.0",
@ -37271,9 +37292,9 @@
}
},
"terser": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz",
"integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==",
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz",
"integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==",
"dev": true,
"requires": {
"commander": "^2.20.0",

@ -1,6 +1,6 @@
{
"name": "remix-project",
"version": "0.17.0-dev",
"version": "0.18.0-dev",
"license": "MIT",
"description": "Ethereum Remix Monorepo",
"keywords": [

@ -781,11 +781,21 @@
"remix-ui-plugin-manager": {
"root": "libs/remix-ui/plugin-manager",
"sourceRoot": "libs/remix-ui/plugin-manager/src",
"projectType": "library",
"schematics": {},
"architect": {
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": ["libs/remix-ui/plugin-manager/tsconfig.lib.json"],
"exclude": [
"**/node_modules/**",
"!libs/remix-ui/plugin-manager/**/*"
]
}
}
}
},
"remix-core-plugin": {
"root": "libs/remix-core-plugin",
@ -797,13 +807,8 @@
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"tsConfig": [
"libs/remix-core-plugin/tsconfig.lib.json"
],
"exclude": [
"**/node_modules/**",
"!libs/remix-core-plugin/**/*"
]
"tsConfig": ["libs/remix-core-plugin/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-core-plugin/**/*"]
}
},
"build": {
@ -868,7 +873,6 @@
"tsConfig": ["libs/remix-ui/renderer/tsconfig.lib.json"],
"exclude": ["**/node_modules/**", "!libs/remix-ui/renderer/**/*"]
}
}
}
}

Loading…
Cancel
Save