diff --git a/apps/remix-ide/src/app/panels/terminal.js b/apps/remix-ide/src/app/panels/terminal.js index 7c6c8096d3..bd474b41fb 100644 --- a/apps/remix-ide/src/app/panels/terminal.js +++ b/apps/remix-ide/src/app/panels/terminal.js @@ -93,9 +93,6 @@ class Terminal extends Plugin { } onActivation () { - this.on('solidity-logic', 'hardhatCompilationFinished', (msg) => { - this.commands.log(msg) - }) this.on('scriptRunner', 'log', (msg) => { this.commands.log.apply(this.commands, msg.data) }) diff --git a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js index 1acd2eb785..9c12d7b976 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js @@ -97,23 +97,25 @@ class CompileTab extends Plugin { try { if (this.fileManager.mode === 'localhost' && hhCompilation) { const { currentVersion, optimize, runs } = this.compiler.state - const fileContent = `module.exports = { - solidity: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}', - settings: { - optimizer: { - enabled: ${optimize}, - runs: ${runs} + if (currentVersion) { + const fileContent = `module.exports = { + solidity: '${currentVersion.substring(0, currentVersion.indexOf('+commit'))}', + settings: { + optimizer: { + enabled: ${optimize}, + runs: ${runs} + } } } + ` + const configFilePath = 'remix-compiler.config.js' + this.fileManager.setFileContent(configFilePath, fileContent) + this.call('hardhat', 'compile', configFilePath).then((result) => { + this.call('terminal', 'log', { type: 'info', value: result}) + }).catch((error) => { + this.call('terminal', 'log', { type: 'error', value: result}) + }) } - ` - const configFilePath = 'remix-compiler.config.js' - this.fileManager.setFileContent(configFilePath, fileContent) - this.call('hardhat', 'compile', configFilePath).then((result) => { - this.emit('hardhatCompilationFinished', result) - }).catch((error) => { - this.emit('hardhatCompilationFinished', error) - }) } this.fileManager.saveCurrentFile() this.call('editor', 'clearAnnotations') diff --git a/package-lock.json b/package-lock.json index d74204bd8f..d3f785626b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7638,53 +7638,112 @@ "integrity": "sha512-tVkIU9JQw5fYPxLQgok/a7I6J1eEZ79svwQGpe2mb3jlVsPADOleefOnQBiS/takK7jQuNeswCUicMH1VWVziA==" }, "@remixproject/engine": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.11.tgz", - "integrity": "sha512-gRTOM4WolVuECOxeMcTD30iCZ4TJTZE+osYyNFnypgHQECcMtibATnulFc0zx+RtGm17KPEk5dW865fG01q+IA==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/engine/-/engine-0.3.16.tgz", + "integrity": "sha512-UI8Hg4l8oxaaBYNMcUI59C2terQL2Of4Bf9/AVETy67EFxwi3U8dHqSjkVJHz+rRYBSMSVnjcw3jaO1+0C3K4g==", "requires": { - "@remixproject/plugin-api": "0.3.11", - "@remixproject/plugin-utils": "0.3.11" + "@remixproject/plugin-api": "0.3.16", + "@remixproject/plugin-utils": "0.3.16" + }, + "dependencies": { + "@remixproject/plugin-api": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.16.tgz", + "integrity": "sha512-PuSo6GGjKXwCZr3KjCrqGxLF2sZJFpueb9cjwLeAi1y9C4VoPRjWFIC6bESn1EVL9DyqcET7a8IwuqhHVGOGSQ==", + "requires": { + "@remixproject/plugin-utils": "0.3.16" + } + }, + "@remixproject/plugin-utils": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz", + "integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==", + "requires": { + "tslib": "2.0.1" + } + }, + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + } } }, "@remixproject/engine-web": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.11.tgz", - "integrity": "sha512-oM4kRKQ6R5ZWT6Ih542XtvFBLx9E5kUHU7H1t0DlI2A/w6arP4cC7WQwNK8TsnysVSjoJ5kveHb6tVntxhBGSg==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/engine-web/-/engine-web-0.3.16.tgz", + "integrity": "sha512-eZPs/cofoyZQWMcr4ukhn36IWi52m24LIj+GqUEfdcVpdXO4wkM0ATt4Wrk1WeOcNhlld3G27VfSS2jn2k0BnA==", "requires": { - "@remixproject/engine": "0.3.11", - "@remixproject/plugin-api": "0.3.11", - "@remixproject/plugin-utils": "0.3.11" + "@remixproject/engine": "0.3.16", + "@remixproject/plugin-api": "0.3.16", + "@remixproject/plugin-utils": "0.3.16" } }, "@remixproject/plugin": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.11.tgz", - "integrity": "sha512-GbZV9KjZoALYUCEXDIhDWQFR3hi3m3R03WDm/i/XSIaJRkyya2WU6IzmqkvCT7TuTR+VfdJoWnflZTQWesLB1A==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin/-/plugin-0.3.16.tgz", + "integrity": "sha512-UAtv3Te/jCZ4V30QSSNbudLhMS45zA97XIzcg894milJZm7E+rg+YUP2RQn88sqSBPbETPFF5LT93KgP1+IIzw==", "requires": { - "@remixproject/plugin-api": "0.3.11", - "@remixproject/plugin-utils": "0.3.11", + "@remixproject/plugin-api": "0.3.16", + "@remixproject/plugin-utils": "0.3.16", "events": "3.2.0" }, "dependencies": { + "@remixproject/plugin-api": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.16.tgz", + "integrity": "sha512-PuSo6GGjKXwCZr3KjCrqGxLF2sZJFpueb9cjwLeAi1y9C4VoPRjWFIC6bESn1EVL9DyqcET7a8IwuqhHVGOGSQ==", + "requires": { + "@remixproject/plugin-utils": "0.3.16" + } + }, + "@remixproject/plugin-utils": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz", + "integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==", + "requires": { + "tslib": "2.0.1" + } + }, "events": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" + }, + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" } } }, "@remixproject/plugin-api": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.11.tgz", - "integrity": "sha512-hH9XJVkpqWAST4iVbm5erWOW6pxt70fbhY/kkcC6DuGO4wmcN16bwhIUDenMEOyTQiuHIM98kEZMiacKtPKmzg==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-api/-/plugin-api-0.3.16.tgz", + "integrity": "sha512-PuSo6GGjKXwCZr3KjCrqGxLF2sZJFpueb9cjwLeAi1y9C4VoPRjWFIC6bESn1EVL9DyqcET7a8IwuqhHVGOGSQ==", "requires": { - "@remixproject/plugin-utils": "0.3.11" + "@remixproject/plugin-utils": "0.3.16" + }, + "dependencies": { + "@remixproject/plugin-utils": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz", + "integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==", + "requires": { + "tslib": "2.0.1" + } + }, + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + } } }, "@remixproject/plugin-utils": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.11.tgz", - "integrity": "sha512-dSO/WV1zJOXsbGiY99Hx8ewh5Whhul+Z2KyI2xFPCJTKkYLXntgFv7CuHvY2c7X2SBLDenqp6dh3yDGQcTlbxQ==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz", + "integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==", "requires": { "tslib": "2.0.1" }, @@ -7697,23 +7756,39 @@ } }, "@remixproject/plugin-webview": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.11.tgz", - "integrity": "sha512-lrZNtH1MCshF3wMU997Xn6UNWkIgmmZaXhxgxlB7S2S01IWlWd+5z6fZBmXcWGJwld424gRzbNm3IkPwAml9yw==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-webview/-/plugin-webview-0.3.16.tgz", + "integrity": "sha512-k//rLFsmDTiDCWzXsxGFBXE+KFDMdZtITQMCsf6sARfSc1SWLZ8+iwFCg9zve10lUEyc0CASdzpaWfITxw2ajQ==", "requires": { - "@remixproject/plugin": "0.3.11", - "@remixproject/plugin-api": "0.3.11", - "@remixproject/plugin-utils": "0.3.11" + "@remixproject/plugin": "0.3.16", + "@remixproject/plugin-api": "0.3.16", + "@remixproject/plugin-utils": "0.3.16", + "axios": "^0.21.1" + }, + "dependencies": { + "@remixproject/plugin-utils": { + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-utils/-/plugin-utils-0.3.16.tgz", + "integrity": "sha512-3zV1zdpkdgT4/fa4s4a3KdcZFpHR0a2ye5BMDRZZr0fZeGBaL9B7Lh52wvQuRJ384E60xwqjMytZLmi3qvL5SA==", + "requires": { + "tslib": "2.0.1" + } + }, + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==" + } } }, "@remixproject/plugin-ws": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.11.tgz", - "integrity": "sha512-0b4tDisv8zBRS1vdTsr2Jm04xIXeofmCB63iknLa7nf9oG9SizQbxP6V3AhVnVTU91r+YvoBI7B6a3KP7G1UuQ==", + "version": "0.3.16", + "resolved": "https://registry.npmjs.org/@remixproject/plugin-ws/-/plugin-ws-0.3.16.tgz", + "integrity": "sha512-J8B21v5rRIGCY/KjuJzYQEtMUSCQhWDVlUrqWlqIAIJp+4+E8lNuPycMXhOXSCEJfgVaGvjxb/AmJMH4Jmqw/w==", "requires": { - "@remixproject/plugin": "0.3.11", - "@remixproject/plugin-api": "0.3.11", - "@remixproject/plugin-utils": "0.3.11" + "@remixproject/plugin": "0.3.16", + "@remixproject/plugin-api": "0.3.16", + "@remixproject/plugin-utils": "0.3.16" } }, "@restart/context": { diff --git a/package.json b/package.json index 0e3b262c5e..63d6f0aac1 100644 --- a/package.json +++ b/package.json @@ -134,13 +134,13 @@ "@ethereumjs/common": "^2.2.0", "@ethereumjs/tx": "^3.1.3", "@ethereumjs/vm": "^5.3.2", - "@remixproject/engine": "^0.3.11", - "@remixproject/engine-web": "^0.3.11", - "@remixproject/plugin": "^0.3.11", - "@remixproject/plugin-api": "^0.3.11", - "@remixproject/plugin-utils": "^0.3.11", - "@remixproject/plugin-webview": "^0.3.11", - "@remixproject/plugin-ws": "^0.3.11", + "@remixproject/engine": "^0.3.16", + "@remixproject/engine-web": "^0.3.16", + "@remixproject/plugin": "^0.3.16", + "@remixproject/plugin-api": "^0.3.16", + "@remixproject/plugin-utils": "^0.3.16", + "@remixproject/plugin-webview": "^0.3.16", + "@remixproject/plugin-ws": "^0.3.16", "ansi-gray": "^0.1.1", "async": "^2.6.2", "axios": ">=0.21.1", @@ -159,7 +159,6 @@ "isbinaryfile": "^3.0.2", "jquery": "^3.3.1", "jszip": "^3.6.0", - "lodash": "^4.17.21", "latest-version": "^5.1.0", "lodash": "^4.17.21", "merge": "^1.2.0",