diff --git a/apps/remix-ide-e2e/src/commands/verifyContracts.ts b/apps/remix-ide-e2e/src/commands/verifyContracts.ts index 027f71dd05..e7dbf4a591 100644 --- a/apps/remix-ide-e2e/src/commands/verifyContracts.ts +++ b/apps/remix-ide-e2e/src/commands/verifyContracts.ts @@ -22,6 +22,9 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str if (opts.version) { browser .click('*[data-id="compilation-details"]') + .waitForElementVisible('*[data-id="remixui_treeviewitem_metadata"]') + .pause(2000) + .click('*[data-id="remixui_treeviewitem_metadata"]') .waitForElementVisible('*[data-id="treeViewDivtreeViewItemcompiler"]') .pause(2000) .click('*[data-id="treeViewDivtreeViewItemcompiler"]') diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index aa6d507120..866ce3149b 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -49,7 +49,7 @@ module.exports = { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) - .click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]') + .debugTransaction(1) .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .pause(2000) diff --git a/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts b/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts index a3bf500ec0..5c768859f8 100644 --- a/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts +++ b/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts @@ -45,7 +45,7 @@ module.exports = { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) { browser.pause(500) - .click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]') + .debugTransaction(1) .pause(2000) .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') diff --git a/apps/remix-ide-e2e/src/tests/debugger.spec.ts b/apps/remix-ide-e2e/src/tests/debugger.spec.ts index 0baeee65b3..63bda87e9c 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.spec.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.spec.ts @@ -423,7 +423,7 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line const jsGetTrace = `(async () => { try { - const result = await remix.call('debugger', 'getTrace', '0xa38bff6f06e7c4fc91df1db6aa31a69ab5d5882faa953b1e7a88bfa523268ed7') + const result = await remix.call('debugger', 'getTrace', '0x9341be49e911afe99bf1abc67cbcf36739d2e6470a08a69511c205a0737d7332') console.log('result ', result) } catch (e) { console.log(e.message) @@ -432,7 +432,7 @@ const jsGetTrace = `(async () => { const jsDebug = `(async () => { try { - const result = await remix.call('debugger', 'debug', '0xa38bff6f06e7c4fc91df1db6aa31a69ab5d5882faa953b1e7a88bfa523268ed7') + const result = await remix.call('debugger', 'debug', '0x9341be49e911afe99bf1abc67cbcf36739d2e6470a08a69511c205a0737d7332') console.log('result ', result) } catch (e) { console.log(e.message) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 518d93c64c..fca8897ec8 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -342,7 +342,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org const hiddenPanel = new HiddenPanel() const pluginManagerComponent = new PluginManagerComponent(appManager, engine) const filePanel = new FilePanel(appManager) - const landingPage = new LandingPage(appManager, menuicons, fileManager, filePanel) + const landingPage = new LandingPage(appManager, menuicons, fileManager, filePanel, contentImport) const settings = new SettingsTab( registry.get('config').api, editor, @@ -423,6 +423,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org fn: null } ) + } else { + startWalkthroughService() } // CONTENT VIEWS & DEFAULT PLUGINS @@ -518,6 +520,4 @@ Please make a backup of your contracts and start using http://remix.ethereum.org if (params.embed) framingService.embed() framingService.start(params) - - startWalkthroughService() } diff --git a/apps/remix-ide/src/app/files/file-explorer.js b/apps/remix-ide/src/app/files/file-explorer.js deleted file mode 100644 index cef877b68b..0000000000 --- a/apps/remix-ide/src/app/files/file-explorer.js +++ /dev/null @@ -1,702 +0,0 @@ -/* global FileReader */ -/* global fetch */ -const async = require('async') -const Gists = require('gists') -const modalDialogCustom = require('../ui/modal-dialog-custom') -const tooltip = require('../ui/tooltip') -const QueryParams = require('../../lib/query-params') -const helper = require('../../lib/helper') -const yo = require('yo-yo') -const Treeview = require('../ui/TreeView') -const modalDialog = require('../ui/modaldialog') -const EventManager = require('events') -const contextMenu = require('../ui/contextMenu') -const css = require('./styles/file-explorer-styles') -const globalRegistry = require('../../global/registry') -const queryParams = new QueryParams() -let MENU_HANDLE - -function fileExplorer (localRegistry, files, menuItems, plugin) { - var self = this - this.events = new EventManager() - // file provider backend - this.files = files - // element currently focused on - this.focusElement = null - // path currently focused on - this.focusPath = null - const allItems = - [ - { - action: 'createNewFile', - title: 'Create New File', - icon: 'fas fa-plus-circle' - }, - { - action: 'publishToGist', - title: 'Publish all [browser] explorer files to a github gist', - icon: 'fab fa-github' - }, - { - action: 'uploadFile', - title: 'Add Local file to the Browser Storage Explorer', - icon: 'far fa-folder-open' - }, - { - action: 'updateGist', - title: 'Update the current [gist] explorer', - icon: 'fab fa-github' - } - ] - // menu items - this.menuItems = allItems.filter( - (item) => { - if (menuItems) return menuItems.find((name) => { return name === item.action }) - } - ) - - self._components = {} - self._components.registry = localRegistry || globalRegistry - self._deps = { - config: self._components.registry.get('config').api, - editor: self._components.registry.get('editor').api, - fileManager: self._components.registry.get('filemanager').api - } - - self.events.register('focus', function (path) { - self._deps.fileManager.open(path) - }) - - self._components.registry.put({ api: self, name: `fileexplorer/${self.files.type}` }) - - // warn if file changed outside of Remix - function remixdDialog () { - return yo`
This file has been changed outside of Remix IDE.
` - } - - this.files.event.register('fileExternallyChanged', (path, file) => { - if (self._deps.config.get('currentFile') === path && self._deps.editor.currentContent() && self._deps.editor.currentContent() !== file.content) { - if (this.files.isReadOnly(path)) return self._deps.editor.setText(file.content) - - modalDialog(path + ' changed', remixdDialog(), - { - label: 'Replace by the new content', - fn: () => { - self._deps.editor.setText(file.content) - } - }, - { - label: 'Keep the content displayed in Remix', - fn: () => {} - } - ) - } - }) - - // register to event of the file provider - files.event.on('fileRemoved', fileRemoved) - files.event.on('fileRenamed', fileRenamed) - files.event.on('fileRenamedError', fileRenamedError) - files.event.on('fileAdded', fileAdded) - files.event.on('folderAdded', folderAdded) - - function fileRenamedError (error) { - modalDialogCustom.alert(error) - } - - function fileAdded (filepath) { - self.ensureRoot(() => { - const folderpath = filepath.split('/').slice(0, -1).join('/') - const currentTree = self.treeView.nodeAt(folderpath) - if (!self.treeView.isExpanded(folderpath)) self.treeView.expand(folderpath) - if (currentTree) { - self.files.resolveDirectory(folderpath, (error, fileTree) => { - if (error) console.error(error) - if (!fileTree) return - fileTree = normalize(folderpath, fileTree) - self.treeView.updateNodeFromJSON(folderpath, fileTree, true) - self.focusElement = self.treeView.labelAt(self.focusPath) - // TODO: here we update the selected file (it applicable) - // cause we are refreshing the interface of the whole directory when there's a new file. - if (self.focusElement && !self.focusElement.classList.contains('bg-secondary')) { - self.focusElement.classList.add('bg-secondary') - } - }) - } - }) - } - - function extractNameFromKey (key) { - const keyPath = key.split('/') - - return keyPath[keyPath.length - 1] - } - - function folderAdded (folderpath) { - self.ensureRoot(() => { - folderpath = folderpath.split('/').slice(0, -1).join('/') - self.files.resolveDirectory(folderpath, (error, fileTree) => { - if (error) console.error(error) - if (!fileTree) return - fileTree = normalize(folderpath, fileTree) - self.treeView.updateNodeFromJSON(folderpath, fileTree, true) - if (!self.treeView.isExpanded(folderpath)) self.treeView.expand(folderpath) - }) - }) - } - - function fileRemoved (filepath) { - const label = self.treeView.labelAt(filepath) - filepath = filepath.split('/').slice(0, -1).join('/') - - if (label && label.parentElement) { - label.parentElement.removeChild(label) - } - - self.updatePath(filepath) - } - - function fileRenamed (oldName, newName, isFolder) { - fileRemoved(oldName) - fileAdded(newName) - } - - // make interface and register to nodeClick, leafClick - self.treeView = new Treeview({ - extractData: function extractData (value, tree, key) { - var newValue = {} - // var isReadOnly = false - var isFile = false - Object.keys(value).filter(function keep (x) { - if (x === '/content') isFile = true - if (x[0] !== '/') return true - }).forEach(function (x) { newValue[x] = value[x] }) - return { - path: (tree || {}).path ? tree.path + '/' + key : key, - children: isFile ? undefined - : value instanceof Array ? value.map((item, index) => ({ - key: index, value: item - })) : value instanceof Object ? Object.keys(value).map(subkey => ({ - key: subkey, value: value[subkey] - })) : undefined - } - }, - formatSelf: function formatSelf (key, data, li) { - const isRoot = data.path === self.files.type - const isFolder = !!data.children - return yo` -
- - ${key.split('/').pop()} - - ${isRoot ? self.renderMenuItems() : ''} -
- ` - } - }) - - /** - * Extracts first two folders as a subpath from the path. - **/ - function extractExternalFolder (path) { - const firstSlIndex = path.indexOf('/', 1) - if (firstSlIndex === -1) return '' - const secondSlIndex = path.indexOf('/', firstSlIndex + 1) - if (secondSlIndex === -1) return '' - return path.substring(0, secondSlIndex) - } - - self.treeView.event.register('nodeRightClick', function (key, data, label, event) { - if (self.files.readonly) return - if (key === self.files.type) return - MENU_HANDLE && MENU_HANDLE.hide(null, true) - const actions = {} - const provider = self._deps.fileManager.fileProviderOf(key) - actions['Create File'] = () => self.createNewFile(key) - actions['Create Folder'] = () => self.createNewFolder(key) - // @todo(#2386) not fully implemented. Readd later when fixed - if (provider.isExternalFolder(key)) { - /* actions['Discard changes'] = () => { - modalDialogCustom.confirm( - 'Discard changes', - 'Are you sure you want to discard all your changes?', - () => { self.files.discardChanges(key) }, - () => {} - ) - } */ - } else { - const folderPath = extractExternalFolder(key) - actions.Rename = () => { - if (self.files.isReadOnly(key)) { return tooltip('cannot rename folder. ' + self.files.type + ' is a read only explorer') } - var name = label.querySelector('span[data-path="' + key + '"]') - if (name) editModeOn(name) - } - actions.Delete = () => { - if (self.files.isReadOnly(key)) { return tooltip('cannot delete folder. ' + self.files.type + ' is a read only explorer') } - const currentFoldername = extractNameFromKey(key) - - modalDialogCustom.confirm('Confirm to delete folder', `Are you sure you want to delete ${currentFoldername} folder?`, - async () => { - const fileManager = self._deps.fileManager - const removeFolder = await fileManager.remove(key) - - if (!removeFolder) { - tooltip(`failed to remove ${key}. Make sure the directory is empty before removing it.`) - } - }, () => {}) - } - if (folderPath === 'browser/gists') { - actions['Push changes to gist'] = () => { - const id = key.substr(key.lastIndexOf('/') + 1, key.length - 1) - modalDialogCustom.confirm( - 'Push back to Gist', - 'Are you sure you want to push all your changes back to Gist?', - () => { self.toGist(id) }, - () => {} - ) - } - } - } - MENU_HANDLE = contextMenu(event, actions) - }) - - self.treeView.event.register('leafRightClick', function (key, data, label, event) { - if (key === self.files.type) return - MENU_HANDLE && MENU_HANDLE.hide(null, true) - const actions = {} - const provider = self._deps.fileManager.fileProviderOf(key) - if (!provider.isExternalFolder(key)) { - actions['Create Folder'] = () => self.createNewFolder(self._deps.fileManager.extractPathOf(key)) - actions.Rename = () => { - if (self.files.isReadOnly(key)) { return tooltip('cannot rename file. ' + self.files.type + ' is a read only explorer') } - var name = label.querySelector('span[data-path="' + key + '"]') - if (name) editModeOn(name) - } - actions.Delete = () => { - if (self.files.isReadOnly(key)) { return tooltip('cannot delete file. ' + self.files.type + ' is a read only explorer') } - const currentFilename = extractNameFromKey(key) - - modalDialogCustom.confirm( - 'Delete file', `Are you sure you want to delete ${currentFilename} file?`, - async () => { - const fileManager = self._deps.fileManager - const removeFile = await fileManager.remove(key) - - if (!removeFile) { - tooltip(`Failed to remove file ${key}.`) - } - }, - () => {} - ) - } - if (key.endsWith('.js')) { - actions.Run = async () => { - provider.get(key, (error, content) => { - if (error) return console.log(error) - plugin.call('scriptRunner', 'execute', content) - }) - } - } - } - MENU_HANDLE = contextMenu(event, actions) - }) - - self.treeView.event.register('leafClick', function (key, data, label) { - self.events.trigger('focus', [key]) - }) - - self.treeView.event.register('nodeClick', function (path, childrenContainer) { - if (!childrenContainer) return - if (childrenContainer.style.display === 'none') return - self.updatePath(path) - }) - - // register to main app, trigger when the current file in the editor changed - self._deps.fileManager.events.on('currentFileChanged', (newFile) => { - const provider = self._deps.fileManager.fileProviderOf(newFile) - if (self.focusElement && self.focusPath !== newFile) { - self.focusElement.classList.remove('bg-secondary') - self.focusElement = null - self.focusPath = null - } - if (provider && (provider.type === files.type)) { - self.focusElement = self.treeView.labelAt(newFile) - if (self.focusElement) { - self.focusElement.classList.add('bg-secondary') - self.focusPath = newFile - } - } - }) - - self._deps.fileManager.events.on('noFileSelected', () => { - if (self.focusElement) { - self.focusElement.classList.remove('bg-secondary') - self.focusElement = null - self.focusPath = null - } - }) - - var textUnderEdit = null - - function selectElementContents (el) { - var range = document.createRange() - range.selectNodeContents(el) - var sel = window.getSelection() - sel.removeAllRanges() - sel.addRange(range) - } - - function editModeOn (label) { - textUnderEdit = label.innerText - label.setAttribute('contenteditable', true) - label.classList.add('bg-light') - label.focus() - selectElementContents(label) - } - - function editModeOff (event) { - const label = this - - const isFolder = label.className.indexOf('folder') !== -1 - function rename () { - var newPath = label.dataset.path - newPath = newPath.split('/') - newPath[newPath.length - 1] = label.innerText - newPath = newPath.join('/') - if (label.innerText === '') { - modalDialogCustom.alert('File name cannot be empty') - label.innerText = textUnderEdit - } else if (helper.checkSpecialChars(label.innerText)) { - modalDialogCustom.alert('Special characters are not allowed') - label.innerText = textUnderEdit - } else { - files.exists(newPath, (error, exist) => { - if (error) return modalDialogCustom.alert('Unexpected error while renaming: ' + error) - if (!exist) { - files.rename(label.dataset.path, newPath, isFolder) - } else { - modalDialogCustom.alert('File already exists.') - label.innerText = textUnderEdit - } - }) - } - } - - if (event.which === 13) event.preventDefault() - if ((event.type === 'blur' || event.which === 13) && label.getAttribute('contenteditable')) { - var save = textUnderEdit !== label.innerText - if (save) { - modalDialogCustom.confirm( - 'Confirm to rename a ' + (isFolder ? 'folder' : 'file'), - 'Are you sure you want to rename ' + textUnderEdit + '?', - () => { rename() }, - () => { label.innerText = textUnderEdit } - ) - } - label.removeAttribute('contenteditable') - label.classList.remove('bg-light') - } - } -} - -fileExplorer.prototype.updatePath = function (path) { - this.files.resolveDirectory(path, (error, fileTree) => { - if (error) console.error(error) - if (!fileTree) return - var newTree = normalize(path, fileTree) - this.treeView.updateNodeFromJSON(path, newTree, true) - }) -} - -fileExplorer.prototype.hide = function () { - if (this.container) this.container.style.display = 'none' -} - -fileExplorer.prototype.show = function () { - if (this.container) this.container.style.display = 'block' -} - -fileExplorer.prototype.init = function () { - this.container = yo`
` - return this.container -} - -fileExplorer.prototype.publishToGist = function () { - modalDialogCustom.confirm( - 'Create a public gist', - 'Are you sure you want to publish all your files in browser directory anonymously as a public gist on github.com? Note: this will not include directories.', - () => { this.toGist() } - ) -} - -fileExplorer.prototype.uploadFile = function (event) { - // TODO The file explorer is merely a view on the current state of - // the files module. Please ask the user here if they want to overwrite - // a file and then just use `files.add`. The file explorer will - // pick that up via the 'fileAdded' event from the files module. - - const self = this - - ;[...event.target.files].forEach((file) => { - const files = this.files - function loadFile () { - var fileReader = new FileReader() - fileReader.onload = async function (event) { - if (helper.checkSpecialChars(file.name)) { - modalDialogCustom.alert('Special characters are not allowed') - return - } - var success = await files.set(name, event.target.result) - if (!success) { - modalDialogCustom.alert('Failed to create file ' + name) - } else { - self.events.trigger('focus', [name]) - } - } - fileReader.readAsText(file) - } - var name = files.type + '/' + file.name - files.exists(name, (error, exist) => { - if (error) console.log(error) - if (!exist) { - loadFile() - } else { - modalDialogCustom.confirm('Confirm overwrite', `The file ${name} already exists! Would you like to overwrite it?`, () => { loadFile() }) - } - }) - }) -} - -fileExplorer.prototype.toGist = function (id) { - const proccedResult = function (error, data) { - if (error) { - modalDialogCustom.alert('Failed to manage gist: ' + error) - console.log('Failed to manage gist: ' + error) - } else { - if (data.html_url) { - modalDialogCustom.confirm('Gist is ready', `The gist is at ${data.html_url}. Would you like to open it in a new window?`, () => { - window.open(data.html_url, '_blank') - }) - } else { - modalDialogCustom.alert(data.message + ' ' + data.documentation_url + ' ' + JSON.stringify(data.errors, null, '\t')) - } - } - } - - /** - * This function is to get the original content of given gist - * @params id is the gist id to fetch - */ - async function getOriginalFiles (id) { - if (!id) { - return [] - } - - const url = `https://api.github.com/gists/${id}` - const res = await fetch(url) - const data = await res.json() - return data.files || [] - } - - // If 'id' is not defined, it is not a gist update but a creation so we have to take the files from the browser explorer. - const folder = id ? '/gists/' + id : '/' - this.packageFiles(this.files, folder, (error, packaged) => { - if (error) { - console.log(error) - modalDialogCustom.alert('Failed to create gist: ' + error.message) - } else { - // check for token - var tokenAccess = this._deps.config.get('settings/gist-access-token') - if (!tokenAccess) { - modalDialogCustom.alert( - 'Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.' - ) - } else { - const description = 'Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=' + - queryParams.get().version + '&optimize=' + queryParams.get().optimize + '&runs=' + queryParams.get().runs + '&gist=' - const gists = new Gists({ token: tokenAccess }) - - if (id) { - const originalFileList = getOriginalFiles(id) - // Telling the GIST API to remove files - const updatedFileList = Object.keys(packaged) - const allItems = Object.keys(originalFileList) - .filter(fileName => updatedFileList.indexOf(fileName) === -1) - .reduce((acc, deleteFileName) => ({ - ...acc, - [deleteFileName]: null - }), originalFileList) - // adding new files - updatedFileList.forEach((file) => { - const _items = file.split('/') - const _fileName = _items[_items.length - 1] - allItems[_fileName] = packaged[file] - }) - - tooltip('Saving gist (' + id + ') ...') - gists.edit({ - description: description, - public: true, - files: allItems, - id: id - }, (error, result) => { - proccedResult(error, result) - if (!error) { - for (const key in allItems) { - if (allItems[key] === null) delete allItems[key] - } - } - }) - } else { - // id is not existing, need to create a new gist - tooltip('Creating a new gist ...') - gists.create({ - description: description, - public: true, - files: packaged - }, (error, result) => { - proccedResult(error, result) - }) - } - } - } - }) -} - -// return all the files, except the temporary/readonly ones.. -fileExplorer.prototype.packageFiles = function (filesProvider, directory, callback) { - const ret = {} - filesProvider.resolveDirectory(directory, (error, files) => { - if (error) callback(error) - else { - async.eachSeries(Object.keys(files), (path, cb) => { - if (filesProvider.isDirectory(path)) { - cb() - } else { - filesProvider.get(path, (error, content) => { - if (error) return cb(error) - if (/^\s+$/.test(content) || !content.length) { - content = '// this line is added to create a gist. Empty file is not allowed.' - } - ret[path] = { content } - cb() - }) - } - }, (error) => { - callback(error, ret) - }) - } - }) -} - -fileExplorer.prototype.createNewFile = function (parentFolder = '/') { - const self = this - modalDialogCustom.prompt('Create new file', 'File Name (e.g Untitled.sol)', 'Untitled.sol', (input) => { - if (!input) input = 'New file' - helper.createNonClashingName(parentFolder + '/' + input, self.files, async (error, newName) => { - if (error) return tooltip('Failed to create file ' + newName + ' ' + error) - const fileManager = self._deps.fileManager - const createFile = await fileManager.writeFile(newName, '') - - if (!createFile) { - tooltip('Failed to create file ' + newName) - } else { - await fileManager.open(newName) - if (newName.includes('_test.sol')) { - self.events.trigger('newTestFileCreated', [newName]) - } - } - }) - }, null, true) -} - -fileExplorer.prototype.createNewFolder = function (parentFolder) { - const self = this - modalDialogCustom.prompt('Create new folder', '', 'New folder', (input) => { - if (!input) { - return tooltip('Failed to create folder. The name can not be empty') - } - - const currentPath = !parentFolder ? self._deps.fileManager.currentPath() : parentFolder - let newName = currentPath ? currentPath + '/' + input : self.files.type + '/' + input - - newName = newName + '/' - self.files.exists(newName, (error, exist) => { - if (error) return tooltip('Unexpected error while creating folder: ' + error) - if (!exist) { - self.files.set(newName, '') - } else { - tooltip('Folder already exists.', () => {}) - } - }) - }, null, true) -} - -fileExplorer.prototype.renderMenuItems = function () { - let items = '' - if (this.menuItems) { - items = this.menuItems.map(({ action, title, icon }) => { - if (action === 'uploadFile') { - return yo` - - ` - } else { - return yo` - { event.stopPropagation(); this[action]() }} - class="newFile ${icon} ${css.newFile}" - title=${title} - > - - ` - } - }) - } - return yo`${items}` -} - -fileExplorer.prototype.ensureRoot = function (cb) { - cb = cb || (() => {}) - var self = this - if (self.element) return cb() - const root = {} - root[this.files.type] = {} - var element = self.treeView.render(root, false) - element.classList.add(css.fileexplorer) - element.events = self.events - element.api = self.api - self.container.appendChild(element) - self.element = element - if (cb) cb() - self.treeView.expand(self.files.type) -} - -function normalize (path, filesList) { - var prefix = path.split('/')[0] - var newList = {} - Object.keys(filesList).forEach(key => { - newList[prefix + '/' + key] = filesList[key].isDirectory ? {} : { '/content': true } - }) - return newList -} - -module.exports = fileExplorer diff --git a/apps/remix-ide/src/app/files/remixd-handle.js b/apps/remix-ide/src/app/files/remixd-handle.js index 6f06d8773b..be6997574d 100644 --- a/apps/remix-ide/src/app/files/remixd-handle.js +++ b/apps/remix-ide/src/app/files/remixd-handle.js @@ -136,23 +136,25 @@ export class RemixdHandle extends WebsocketPlugin { } function remixdDialog () { - const commandText = 'remixd -s path-to-the-shared-folder --remix-ide remix-ide-instance-URL' + const commandText = 'remixd -s -u ' return yo`
Access your local file system from Remix IDE using Remixd NPM package.

Remixd needs to be running in the background to load the files in localhost workspace. For more info, please check the Remixd tutorial.
-
If you are just looking for the remixd command, here it is: +
+ If you are just looking for the remixd command, here it is:

${commandText} ${copyToClipboard(() => commandText)}
-
When connected, a session will be started between ${window.location.origin} and your local file system at ws://127.0.0.1:65520 - and the shared folder will be in the File Explorers workspace named "localhost". -
Note, if the shared folder is a Hardhat project, an additional Hardhat websocket plugin will be listening at ws://127.0.0.1:65522 +
+ When connected, a session will be started between ${window.location.origin} and your local file system at ws://127.0.0.1:65520. + The shared folder will be in the "File Explorers" workspace named "localhost". +
Read more about other Remixd ports usage
-
Please make sure your system is secured enough and ports 65520, 65522 are not opened nor forwarded. - This feature is still in Alpha, so we recommend to keep a copy of the shared folder. +
+ This feature is still in Alpha. We recommend to keep a backup of the shared folder.
diff --git a/apps/remix-ide/src/app/panels/terminal.js b/apps/remix-ide/src/app/panels/terminal.js index fb3bc4a130..76b632a649 100644 --- a/apps/remix-ide/src/app/panels/terminal.js +++ b/apps/remix-ide/src/app/panels/terminal.js @@ -4,20 +4,12 @@ import ReactDOM from 'react-dom' import { RemixUiTerminal } from '@remix-ui/terminal' // eslint-disable-line import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' -import * as remixBleach from '../../lib/remixBleach' - -var yo = require('yo-yo') -var javascriptserialize = require('javascript-serialize') -var jsbeautify = require('js-beautify') -var type = require('component-type') var vm = require('vm') var EventManager = require('../../lib/events') var CommandInterpreterAPI = require('../../lib/cmdInterpreterAPI') var AutoCompletePopup = require('../ui/auto-complete-popup') -var css = require('./styles/terminal-styles') - import { CompilerImports } from '@remix-project/core-plugin' // eslint-disable-line var globalRegistry = require('../../global/registry') var SourceHighlighter = require('../../app/editor/sourceHighlighter') @@ -79,14 +71,6 @@ class Terminal extends Plugin { this._components = {} this._components.cmdInterpreter = new CommandInterpreterAPI(this, null, this.blockchain) this._components.autoCompletePopup = new AutoCompletePopup(this._opts) - // this._components.autoCompletePopup.event.register('handleSelect', function (input) { - // const textList = this._view.input.innerText.split(' ') - // textList.pop() - // textList.push(input) - // this._view.input.innerText = textList - // this._view.input.focus() - // this.putCursor2End(this._view.input) - // }) this._commands = {} this.commands = {} this._JOURNAL = [] @@ -111,11 +95,6 @@ class Terminal extends Plugin { this.off('scriptRunner', 'error') } - // logHtml (html) { - // var command = this.commands.html - // if (typeof command === 'function') command(html) - // } - logHtml (html) { var command = this.commands.html if (typeof command === 'function') command(html) @@ -158,269 +137,10 @@ class Terminal extends Plugin { ) } - // _appendItem (item) { - // var self = this - // var { el, gidx } = item - // self._JOURNAL[gidx] = item - // if (!self._jobs.length) { - // requestAnimationFrame(function updateTerminal () { - // self._jobs.forEach(el => self._view.journal.appendChild(el)) - // self.scroll2bottom() - // self._jobs = [] - // }) - // } - // if (self.data.activeFilters.commands[item.cmd]) self._jobs.push(el) - // } - scroll2bottom () { - var self = this setTimeout(function () { - // self._view.term.scrollTop = self._view.term.scrollHeight }, 0) } - - // _blocksRenderer (mode) { - // if (mode === 'html') { - // return function logger (args, scopedCommands, append) { - // if (args.length) append(args[0]) - // } - // } - // mode = { - // log: 'text-info', - // info: 'text-info', - // warn: 'text-warning', - // error: 'text-danger' - // }[mode] // defaults - - // if (mode) { - // const filterUndefined = (el) => el !== undefined && el !== null - // return function logger (args, scopedCommands, append) { - // var types = args.filter(filterUndefined).map(type) - // var values = javascriptserialize.apply(null, args.filter(filterUndefined)).map(function (val, idx) { - // if (typeof args[idx] === 'string') { - // const el = document.createElement('div') - // el.innerHTML = args[idx].replace(/(\r\n|\n|\r)/gm, '
') - // val = el.children.length === 0 ? el.firstChild : el - // } - // if (types[idx] === 'element') val = jsbeautify.html(val) - // return val - // }) - // if (values.length) { - // append(yo`${values}`) - // } - // } - // } else { - // throw new Error('mode is not supported') - // } - // } - - // _scopeCommands (append) { - // var self = this - // var scopedCommands = {} - // Object.keys(self.commands).forEach(function makeScopedCommand (cmd) { - // var command = self._commands[cmd] - // scopedCommands[cmd] = function _command () { - // var args = [...arguments] - // command(args, scopedCommands, el => append(cmd, args, blockify(el))) - // } - // }) - // return scopedCommands - // } - - // registerFilter (commandName, filterFn) { - // this.data.filterFns[commandName] = filterFn - // } - - // registerCommand (name, command, opts) { - // var self = this - // name = String(name) - // if (this._commands[name]) throw new Error(`command "${name}" exists already`) - // if (typeof command !== 'function') throw new Error(`invalid command: ${command}`) - // this._commands[name] = command - // console.log({ command }) - // console.log(self._commands) - // this._INDEX.commands[name] = [] - // this._INDEX.commandsMain[name] = [] - // this.commands[name] = function _command () { - // var args = [...arguments] - // var steps = [] - // var root = { steps, cmd: name } - // var ITEM = { root, cmd: name } - // root.gidx = self._INDEX.allMain.push(ITEM) - 1 - // root.idx = self._INDEX.commandsMain[name].push(ITEM) - 1 - // function append (cmd, params, el) { - // var item - // if (cmd) { // subcommand - // item = { el, cmd, root } - // } else { // command - // item = ITEM - // item.el = el - // cmd = name - // } - // item.gidx = self._INDEX.all.push(item) - 1 - // item.idx = self._INDEX.commands[cmd].push(item) - 1 - // item.step = steps.push(item) - 1 - // item.args = params - // // self._appendItem(item) - // } - // var scopedCommands = self._scopeCommands(append) - // command(args, scopedCommands, el => append(null, args, blockify(el))) - // } - // var help = typeof command.help === 'string' ? command.help : [ - // '// no help available for:', - // `terminal.commands.${name}(...)` - // ].join('\n') - // this.commands[name].toString = _ => { return help } - // this.commands[name].help = help - // this.data.activeFilters.commands[name] = opts && opts.activate - // if (opts.filterFn) { - // this.registerFilter(name, opts.filterFn) - // } - // return this.commands[name] - // } - - // async _shell (script, scopedCommands, done) { // default shell - // if (script.indexOf('remix:') === 0) { - // return done(null, 'This type of command has been deprecated and is not functionning anymore. Please run remix.help() to list available commands.') - // } - // var self = this - // if (script.indexOf('remix.') === 0) { - // // we keep the old feature. This will basically only be called when the command is querying the "remix" object. - // // for all the other case, we use the Code Executor plugin - // var context = domTerminalFeatures(scopedCommands, self.blockchain) - // try { - // var cmds = vm.createContext(context) - // var result = vm.runInContext(script, cmds) - // return done(null, result) - // } catch (error) { - // return done(error.message) - // } - // } - // try { - // let result - // if (script.trim().startsWith('git')) { - // // result = await this.call('git', 'execute', script) - // } else { - // result = await this.call('scriptRunner', 'execute', script) - // } - // if (result) self.commands.html(yo`
${result}
`) - // done() - // } catch (error) { - // done(error.message || error) - // } - // } - // } - - // function domTerminalFeatures (scopedCommands, blockchain) { - // return { - // remix: { - // blockchain: this.blockchain, - // commandHelp: this.commandHelp, - // event: this.event, - // _deps: this._deps - // } - // } - // } - - // function loadgist (id, cb) { - // const self = this - // self._components.gistHandler.loadFromGist({ gist: id }, this._deps.fileManager) - // if (cb) cb() - // } - - // function loadurl (url, cb) { - // const self = this - // self._components.fileImport.import(url, - // (loadingMsg) => { toolTip(loadingMsg) }, - // (err, content, cleanUrl, type, url) => { - // if (err) { - // toolTip(`Unable to load ${url}: ${err}`) - // if (cb) cb(err) - // } else { - // self._deps.fileManager.writeFile(type + '/' + cleanUrl, content) - // try { - // content = JSON.parse(content) - // async.eachOfSeries(content.sources, (value, file, callbackSource) => { - // var url = value.urls[0] // @TODO retrieve all other contents ? - // self._components.fileImport.import(url, - // (loadingMsg) => { toolTip(loadingMsg) }, - // async (error, content, cleanUrl, type, url) => { - // if (error) { - // toolTip(`Cannot retrieve the content of ${url}: ${error}`) - // return callbackSource(`Cannot retrieve the content of ${url}: ${error}`) - // } else { - // try { - // await self._deps.fileManager.writeFile(type + '/' + cleanUrl, content) - // callbackSource() - // } catch (e) { - // callbackSource(e.message) - // } - // } - // }) - // }, (error) => { - // if (cb) cb(error) - // }) - // } catch (e) {} - // if (cb) cb() - // } - // }) - // } - - // function exeCurrent (cb) { - // return this.execute(undefined, cb) - // } - - // function execute (file, cb) { - // const self = this - - // function _execute (content, cb) { - // if (!content) { - // toolTip('no content to execute') - // if (cb) cb() - // return - // } - - // self._components.terminal.commands.script(content) - // } - - // if (typeof file === 'undefined') { - // var content = self._deps.editor.currentContent() - // _execute(content, cb) - // return - // } - - // var provider = self._deps.fileManager.fileProviderOf(file) - - // if (!provider) { - // toolTip(`provider for path ${file} not found`) - // if (cb) cb() - // return - // } - - // provider.get(file, (error, content) => { - // if (error) { - // // toolTip(error) - // // TODO: pop up - // if (cb) cb() - // return - // } - - // _execute(content, cb) - // }) - // } - -// function help (cb) { -// const self = this -// var help = yo`
` -// for (var k in self.commandHelp) { -// help.appendChild(yo`
${k}: ${self.commandHelp[k]}
`) -// help.appendChild(yo`
`) -// } -// self._components.terminal.commands.html(help) -// if (cb) cb() -// return '' -// } } -function blockify (el) { return yo`
${el}
` } module.exports = Terminal diff --git a/apps/remix-ide/src/app/tabs/compile-tab.js b/apps/remix-ide/src/app/tabs/compile-tab.js index 285ecb5363..6d84a9721f 100644 --- a/apps/remix-ide/src/app/tabs/compile-tab.js +++ b/apps/remix-ide/src/app/tabs/compile-tab.js @@ -24,7 +24,6 @@ const profile = { documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html', version: packageJson.version, methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig', 'compileFile'] - } // EditorApi: diff --git a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js deleted file mode 100644 index a9c17192cc..0000000000 --- a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js +++ /dev/null @@ -1,135 +0,0 @@ -import * as packageJson from '../../../../../../package.json' -import { Plugin } from '@remixproject/engine' -const EventEmitter = require('events') -var Compiler = require('@remix-project/remix-solidity').Compiler - -const profile = { - name: 'solidity-logic', - displayName: 'Solidity compiler logic', - description: 'Compile solidity contracts - Logic', - methods: ['getCompilerState'], - version: packageJson.version -} - -class CompileTab extends Plugin { - constructor (queryParams, fileManager, editor, config, fileProvider, contentImport) { - super(profile) - this.event = new EventEmitter() - this.queryParams = queryParams - this.compilerImport = contentImport - this.compiler = new Compiler((url, cb) => this.compilerImport.resolveAndSave(url).then((result) => cb(null, result)).catch((error) => cb(error.message))) - this.fileManager = fileManager - this.editor = editor - this.config = config - this.fileProvider = fileProvider - } - - init () { - this.optimize = this.queryParams.get().optimize - this.optimize = this.optimize === 'true' - this.queryParams.update({ optimize: this.optimize }) - this.compiler.set('optimize', this.optimize) - - this.runs = this.queryParams.get().runs - this.runs = this.runs || 200 - this.queryParams.update({ runs: this.runs }) - this.compiler.set('runs', this.runs) - - this.evmVersion = this.queryParams.get().evmVersion - if (this.evmVersion === 'undefined' || this.evmVersion === 'null' || !this.evmVersion) { - this.evmVersion = null - } - this.queryParams.update({ evmVersion: this.evmVersion }) - this.compiler.set('evmVersion', this.evmVersion) - } - - setOptimize (newOptimizeValue) { - this.optimize = newOptimizeValue - this.queryParams.update({ optimize: this.optimize }) - this.compiler.set('optimize', this.optimize) - } - - setRuns (runs) { - this.runs = runs - this.queryParams.update({ runs: this.runs }) - this.compiler.set('runs', this.runs) - } - - setEvmVersion (newEvmVersion) { - this.evmVersion = newEvmVersion - this.queryParams.update({ evmVersion: this.evmVersion }) - this.compiler.set('evmVersion', this.evmVersion) - } - - /** - * Set the compiler to using Solidity or Yul (default to Solidity) - * @params lang {'Solidity' | 'Yul'} ... - */ - setLanguage (lang) { - this.compiler.set('language', lang) - } - - getCompilerState () { - return this.compiler.state - } - - /** - * Compile a specific file of the file manager - * @param {string} target the path to the file to compile - */ - compileFile (target) { - if (!target) throw new Error('No target provided for compiliation') - const provider = this.fileManager.fileProviderOf(target) - if (!provider) throw new Error(`cannot compile ${target}. Does not belong to any explorer`) - return new Promise((resolve, reject) => { - provider.get(target, (error, content) => { - if (error) return reject(error) - const sources = { [target]: { content } } - this.event.emit('startingCompilation') - // setTimeout fix the animation on chrome... (animation triggered by 'staringCompilation') - setTimeout(() => { this.compiler.compile(sources, target); resolve() }, 100) - }) - }) - } - - async isHardhatProject () { - if (this.fileManager.mode === 'localhost') { - return await this.fileManager.exists('hardhat.config.js') - } else return false - } - - runCompiler (hhCompilation) { - try { - if (this.fileManager.mode === 'localhost' && hhCompilation) { - const { currentVersion, optimize, runs } = this.compiler.state - 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: error }) - }) - } - } - this.fileManager.saveCurrentFile() - this.event.emit('removeAnnotations') - var currentFile = this.config.get('currentFile') - return this.compileFile(currentFile) - } catch (err) { - console.error(err) - } - } -} - -module.exports = CompileTab diff --git a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js deleted file mode 100644 index a7214c3b3a..0000000000 --- a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js +++ /dev/null @@ -1,580 +0,0 @@ - -import toaster from '../../ui/tooltip' -import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '@remix-project/remix-solidity' -const yo = require('yo-yo') -const helper = require('../../../lib/helper') -const addTooltip = require('../../ui/tooltip') -const semver = require('semver') -const modalDialogCustom = require('../../ui/modal-dialog-custom') -const css = require('../styles/compile-tab-styles') -const _paq = window._paq = window._paq || [] - -class CompilerContainer { - constructor (compileTabLogic, editor, config, queryParams) { - this._view = {} - this.compileTabLogic = compileTabLogic - this.editor = editor - this.config = config - this.queryParams = queryParams - this.hhCompilation = false - - this.data = { - hideWarnings: config.get('hideWarnings') || false, - autoCompile: config.get('autoCompile'), - compileTimeout: null, - timeout: 300, - allversions: null, - selectedVersion: null, - defaultVersion: 'soljson-v0.8.4+commit.c7e474f2.js' // this default version is defined: in makeMockCompiler (for browser test) - } - } - - /** - * Update the compilation button with the name of the current file - */ - set currentFile (name = '') { - if (name && name !== '') { - this._setCompilerVersionFromPragma(name) - } - if (!this._view.compilationButton) return - const button = this.compilationButton(name.split('/').pop()) - this._disableCompileBtn(!name || (name && !this.isSolFileSelected(name))) - yo.update(this._view.compilationButton, button) - } - - isSolFileSelected (currentFile = '') { - if (!currentFile) currentFile = this.config.get('currentFile') - if (!currentFile) return false - const extention = currentFile.substr(currentFile.length - 3, currentFile.length) - return extention.toLowerCase() === 'sol' || extention.toLowerCase() === 'yul' - } - - deactivate () { - // deactivate editor listeners - this.editor.event.unregister('contentChanged') - this.editor.event.unregister('sessionSwitched') - } - - activate () { - this.currentFile = this.config.get('currentFile') - this.listenToEvents() - } - - listenToEvents () { - this.editor.event.register('sessionSwitched', () => { - if (!this._view.compileIcon) return - this.scheduleCompilation() - }) - - this.compileTabLogic.event.on('startingCompilation', () => { - if (!this._view.compileIcon) return - this._view.compileIcon.setAttribute('title', 'compiling...') - this._view.compileIcon.classList.remove(`${css.bouncingIcon}`) - this._view.compileIcon.classList.add(`${css.spinningIcon}`) - }) - - this.compileTabLogic.compiler.event.register('compilationDuration', (speed) => { - if (!this._view.warnCompilationSlow) return - if (speed > 1000) { - const msg = `Last compilation took ${speed}ms. We suggest to turn off autocompilation.` - this._view.warnCompilationSlow.setAttribute('title', msg) - this._view.warnCompilationSlow.style.visibility = 'visible' - } else { - this._view.warnCompilationSlow.style.visibility = 'hidden' - } - }) - - this.editor.event.register('contentChanged', () => { - if (!this._view.compileIcon) return - this.scheduleCompilation() - this._view.compileIcon.classList.add(`${css.bouncingIcon}`) // @TODO: compileView tab - }) - - this.compileTabLogic.compiler.event.register('loadingCompiler', () => { - if (!this._view.compileIcon) return - this._disableCompileBtn(true) - this._view.compileIcon.setAttribute('title', 'compiler is loading, please wait a few moments.') - this._view.compileIcon.classList.add(`${css.spinningIcon}`) - this._view.warnCompilationSlow.style.visibility = 'hidden' - this._updateLanguageSelector() - }) - - this.compileTabLogic.compiler.event.register('compilerLoaded', () => { - if (!this._view.compileIcon) return - this._disableCompileBtn(false) - this._view.compileIcon.setAttribute('title', '') - this._view.compileIcon.classList.remove(`${css.spinningIcon}`) - if (this.data.autoCompile) this.compileIfAutoCompileOn() - }) - - this.compileTabLogic.compiler.event.register('compilationFinished', (success, data, source) => { - if (!this._view.compileIcon) return - this._view.compileIcon.setAttribute('title', 'idle') - this._view.compileIcon.classList.remove(`${css.spinningIcon}`) - this._view.compileIcon.classList.remove(`${css.bouncingIcon}`) - _paq.push(['trackEvent', 'compiler', 'compiled_with_version', this._retrieveVersion()]) - }) - } - - /************** - * SUBCOMPONENT - */ - compilationButton (name = '') { - const displayed = name || '' - const disabled = name && this.isSolFileSelected() ? '' : 'disabled' - return yo` - - ` - } - - _disableCompileBtn (shouldDisable) { - const btn = document.getElementById('compileBtn') - if (!btn) return - if (shouldDisable) { - btn.classList.add('disabled') - } else if (this.isSolFileSelected()) { - btn.classList.remove('disabled') - } - } - - // Load solc compiler version according to pragma in contract file - _setCompilerVersionFromPragma (filename) { - if (!this.data.allversions) return - this.compileTabLogic.fileManager.readFile(filename).then(data => { - const pragmaArr = data.match(/(pragma solidity (.+?);)/g) - if (pragmaArr && pragmaArr.length === 1) { - const pragmaStr = pragmaArr[0].replace('pragma solidity', '').trim() - const pragma = pragmaStr.substring(0, pragmaStr.length - 1) - const releasedVersions = this.data.allversions.filter(obj => !obj.prerelease).map(obj => obj.version) - const allVersions = this.data.allversions.map(obj => this._retrieveVersion(obj.version)) - const currentCompilerName = this._retrieveVersion(this._view.versionSelector.selectedOptions[0].label) - // contains only numbers part, for example '0.4.22' - const pureVersion = this._retrieveVersion() - // is nightly build newer than the last release - const isNewestNightly = currentCompilerName.includes('nightly') && semver.gt(pureVersion, releasedVersions[0]) - // checking if the selected version is in the pragma range - const isInRange = semver.satisfies(pureVersion, pragma) - // checking if the selected version is from official compilers list(excluding custom versions) and in range or greater - const isOfficial = allVersions.includes(currentCompilerName) - if (isOfficial && (!isInRange && !isNewestNightly)) { - const compilerToLoad = semver.maxSatisfying(releasedVersions, pragma) - const compilerPath = this.data.allversions.filter(obj => !obj.prerelease && obj.version === compilerToLoad)[0].path - if (this.data.selectedVersion !== compilerPath) { - this.data.selectedVersion = compilerPath - this._updateVersionSelector() - } - } - } - }) - } - - _retrieveVersion (version) { - if (!version) version = this._view.versionSelector.value - if (version === 'builtin') version = this.data.defaultVersion - return semver.coerce(version) ? semver.coerce(version).version : '' - } - - render () { - this.compileTabLogic.compiler.event.register('compilerLoaded', (version) => this.setVersionText(version)) - this.fetchAllVersion((allversions, selectedVersion, isURL) => { - this.data.allversions = allversions - if (isURL) this._updateVersionSelector(selectedVersion) - else { - this.data.selectedVersion = selectedVersion - if (this._view.versionSelector) this._updateVersionSelector() - } - }) - - this.hardhatCompilation = yo`` - this._view.warnCompilationSlow = yo`` - this._view.compileIcon = yo`` - this._view.autoCompile = yo` this.updateAutoCompile()} data-id="compilerContainerAutoCompile" id="autoCompile" type="checkbox" title="Auto compile">` - this._view.hideWarningsBox = yo` this.hideWarnings()} id="hideWarningsBox" type="checkbox" title="Hide warnings">` - if (this.data.autoCompile) this._view.autoCompile.setAttribute('checked', '') - if (this.data.hideWarnings) this._view.hideWarningsBox.setAttribute('checked', '') - - this._view.optimize = yo` this.onchangeOptimize()} class="custom-control-input" id="optimize" type="checkbox">` - if (this.compileTabLogic.optimize) this._view.optimize.setAttribute('checked', '') - - this._view.runs = yo` this.onchangeRuns()} - >` - if (this.compileTabLogic.optimize) { - this._view.runs.removeAttribute('disabled') - this._view.runs.value = this.compileTabLogic.runs - } else { - this._view.runs.setAttribute('disabled', '') - } - - this._view.versionSelector = yo` - ` - this._view.languageSelector = yo` - ` - this._view.version = yo`` - - this._view.evmVersionSelector = yo` - ` - if (this.compileTabLogic.evmVersion) { - const s = this._view.evmVersionSelector - let i - for (i = 0; i < s.options.length; i++) { - if (s.options[i].value === this.compileTabLogic.evmVersion) { - break - } - } - if (i === s.options.length) { // invalid evmVersion from queryParams - s.selectedIndex = 0 // compiler default - this.onchangeEvmVersion() - } else { - s.selectedIndex = i - this.onchangeEvmVersion() - } - } - - this._view.compilationButton = this.compilationButton() - - this._view.includeNightlies = yo` - this._updateVersionSelector()}> - ` - this._view.compileContainer = yo` -
- -
-
-
- - ${this._view.versionSelector} -
-
- ${this._view.includeNightlies} - -
-
- - ${this._view.languageSelector} -
-
- - ${this._view.evmVersionSelector} -
-
-

Compiler Configuration

-
- ${this._view.autoCompile} - -
-
-
- ${this._view.optimize} - - ${this._view.runs} -
-
-
- ${this._view.hideWarningsBox} - -
-
- ${this.hardhatCompilation} - ${this._view.compilationButton} -
-
- -
` - - return this._view.compileContainer - } - - promtCompiler () { - modalDialogCustom.prompt( - 'Add a custom compiler', - 'URL', - '', - (url) => this.addCustomCompiler(url) - ) - } - - addCustomCompiler (url) { - this.data.selectedVersion = this._view.versionSelector.value - this._updateVersionSelector(url) - } - - updateAutoCompile (event) { - this.config.set('autoCompile', this._view.autoCompile.checked) - } - - updatehhCompilation (event) { - this.hhCompilation = event.target.checked - } - - compile (event) { - const currentFile = this.config.get('currentFile') - if (!this.isSolFileSelected()) return - - this._setCompilerVersionFromPragma(currentFile) - this.compileTabLogic.runCompiler(this.hhCompilation) - } - - compileIfAutoCompileOn () { - if (this.config.get('autoCompile')) { - this.compile() - } - } - - hideWarnings (event) { - this.config.set('hideWarnings', this._view.hideWarningsBox.checked) - this.compileIfAutoCompileOn() - } - - /* - The following functions are handlers for internal events. - */ - - onchangeOptimize () { - this.compileTabLogic.setOptimize(!!this._view.optimize.checked) - if (this.compileTabLogic.optimize) { - this._view.runs.removeAttribute('disabled') - this.compileTabLogic.setRuns(parseInt(this._view.runs.value)) - } else { - this.compileTabLogic.setRuns(200) - this._view.runs.setAttribute('disabled', '') - } - this.compileIfAutoCompileOn() - } - - onchangeRuns () { - this.compileTabLogic.setRuns(parseInt(this._view.runs.value)) - this.compileIfAutoCompileOn() - } - - onchangeLanguage () { - this.compileTabLogic.setLanguage(this._view.languageSelector.value) - this.compileIfAutoCompileOn() - } - - onchangeEvmVersion () { - const s = this._view.evmVersionSelector - let v = s.value - if (v === 'default') { - v = null - } - this.compileTabLogic.setEvmVersion(v) - for (let i = 0; i < s.options.length; i++) { - if (i === s.selectedIndex) { - s.options[s.selectedIndex].setAttribute('selected', 'selected') - } else { - s.options[i].removeAttribute('selected') - } - } - - this.compileIfAutoCompileOn() - } - - onchangeLoadVersion () { - this.data.selectedVersion = this._view.versionSelector.value - this._updateVersionSelector() - this._updateLanguageSelector() - } - - /* - The following functions map with the above event handlers. - They are an external API for modifying the compiler configuration. - */ - setConfiguration (settings) { - this.setLanguage(settings.language) - this.setEvmVersion(settings.evmVersion) - this.setOptimize(settings.optimize) - this.setRuns(settings.runs) - this.setVersion(settings.version) - } - - setOptimize (enabled) { - this._view.optimize.checked = enabled - this.onchangeOptimize() - } - - setRuns (value) { - if (value) { - this._view.runs.value = value - this.onchangeRuns() - } - } - - setLanguage (lang) { - this._view.languageSelector.value = lang - this.onchangeLanguage() - } - - setEvmVersion (version) { - this._view.evmVersionSelector.value = version || 'default' - this.onchangeEvmVersion() - } - - setVersion (version) { - this._view.versionSelector.value = `soljson-v${version}.js` - this.onchangeLoadVersion() - } - - _shouldBeAdded (version) { - return !version.includes('nightly') || - (version.includes('nightly') && this._view.includeNightlies.checked) - } - - _updateVersionSelector (customUrl = '') { - // update selectedversion if previous one got filtered out - if (!this.data.selectedVersion || !this._shouldBeAdded(this.data.selectedVersion)) { - this.data.selectedVersion = this.data.defaultVersion - } - this._view.versionSelector.innerHTML = '' - this._view.versionSelector.removeAttribute('disabled') - this.queryParams.update({ version: this.data.selectedVersion }) - let url - if (customUrl !== '') { - this.data.selectedVersion = customUrl - this._view.versionSelector.appendChild(yo``) - url = customUrl - this.queryParams.update({ version: this.data.selectedVersion }) - } else if (this.data.selectedVersion === 'builtin') { - let 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 (this.data.selectedVersion.indexOf('soljson') !== 0 || helper.checkSpecialChars(this.data.selectedVersion)) { - return console.log('loading ' + this.data.selectedVersion + ' not allowed') - } - url = `${urlFromVersion(this.data.selectedVersion)}` - } - - this.data.allversions.forEach(build => { - const option = build.path === this.data.selectedVersion - ? yo`` - : yo`` - - if (this._shouldBeAdded(option.innerText)) { - this._view.versionSelector.appendChild(option) - } - }) - if (this.data.selectedVersion !== 'builtin' && semver.lt(this._retrieveVersion(), 'v0.4.12+commit.194ff033.js')) { - toaster(yo` -
- Old compiler usage detected. -

You are using a compiler older than v0.4.12.

-

Some functionality may not work.

-
` - ) - } - - // Workers cannot load js on "file:"-URLs and we get a - // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, - // resort to non-worker version in that case. - if (canUseWorker(this._retrieveVersion())) { - this.compileTabLogic.compiler.loadVersion(true, url) - this.setVersionText('(loading using worker)') - } else { - this.compileTabLogic.compiler.loadVersion(false, url) - this.setVersionText('(loading)') - } - } - - _updateLanguageSelector () { - // This is the first version when Yul is available - if (!semver.valid(this._retrieveVersion()) || semver.lt(this._retrieveVersion(), 'v0.5.7+commit.6da8b019.js')) { - this._view.languageSelector.setAttribute('disabled', '') - this._view.languageSelector.value = 'Solidity' - this.compileTabLogic.setLanguage('Solidity') - } else { - this._view.languageSelector.removeAttribute('disabled') - } - } - - setVersionText (text) { - if (this._view.version) this._view.version.innerText = text - } - - // fetching both normal and wasm builds and creating a [version, baseUrl] map - async fetchAllVersion (callback) { - let selectedVersion, allVersionsWasm, isURL - let allVersions = [{ path: 'builtin', longVersion: 'Stable local version - 0.8.4' }] - // fetch normal builds - const binRes = await promisedMiniXhr(`${baseURLBin}/list.json`) - // fetch wasm builds - const wasmRes = await promisedMiniXhr(`${baseURLWasm}/list.json`) - if (binRes.event.type === 'error' && wasmRes.event.type === 'error') { - selectedVersion = 'builtin' - return callback(allVersions, selectedVersion) - } - try { - const versions = JSON.parse(binRes.json).builds.slice().reverse() - allVersions = [...allVersions, ...versions] - selectedVersion = this.data.defaultVersion - if (this.queryParams.get().version) selectedVersion = this.queryParams.get().version - // Check if version is a URL and corresponding filename starts with 'soljson' - if (selectedVersion.startsWith('https://')) { - const urlArr = selectedVersion.split('/') - if (urlArr[urlArr.length - 1].startsWith('soljson')) isURL = true - } - if (wasmRes.event.type !== 'error') { - allVersionsWasm = JSON.parse(wasmRes.json).builds.slice().reverse() - } - } catch (e) { - addTooltip('Cannot load compiler version list. It might have been blocked by an advertisement blocker. Please try deactivating any of them from this page and reload. Error: ' + e) - } - // replace in allVersions those compiler builds which exist in allVersionsWasm with new once - if (allVersionsWasm && allVersions) { - allVersions.forEach((compiler, index) => { - const wasmIndex = allVersionsWasm.findIndex(wasmCompiler => { return wasmCompiler.longVersion === compiler.longVersion }) - if (wasmIndex !== -1) { - allVersions[index] = allVersionsWasm[wasmIndex] - pathToURL[compiler.path] = baseURLWasm - } else { - pathToURL[compiler.path] = baseURLBin - } - }) - } - callback(allVersions, selectedVersion, isURL) - } - - scheduleCompilation () { - if (!this.config.get('autoCompile')) return - if (this.data.compileTimeout) window.clearTimeout(this.data.compileTimeout) - this.data.compileTimeout = window.setTimeout(() => this.compileIfAutoCompileOn(), this.data.timeout) - } -} - -module.exports = CompilerContainer diff --git a/apps/remix-ide/src/app/tabs/compileTab/contractParser.js b/apps/remix-ide/src/app/tabs/compileTab/contractParser.js deleted file mode 100644 index cd603c859a..0000000000 --- a/apps/remix-ide/src/app/tabs/compileTab/contractParser.js +++ /dev/null @@ -1,122 +0,0 @@ -'use strict' - -var solcTranslate = require('solc/translate') -var remixLib = require('@remix-project/remix-lib') -var txHelper = remixLib.execution.txHelper - -module.exports = (contractName, contract, compiledSource) => { - return getDetails(contractName, contract, compiledSource) -} - -var getDetails = function (contractName, contract, source) { - var detail = {} - detail.name = contractName - detail.metadata = contract.metadata - if (contract.evm.bytecode.object) { - detail.bytecode = contract.evm.bytecode.object - } - - detail.abi = contract.abi - - if (contract.evm.bytecode.object) { - detail.bytecode = contract.evm.bytecode - detail.web3Deploy = gethDeploy(contractName.toLowerCase(), contract.abi, contract.evm.bytecode.object) - - detail.metadataHash = retrieveMetadataHash(contract.evm.bytecode.object) - if (detail.metadataHash) { - detail.swarmLocation = 'bzzr://' + detail.metadataHash - } - } - - detail.functionHashes = {} - for (var fun in contract.evm.methodIdentifiers) { - detail.functionHashes[contract.evm.methodIdentifiers[fun]] = fun - } - - detail.gasEstimates = formatGasEstimates(contract.evm.gasEstimates) - - detail.devdoc = contract.devdoc - detail.userdoc = contract.userdoc - - if (contract.evm.deployedBytecode && contract.evm.deployedBytecode.object.length > 0) { - detail['Runtime Bytecode'] = contract.evm.deployedBytecode - } - - if (source && contract.assembly !== null) { - detail.Assembly = solcTranslate.prettyPrintLegacyAssemblyJSON(contract.evm.legacyAssembly, source.content) - } - - return detail -} - -var retrieveMetadataHash = function (bytecode) { - var match = /a165627a7a72305820([0-9a-f]{64})0029$/.exec(bytecode) - if (!match) { - match = /a265627a7a72305820([0-9a-f]{64})6c6578706572696d656e74616cf50037$/.exec(bytecode) - } - if (match) { - return match[1] - } -} - -var gethDeploy = function (contractName, jsonInterface, bytecode) { - var code = '' - var funABI = txHelper.getConstructorInterface(jsonInterface) - - funABI.inputs.forEach(function (inp) { - code += 'var ' + inp.name + ' = /* var of type ' + inp.type + ' here */ ;\n' - }) - - contractName = contractName.replace(/[:./]/g, '_') - code += 'var ' + contractName + 'Contract = new web3.eth.Contract(' + JSON.stringify(jsonInterface).replace('\n', '') + ');' + - '\nvar ' + contractName + ' = ' + contractName + 'Contract.deploy({' + - "\n data: '0x" + bytecode + "', " + - '\n arguments: [' - - funABI.inputs.forEach(function (inp) { - code += '\n ' + inp.name + ',' - }) - - code += '\n ]' + - '\n}).send({' + - '\n from: web3.eth.accounts[0], ' + - "\n gas: '4700000'" + - '\n }, function (e, contract){' + - '\n console.log(e, contract);' + - "\n if (typeof contract.address !== 'undefined') {" + - "\n console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);" + - '\n }' + - '\n })' - - return code -} - -var formatGasEstimates = function (data) { - if (!data) return {} - if (data.creation === undefined && data.external === undefined && data.internal === undefined) return {} - - var gasToText = function (g) { - return g === null ? 'unknown' : g - } - - var ret = {} - var fun - if ('creation' in data) { - ret.Creation = data.creation - } - - if ('external' in data) { - ret.External = {} - for (fun in data.external) { - ret.External[fun] = gasToText(data.external[fun]) - } - } - - if ('internal' in data) { - ret.Internal = {} - for (fun in data.internal) { - ret.Internal[fun] = gasToText(data.internal[fun]) - } - } - return ret -} diff --git a/apps/remix-ide/src/app/tabs/hardhat-provider.js b/apps/remix-ide/src/app/tabs/hardhat-provider.js index 8152d61332..75c20a90cd 100644 --- a/apps/remix-ide/src/app/tabs/hardhat-provider.js +++ b/apps/remix-ide/src/app/tabs/hardhat-provider.js @@ -65,7 +65,7 @@ export default class HardhatProvider extends Plugin { if (error) { this.blocked = true modalDialogCustom.alert('Hardhat Provider', `Error while connecting to the hardhat provider: ${error.message}`) - await this.call('udapp', 'setEnvironmentMode', { context: 'vm', fork: 'berlin' }) + await this.call('udapp', 'setEnvironmentMode', { context: 'vm', fork: 'london' }) this.provider = null setTimeout(_ => { this.blocked = false }, 1000) // we wait 1 second for letting remix to switch to vm return reject(error) diff --git a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js index 0d3da9f1a2..8328e04bcb 100644 --- a/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js +++ b/apps/remix-ide/src/app/tabs/runTab/contractDropdown.js @@ -361,7 +361,7 @@ class ContractDropdownUI { return continueTxExecution(null) } const amount = this.blockchain.fromWei(tx.value, true, 'ether') - const content = confirmDialog(tx, amount, gasEstimation, null, this.blockchain.determineGasFees(tx), this.blockchain.determineGasPrice.bind(this.blockchain)) + const content = confirmDialog(tx, network, amount, gasEstimation, this.blockchain.determineGasFees(tx), this.blockchain.determineGasPrice.bind(this.blockchain)) modalDialog('Confirm transaction', content, { @@ -370,10 +370,9 @@ class ContractDropdownUI { this.blockchain.config.setUnpersistedProperty('doNotShowTransactionConfirmationAgain', content.querySelector('input#confirmsetting').checked) // TODO: check if this is check is still valid given the refactor if (!content.gasPriceStatus) { - cancelCb('Given gas price is not correct') + cancelCb('Given transaction fee is not correct') } else { - var gasPrice = this.blockchain.toWei(content.querySelector('#gasprice').value, 'gwei') - continueTxExecution(gasPrice) + continueTxExecution(content.txFee) } } }, { diff --git a/apps/remix-ide/src/app/tabs/runTab/recorder.js b/apps/remix-ide/src/app/tabs/runTab/recorder.js index 47f6ff440b..52d5367464 100644 --- a/apps/remix-ide/src/app/tabs/runTab/recorder.js +++ b/apps/remix-ide/src/app/tabs/runTab/recorder.js @@ -104,7 +104,7 @@ class RecorderUI extends Plugin { return continueTxExecution(null) } const amount = this.blockchain.fromWei(tx.value, true, 'ether') - const content = confirmDialog(tx, amount, gasEstimation, null, this.blockchain.determineGasFees(tx), this.blockchain.determineGasPrice.bind(this.blockchain)) + const content = confirmDialog(tx, network, amount, gasEstimation, this.blockchain.determineGasFees(tx), this.blockchain.determineGasPrice.bind(this.blockchain)) modalDialog('Confirm transaction', content, { @@ -113,10 +113,9 @@ class RecorderUI extends Plugin { this.config.setUnpersistedProperty('doNotShowTransactionConfirmationAgain', content.querySelector('input#confirmsetting').checked) // TODO: check if this is check is still valid given the refactor if (!content.gasPriceStatus) { - cancelCb('Given gas price is not correct') + cancelCb('Given transaction fee is not correct') } else { - var gasPrice = this.blockchain.toWei(content.querySelector('#gasprice').value, 'gwei') - continueTxExecution(gasPrice) + continueTxExecution(content.txFee) } } }, { diff --git a/apps/remix-ide/src/app/tabs/runTab/settings.js b/apps/remix-ide/src/app/tabs/runTab/settings.js index f99a2bc461..d71ca500f7 100644 --- a/apps/remix-ide/src/app/tabs/runTab/settings.js +++ b/apps/remix-ide/src/app/tabs/runTab/settings.js @@ -98,14 +98,14 @@ class SettingsUI {
+ Gwei +
+
+
+
+ Max fee (Not less than base fee ${Web3.utils.fromWei(Web3.utils.toBN(parseInt(network.lastBlock.baseFeePerGas, 16)), 'Gwei')} Gwei): + + Gwei + +
+
` + : yo`
+ Gas price: + + Gwei (visit ethgasstation.info for current gas price info.) +
` + } +
Max transaction fee: - -
-
- Gas price: - - Gwei (visit ethgasstation.info for current gas price info.) -
-
- Data: -
${tx.data && tx.data.length > 50 ? tx.data.substring(0, 49) + '...' : tx.data} ${copyToClipboard(() => { return tx.data })}
+
@@ -74,10 +120,14 @@ function confirmDialog (tx, amount, gasEstimation, self, newGasPriceCb, initialP if (txFeeText) { el.querySelector('#txfee').innerHTML = txFeeText } - if (gasPriceValue) { + if (el.querySelector('#gasprice') && gasPriceValue) { el.querySelector('#gasprice').value = gasPriceValue onGasPriceChange() } + if (el.querySelector('#maxfee') && network && network.lastBlock && network.lastBlock.baseFeePerGas) { + el.querySelector('#maxfee').value = Web3.utils.fromWei(Web3.utils.toBN(parseInt(network.lastBlock.baseFeePerGas, 16)), 'Gwei') + onMaxFeeChange() + } if (gasPriceStatus !== undefined) { el.gasPriceStatus = gasPriceStatus } diff --git a/apps/remix-ide/src/app/ui/landing-page/landing-page.js b/apps/remix-ide/src/app/ui/landing-page/landing-page.js index 8652017b2a..60d762472f 100644 --- a/apps/remix-ide/src/app/ui/landing-page/landing-page.js +++ b/apps/remix-ide/src/app/ui/landing-page/landing-page.js @@ -1,7 +1,6 @@ import * as packageJson from '../../../../../../package.json' import { ViewPlugin } from '@remixproject/engine-web' import { migrateToWorkspace } from '../../../migrateFileSystem' -import { CompilerImports } from '@remix-project/core-plugin' import JSZip from 'jszip' const yo = require('yo-yo') @@ -119,11 +118,12 @@ const profile = { } export class LandingPage extends ViewPlugin { - constructor (appManager, verticalIcons, fileManager, filePanel) { + constructor (appManager, verticalIcons, fileManager, filePanel, contentImport) { super(profile) this.profile = profile this.fileManager = fileManager this.filePanel = filePanel + this.contentImport = contentImport this.appManager = appManager this.verticalIcons = verticalIcons this.gistHandler = new GistHandler() @@ -216,7 +216,7 @@ export class LandingPage extends ViewPlugin { const invertNum = (themeQuality === 'dark') ? 1 : 0 if (this.solEnv.getElementsByTagName('img')[0]) this.solEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` - if (this.debuggerEnv.getElementsByTagName('img')[0]) this.debuggerEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + if (this.optimismEnv.getElementsByTagName('img')[0]) this.optimismEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` if (this.solhintEnv.getElementsByTagName('img')[0]) this.solhintEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` if (this.learnEthEnv.getElementsByTagName('img')[0]) this.learnEthEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` if (this.sourcifyEnv.getElementsByTagName('img')[0]) this.sourcifyEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` @@ -240,7 +240,7 @@ export class LandingPage extends ViewPlugin { render () { const load = (service, item, examples, info) => { - const compilerImport = new CompilerImports() + const contentImport = this.contentImport const fileProviders = globalRegistry.get('fileproviders').api const msg = yo`
@@ -252,7 +252,7 @@ export class LandingPage extends ViewPlugin { const title = `Import from ${service}` modalDialogCustom.prompt(title, msg, null, (target) => { if (target !== '') { - compilerImport.import( + contentImport.import( target, (loadingMsg) => { tooltip(loadingMsg) }, (error, content, cleanUrl, type, url) => { @@ -277,10 +277,10 @@ export class LandingPage extends ViewPlugin { this.verticalIcons.select('solidity') _paq.push(['trackEvent', 'pluginManager', 'userActivate', 'solidity']) } - const startDebugger = async () => { - await this.appManager.activatePlugin('debugger') - this.verticalIcons.select('debugger') - _paq.push(['trackEvent', 'pluginManager', 'userActivate', 'debugger']) + const startOptimism = async () => { + await this.appManager.activatePlugin('optimism-compiler') + this.verticalIcons.select('optimism-compiler') + _paq.push(['trackEvent', 'pluginManager', 'userActivate', 'optimism-compiler']) } const startSolhint = async () => { await this.appManager.activatePlugin(['solidity', 'solhint']) @@ -385,8 +385,8 @@ export class LandingPage extends ViewPlugin { // main this.solEnv = createLargeButton('assets/img/solidityLogo.webp', 'solidityLogo', 'Solidity', startSolidity) // Featured - this.debuggerEnv = createLargeButton('assets/img/debuggerLogo.webp', 'debuggerLogo', 'Debugger', startDebugger) - this.solhintEnv = createLargeButton('assets/img/solhintLogo.png', 'solhintLogo', 'solhint linter', startSolhint) + this.optimismEnv = createLargeButton('assets/img/optimismLogo.webp', 'optimismLogo', 'Optimism', startOptimism) + this.solhintEnv = createLargeButton('assets/img/solhintLogo.png', 'solhintLogo', 'Solhint linter', startSolhint) this.learnEthEnv = createLargeButton('assets/img/learnEthLogo.webp', 'learnEthLogo', 'LearnEth', startLearnEth) this.sourcifyEnv = createLargeButton('assets/img/sourcifyLogo.webp', 'sourcifyLogo', 'Sourcify', startSourceVerify) this.moreEnv = createLargeButton('assets/img/moreLogo.webp', 'moreLogo', 'More', startPluginManager) @@ -395,7 +395,7 @@ export class LandingPage extends ViewPlugin { const themeQuality = globalRegistry.get('themeModule').api.currentTheme().quality const invertNum = (themeQuality === 'dark') ? 1 : 0 this.solEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` - this.debuggerEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` + this.optimismEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` this.solhintEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` this.learnEthEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` this.sourcifyEnv.getElementsByTagName('img')[0].style.filter = `invert(${invertNum})` @@ -505,10 +505,10 @@ export class LandingPage extends ViewPlugin {

Featured Plugins

${this.solEnv} + ${this.optimismEnv} ${this.learnEthEnv} ${this.solhintEnv} - ${this.sourcifyEnv} - ${this.debuggerEnv} + ${this.sourcifyEnv} ${this.moreEnv}
diff --git a/apps/remix-ide/src/app/ui/sendTxCallbacks.js b/apps/remix-ide/src/app/ui/sendTxCallbacks.js index f2785482b2..3f5c7c7506 100644 --- a/apps/remix-ide/src/app/ui/sendTxCallbacks.js +++ b/apps/remix-ide/src/app/ui/sendTxCallbacks.js @@ -51,7 +51,7 @@ const confirmationCb = function (network, tx, gasEstimation, continueTxExecution return continueTxExecution(null) } var amount = Web3.utils.fromWei(typeConversion.toInt(tx.value), 'ether') - var content = confirmDialog(tx, amount, gasEstimation, self.udappUI, + var content = confirmDialog(tx, network, amount, gasEstimation, (gasPrice, cb) => { let txFeeText, priceStatus // TODO: this try catch feels like an anti pattern, can/should be @@ -93,10 +93,9 @@ const confirmationCb = function (network, tx, gasEstimation, continueTxExecution ) // TODO: check if this is check is still valid given the refactor if (!content.gasPriceStatus) { - cancelCb('Given gas price is not correct') + cancelCb('Given transaction fee is not correct') } else { - var gasPrice = Web3.utils.toWei(content.querySelector('#gasprice').value, 'gwei') - continueTxExecution(gasPrice) + continueTxExecution(content.txFee) } } }, diff --git a/apps/remix-ide/src/assets/img/optimismLogo.webp b/apps/remix-ide/src/assets/img/optimismLogo.webp new file mode 100644 index 0000000000..d7569da3f1 Binary files /dev/null and b/apps/remix-ide/src/assets/img/optimismLogo.webp differ diff --git a/apps/remix-ide/src/assets/js/editor/darkTheme.js b/apps/remix-ide/src/assets/js/editor/darkTheme.js index ace91156ed..f4059f60f7 100644 --- a/apps/remix-ide/src/assets/js/editor/darkTheme.js +++ b/apps/remix-ide/src/assets/js/editor/darkTheme.js @@ -30,7 +30,7 @@ ace.define("ace/theme/remixDark",["require","exports","module","ace/lib/dom"], f }\ .ace-remixDark {\ background-color: #222336;\ - color: #a2a3bd;\ + color: #d5d5e9;\ }\ .ace-remixDark .ace_cursor {\ border-left: 2px solid #FFFFFF;\ @@ -109,10 +109,10 @@ ace.define("ace/theme/remixDark",["require","exports","module","ace/lib/dom"], f }\ .ace-remixDark .ace_type {\ color:#75ceef;\ - }]\ - .ace-remixDark .ace_visibility (\ + }\ + .ace-remixDark .ace_visibility {\ color:#f7d777;\ - )\ + }\ .ace-remixDark .ace_identifier {\ color:#bec1dd;\ }\ diff --git a/apps/remix-ide/src/blockchain/execution-context.js b/apps/remix-ide/src/blockchain/execution-context.js index f29d0ec0d4..2623ab0dcf 100644 --- a/apps/remix-ide/src/blockchain/execution-context.js +++ b/apps/remix-ide/src/blockchain/execution-context.js @@ -20,9 +20,10 @@ export class ExecutionContext { constructor () { this.event = new EventManager() this.executionContext = null + this.lastBlock = null this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault - this.currentFork = 'berlin' + this.currentFork = 'london' this.mainNetGenesisHash = '0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3' this.customNetWorks = {} this.blocks = {} @@ -86,10 +87,10 @@ export class ExecutionContext { web3.eth.getBlock(0, (error, block) => { if (error) console.log('cant query first block') if (block && block.hash !== this.mainNetGenesisHash) name = 'Custom' - callback(err, { id, name }) + callback(err, { id, name, lastBlock: this.lastBlock, currentFork: this.currentFork }) }) } else { - callback(err, { id, name }) + callback(err, { id, name, lastBlock: this.lastBlock, currentFork: this.currentFork }) } }) } @@ -176,10 +177,11 @@ export class ExecutionContext { const block = await web3.eth.getBlock('latest') // we can't use the blockGasLimit cause the next blocks could have a lower limit : https://github.com/ethereum/remix/issues/506 this.blockGasLimit = (block && block.gasLimit) ? Math.floor(block.gasLimit - (5 * block.gasLimit) / 1024) : this.blockGasLimitDefault + this.lastBlock = block try { this.currentFork = execution.forkAt(await web3.eth.net.getId(), block.number) } catch (e) { - this.currentFork = 'berlin' + this.currentFork = 'london' console.log(`unable to detect fork, defaulting to ${this.currentFork}..`) console.error(e) } diff --git a/libs/remix-analyzer/package.json b/libs/remix-analyzer/package.json index 0cf6c4702e..c9b875ec1c 100644 --- a/libs/remix-analyzer/package.json +++ b/libs/remix-analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-analyzer", - "version": "0.5.12", + "version": "0.5.14", "description": "Tool to perform static analysis on Solidity smart contracts", "main": "index.js", "types": ".index.d.ts", @@ -19,14 +19,14 @@ } ], "dependencies": { - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", "@remix-project/remix-astwalker": "^0.0.26", - "@remix-project/remix-lib": "^0.5.3", + "@remix-project/remix-lib": "^0.5.5", "async": "^2.6.2", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "string-similarity": "^4.0.4", "web3": "1.2.4" }, @@ -51,5 +51,5 @@ "typescript": "^3.7.5" }, "typings": "index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-astwalker/package.json b/libs/remix-astwalker/package.json index 5642455132..6054263f6f 100644 --- a/libs/remix-astwalker/package.json +++ b/libs/remix-astwalker/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-astwalker", - "version": "0.0.33", + "version": "0.0.35", "description": "Tool to walk through Solidity AST", "main": "index.js", "scripts": { @@ -34,14 +34,14 @@ ] }, "dependencies": { - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", - "@remix-project/remix-lib": "^0.5.3", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", + "@remix-project/remix-lib": "^0.5.5", "@types/tape": "^4.2.33", "async": "^2.6.2", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "nyc": "^13.3.0", "string-similarity": "^4.0.4", "tape": "^4.10.1", @@ -53,5 +53,5 @@ "tap-spec": "^5.0.0" }, "typings": "index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts index ea4eae6958..edb512a7ed 100644 --- a/libs/remix-core-plugin/src/lib/compiler-content-imports.ts +++ b/libs/remix-core-plugin/src/lib/compiler-content-imports.ts @@ -21,9 +21,14 @@ export class CompilerImports extends Plugin { } async setToken () { - const protocol = typeof window !== 'undefined' && window.location.protocol - const token = await this.call('settings', 'get', 'settings/gist-access-token') - this.urlResolver.setGistToken(token, protocol) + try { + const protocol = typeof window !== 'undefined' && window.location.protocol + const token = await this.call('settings', 'get', 'settings/gist-access-token') + + this.urlResolver.setGistToken(token, protocol) + } catch (error) { + console.log(error) + } } isRelativeImport (url) { diff --git a/libs/remix-debug/package.json b/libs/remix-debug/package.json index 5a8a8bc22b..6691d37d1d 100644 --- a/libs/remix-debug/package.json +++ b/libs/remix-debug/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-debug", - "version": "0.5.3", + "version": "0.5.5", "description": "Tool to debug Ethereum transactions", "contributors": [ { @@ -18,17 +18,17 @@ ], "main": "src/index.js", "dependencies": { - "@ethereumjs/block": "^3.3.0", + "@ethereumjs/block": "^3.4.0", "@ethereumjs/common": "^2.2.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", "@remix-project/remix-astwalker": "^0.0.26", - "@remix-project/remix-lib": "^0.5.3", + "@remix-project/remix-lib": "^0.5.5", "async": "^2.6.2", "commander": "^2.19.0", "deep-equal": "^1.0.1", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "string-similarity": "^4.0.4", "web3": "^1.2.4" }, @@ -61,5 +61,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme", "typings": "src/index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-debug/src/code/codeUtils.ts b/libs/remix-debug/src/code/codeUtils.ts index b44dd2be61..da777d4b71 100644 --- a/libs/remix-debug/src/code/codeUtils.ts +++ b/libs/remix-debug/src/code/codeUtils.ts @@ -46,7 +46,7 @@ type Opcode = { * information about the opcode. */ export function parseCode (raw) { - const common = new Common({ chain: 'mainnet', hardfork: 'berlin' }) + const common = new Common({ chain: 'mainnet', hardfork: 'london' }) const opcodes = getOpcodesForHF(common) const code = [] diff --git a/libs/remix-debug/src/trace/traceManager.ts b/libs/remix-debug/src/trace/traceManager.ts index f4bf488392..49ba500889 100644 --- a/libs/remix-debug/src/trace/traceManager.ts +++ b/libs/remix-debug/src/trace/traceManager.ts @@ -40,7 +40,7 @@ export class TraceManager { const networkId = await this.web3.eth.net.getId() this.fork = execution.forkAt(networkId, tx.blockNumber) } catch (e) { - this.fork = 'berlin' + this.fork = 'london' console.log(`unable to detect fork, defaulting to ${this.fork}..`) console.error(e) } diff --git a/libs/remix-debug/test/decoder/vmCall.ts b/libs/remix-debug/test/decoder/vmCall.ts index 89417ac698..a0d2040e7c 100644 --- a/libs/remix-debug/test/decoder/vmCall.ts +++ b/libs/remix-debug/test/decoder/vmCall.ts @@ -11,7 +11,7 @@ export function sendTx (vm, from, to, value, data, cb?) { return new Promise ((resolve, reject) => { var tx = new Tx({ nonce: new BN(from.nonce++), - gasPrice: new BN(1), + // gasPrice: new BN(1), gasLimit: new BN(3000000, 10), to: to, value: new BN(value, 10), diff --git a/libs/remix-debug/test/vmCall.ts b/libs/remix-debug/test/vmCall.ts index b3cd6bccf1..a640c4d1b8 100644 --- a/libs/remix-debug/test/vmCall.ts +++ b/libs/remix-debug/test/vmCall.ts @@ -9,7 +9,7 @@ var remixLib = require('@remix-project/remix-lib') function sendTx (vm, from, to, value, data, cb) { var tx = new Tx({ nonce: new BN(from.nonce++), - gasPrice: new BN(1), + // gasPrice: new BN(1), gasLimit: new BN(3000000, 10), to: to, value: new BN(value, 10), diff --git a/libs/remix-lib/package.json b/libs/remix-lib/package.json index 61a31e7d3f..59a6770087 100644 --- a/libs/remix-lib/package.json +++ b/libs/remix-lib/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-lib", - "version": "0.5.3", + "version": "0.5.5", "description": "Library to various Remix tools", "contributors": [ { @@ -14,9 +14,9 @@ ], "main": "src/index.js", "dependencies": { - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", "async": "^2.1.2", "ethereumjs-util": "^7.0.10", "ethers": "^4.0.40", @@ -53,5 +53,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme", "typings": "src/index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-lib/src/execution/forkAt.ts b/libs/remix-lib/src/execution/forkAt.ts index 5c4316f868..c5f1a1e981 100644 --- a/libs/remix-lib/src/execution/forkAt.ts +++ b/libs/remix-lib/src/execution/forkAt.ts @@ -17,7 +17,7 @@ export function forkAt (networkId, blockNumber) { } return currentForkName } - return 'berlin' + return 'london' } // see https://github.com/ethereum/go-ethereum/blob/master/params/config.go @@ -46,6 +46,10 @@ const forks = { { number: 12244000, name: 'berlin' + }, + { + number: 12965000, + name: 'london' } ], 3: [ diff --git a/libs/remix-lib/src/execution/txRunnerVM.ts b/libs/remix-lib/src/execution/txRunnerVM.ts index ce079856fc..ac6e629b89 100644 --- a/libs/remix-lib/src/execution/txRunnerVM.ts +++ b/libs/remix-lib/src/execution/txRunnerVM.ts @@ -72,7 +72,7 @@ export class TxRunnerVM { } } - const EIP1559 = this.commonContext.hardfork() !== 'berlin' + const EIP1559 = this.commonContext.hardfork() !== 'berlin' // berlin is the only pre eip1559 fork that we handle. let tx if (!EIP1559) { tx = Transaction.fromTxData({ diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index b36aaffdcc..64500d01a3 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -15,8 +15,18 @@ export class TxRunnerWeb3 { this._api = api } - _executeTx (tx, gasPrice, api, promptCb, callback) { - if (gasPrice) tx.gasPrice = this.getWeb3().utils.toHex(gasPrice) + _executeTx (tx, txFee, api, promptCb, callback) { + if (txFee) { + if (txFee.baseFeePerGas) { + tx.maxPriorityFee = this.getWeb3().utils.toHex(this.getWeb3().utils.toWei(txFee.maxPriorityFee, 'gwei')) + tx.maxFee = this.getWeb3().utils.toHex(this.getWeb3().utils.toWei(txFee.maxFee, 'gwei')) + tx.type = 2 + } else { + tx.gasPrice = this.getWeb3().utils.toHex(this.getWeb3().utils.toWei(txFee.gasPrice, 'gwei')) + tx.type = 1 + } + } + if (api.personalMode()) { promptCb( (value) => { @@ -100,8 +110,8 @@ export class TxRunnerWeb3 { return } - confirmCb(network, tx, tx['gas'], (gasPrice) => { - return this._executeTx(tx, gasPrice, this._api, promptCb, callback) + confirmCb(network, tx, tx['gas'], (txFee) => { + return this._executeTx(tx, txFee, this._api, promptCb, callback) }, (error) => { callback(error) }) diff --git a/libs/remix-simulator/package.json b/libs/remix-simulator/package.json index d0ab857b8c..5a99b8dd63 100644 --- a/libs/remix-simulator/package.json +++ b/libs/remix-simulator/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-simulator", - "version": "0.2.3", + "version": "0.2.5", "description": "Ethereum IDE and tools for the web", "contributors": [ { @@ -14,11 +14,11 @@ ], "main": "src/index.js", "dependencies": { - "@ethereumjs/block": "^3.3.0", + "@ethereumjs/block": "^3.4.0", "@ethereumjs/common": "^2.2.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", - "@remix-project/remix-lib": "^0.5.3", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", + "@remix-project/remix-lib": "^0.5.5", "ansi-gray": "^0.1.1", "async": "^3.1.0", "body-parser": "^1.18.2", @@ -26,7 +26,7 @@ "commander": "^2.19.0", "cors": "^2.8.5", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "express": "^4.16.3", "express-ws": "^4.0.0", "merge": "^1.2.0", @@ -66,5 +66,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme", "typings": "src/index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-simulator/src/vm-context.ts b/libs/remix-simulator/src/vm-context.ts index 363e9ab50e..b9cb6a4151 100644 --- a/libs/remix-simulator/src/vm-context.ts +++ b/libs/remix-simulator/src/vm-context.ts @@ -99,7 +99,7 @@ export class VMContext { constructor (fork?) { this.blockGasLimitDefault = 4300000 this.blockGasLimit = this.blockGasLimitDefault - this.currentFork = fork || 'berlin' + this.currentFork = fork || 'london' this.currentVm = this.createVm(this.currentFork) this.blocks = {} this.latestBlockNumber = 0 diff --git a/libs/remix-solidity/package.json b/libs/remix-solidity/package.json index e338edf16c..a3974fd364 100644 --- a/libs/remix-solidity/package.json +++ b/libs/remix-solidity/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-solidity", - "version": "0.4.3", + "version": "0.4.5", "description": "Tool to load and run Solidity compiler", "main": "index.js", "types": "./index.d.ts", @@ -15,14 +15,14 @@ } ], "dependencies": { - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", - "@remix-project/remix-lib": "^0.5.3", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", + "@remix-project/remix-lib": "^0.5.5", "async": "^2.6.2", "eslint-scope": "^5.0.0", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "solc": "^0.7.4", "string-similarity": "^4.0.4", "web3": "1.2.4", @@ -59,5 +59,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme", "typings": "index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-tests/package.json b/libs/remix-tests/package.json index f8c5c5184b..b07486c5ad 100644 --- a/libs/remix-tests/package.json +++ b/libs/remix-tests/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-tests", - "version": "0.2.3", + "version": "0.2.5", "description": "Tool to test Solidity smart contracts", "main": "src/index.js", "types": "./src/index.d.ts", @@ -35,13 +35,13 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-tests#readme", "dependencies": { - "@ethereumjs/block": "^3.3.0", + "@ethereumjs/block": "^3.4.0", "@ethereumjs/common": "^2.2.0", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", - "@remix-project/remix-lib": "^0.5.3", - "@remix-project/remix-simulator": "^0.2.3", - "@remix-project/remix-solidity": "^0.4.3", + "@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", "ansi-gray": "^0.1.1", "async": "^2.6.0", "axios": ">=0.21.1", @@ -50,7 +50,7 @@ "colors": "^1.1.2", "commander": "^2.13.0", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "express-ws": "^4.0.0", "merge": "^1.2.0", "signale": "^1.4.0", @@ -77,5 +77,5 @@ "typescript": "^3.3.1" }, "typings": "src/index.d.ts", - "gitHead": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx index cea2b0d7a1..a892831d99 100644 --- a/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx +++ b/libs/remix-ui/clipboard/src/lib/copy-to-clipboard/copy-to-clipboard.tsx @@ -40,6 +40,7 @@ export const CopyToClipboard = (props: ICopyToClipboard) => { } return ( + // eslint-disable-next-line jsx-a11y/anchor-is-valid diff --git a/libs/remix-ui/file-explorer/src/lib/file-explorer-context-menu.tsx b/libs/remix-ui/file-explorer/src/lib/file-explorer-context-menu.tsx index a8a31fd6c8..3d85829294 100644 --- a/libs/remix-ui/file-explorer/src/lib/file-explorer-context-menu.tsx +++ b/libs/remix-ui/file-explorer/src/lib/file-explorer-context-menu.tsx @@ -4,6 +4,13 @@ import { action, FileExplorerContextMenuProps } from './types' import './css/file-explorer-context-menu.css' import { customAction } from '@remixproject/plugin-api/lib/file-system/file-panel' +declare global { + interface Window { + _paq: any + } +} +const _paq = window._paq = window._paq || [] //eslint-disable-line + export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => { const { actions, createNewFile, createNewFolder, deletePath, renamePath, hideContextMenu, pushChangesToGist, publishFileToGist, publishFolderToGist, copy, paste, runScript, emit, pageX, pageY, path, type, focus, ...otherProps } = props const contextMenuRef = useRef(null) @@ -76,15 +83,19 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => deletePath(getPath()) break case 'Push changes to gist': + _paq.push(['trackEvent', 'fileExplorer', 'pushToChangesoGist']) pushChangesToGist(path, type) break case 'Publish folder to gist': + _paq.push(['trackEvent', 'fileExplorer', 'publishFolderToGist']) publishFolderToGist(path, type) break case 'Publish file to gist': + _paq.push(['trackEvent', 'fileExplorer', 'publishFileToGist']) publishFileToGist(path, type) break case 'Run': + _paq.push(['trackEvent', 'fileExplorer', 'runScript']) runScript(path) break case 'Copy': @@ -97,6 +108,7 @@ export const FileExplorerContextMenu = (props: FileExplorerContextMenuProps) => deletePath(getPath()) break default: + _paq.push(['trackEvent', 'fileExplorer', 'customAction', item.name]) emit && emit({ ...item, path: [path] } as customAction) break } diff --git a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx index ec016068e9..6a764a85e2 100644 --- a/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx +++ b/libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx @@ -16,6 +16,24 @@ export const ModalDialog = (props: ModalDialogProps) => { modal.current.focus() }, [props.hide]) + useEffect(() => { + function handleBlur (e) { + if (!e.currentTarget.contains(e.relatedTarget)) { + e.stopPropagation() + if (document.activeElement !== this) { + handleHide() + } + } + } + if (modal.current) { + modal.current.addEventListener('blur', handleBlur) + + return () => { + modal.current.removeEventListener('blur', handleBlur) + } + } + }, [modal.current]) + const modalKeyEvent = (keyCode) => { if (keyCode === 27) { // Esc if (props.cancelFn) props.cancelFn() @@ -40,13 +58,6 @@ export const ModalDialog = (props: ModalDialogProps) => { handleHide() } - const handleBlur = (e) => { - if (!e.currentTarget.contains(e.relatedTarget)) { - e.stopPropagation() - handleHide() - } - } - return (
{ >
(dispatch: React.Disp }) compileTabLogic.compiler.event.register('loadingCompiler', () => { - dispatch(setCompilerMode('compilationDuration')) + dispatch(setCompilerMode('loadingCompiler')) }) compileTabLogic.compiler.event.register('compilerLoaded', () => { diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index 0d40bd011c..84059151ca 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -5,9 +5,18 @@ import * as helper from '../../../../../apps/remix-ide/src/lib/helper' import { canUseWorker, baseURLBin, baseURLWasm, urlFromVersion, pathToURL, promisedMiniXhr } from '@remix-project/remix-solidity' import { compilerReducer, compilerInitialState } from './reducers/compiler' import { resetEditorMode, listenToEvents } from './actions/compiler' +import { OverlayTrigger, Tooltip } from 'react-bootstrap' // eslint-disable-line import './css/style.css' +declare global { + interface Window { + _paq: any + } +} + +const _paq = window._paq = window._paq || [] //eslint-disable-line + export const CompilerContainer = (props: CompilerContainerProps) => { const { editor, config, queryParams, compileTabLogic, tooltip, modal, compiledFileName, setHardHatCompilation, updateCurrentVersion, isHardHatProject, configurationSettings } = props // eslint-disable-line const [state, setState] = useState({ @@ -27,8 +36,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => { language: '', evmVersion: '' }) + const [disableCompileButton, setDisableCompileButton] = useState(false) const compileIcon = useRef(null) - const warningIcon = useRef(null) const promptMessageInput = useRef(null) const [hhCompilation, sethhCompilation] = useState(false) const [compilerContainer, dispatch] = useReducer(compilerReducer, compilerInitialState) @@ -75,6 +84,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => { }, [compileTabLogic]) useEffect(() => { + const isDisabled = !compiledFileName || (compiledFileName && !isSolFileSelected(compiledFileName)) + + setDisableCompileButton(isDisabled) setState(prevState => { return { ...prevState, compiledFileName } }) @@ -235,14 +247,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => { } const compilationDuration = (speed: number) => { - if (!warningIcon.current) return if (speed > 1000) { - const msg = `Last compilation took ${speed}ms. We suggest to turn off autocompilation.` - - warningIcon.current.setAttribute('title', msg) - warningIcon.current.style.visibility = 'visible' - } else { - warningIcon.current.style.visibility = 'hidden' + console.log(`Last compilation took ${speed}ms. We suggest to turn off autocompilation.`) } } @@ -256,8 +262,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => { if (!compileIcon.current) return compileIcon.current.setAttribute('title', 'compiler is loading, please wait a few moments.') compileIcon.current.classList.add('remixui_spinningIcon') - warningIcon.current.style.visibility = 'hidden' _updateLanguageSelector() + setDisableCompileButton(true) } const compilerLoaded = () => { @@ -265,6 +271,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => { compileIcon.current.setAttribute('title', '') compileIcon.current.classList.remove('remixui_spinningIcon') if (state.autoCompile) compile() + const isDisabled = !compiledFileName || (compiledFileName && !isSolFileSelected(compiledFileName)) + + setDisableCompileButton(isDisabled) } const compilationFinished = () => { @@ -272,6 +281,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { compileIcon.current.setAttribute('title', 'idle') compileIcon.current.classList.remove('remixui_spinningIcon') compileIcon.current.classList.remove('remixui_bouncingIcon') + _paq.push(['trackEvent', 'compiler', 'compiled_with_version', _retrieveVersion()]) } const scheduleCompilation = () => { @@ -292,7 +302,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { if (!isSolFileSelected()) return _setCompilerVersionFromPragma(currentFile) - compileTabLogic.runCompiler() + compileTabLogic.runCompiler(hhCompilation) } const _retrieveVersion = (version?) => { @@ -440,6 +450,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { const handleNightliesChange = (e) => { const checked = e.target.checked + if (!checked) handleLoadVersion(state.defaultVersion) config.set('includeNightlies', checked) setState(prevState => { return { ...prevState, includeNightlies: checked } @@ -522,6 +533,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { + + + Learn how to use Hardhat Compilation + + }> + + +
} - diff --git a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx index 0d2d6bf486..e86689f94e 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx @@ -162,17 +162,25 @@ export const ContractSelection = (props: ContractSelectionProps) => { } const contractProperties = contractsDetails[selectedContract] || {} const log =
- { - Object.keys(contractProperties).map((propertyName, index) => { - const copyDetails = - const questionMark = - - return (
-
{ propertyName } { copyDetails } { questionMark }
- { insertValue(contractProperties, propertyName) } -
) - }) - } + + { + Object.keys(contractProperties).map((propertyName, index) => { + const copyDetails = + const questionMark = + + return ( +
+ { propertyName } { copyDetails } { questionMark }
+ }> + { insertValue(contractProperties, propertyName) } + +
+ ) + }) + } +
modal(selectedContract, log, 'Close', null) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-abstract.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-abstract.ts deleted file mode 100644 index f0c4fc3ad1..0000000000 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-abstract.ts +++ /dev/null @@ -1,51 +0,0 @@ -'use strict' -import * as remixLib from '@remix-project/remix-lib' - -const txHelper = remixLib.execution.txHelper - -export class CompilerAbstract { - public languageversion: string - public data: Record - public source: Record - - constructor (languageversion, data, source) { - this.languageversion = languageversion - this.data = data - this.source = source // source code - } - - getContracts () { - return this.data.contracts - } - - getContract (name) { - return txHelper.getContract(name, this.data.contracts) - } - - visitContracts (calllback) { - return txHelper.visitContracts(this.data.contracts, calllback) - } - - getData () { - return this.data - } - - getAsts () { - return this.data.sources // ast - } - - getSourceName (fileIndex) { - if (this.data && this.data.sources) { - return Object.keys(this.data.sources)[fileIndex] - } else if (Object.keys(this.source.sources).length === 1) { - // if we don't have ast, we return the only one filename present. - const sourcesArray = Object.keys(this.source.sources) - return sourcesArray[0] - } - return null - } - - getSourceCode () { - return this.source - } -} diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-helpers.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-helpers.ts deleted file mode 100644 index 64c56bd7a5..0000000000 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-helpers.ts +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' -import { canUseWorker, urlFromVersion } from './compiler-utils' -import { Compiler } from '@remix-project/remix-solidity' -import { CompilerAbstract } from './compiler-abstract' - -export const compile = async (compilationTargets, settings, contentResolverCallback) => { - return new Promise((resolve) => { - const compiler = new Compiler(contentResolverCallback) - compiler.set('evmVersion', settings.evmVersion) - compiler.set('optimize', settings.optimize) - compiler.set('language', settings.language) - compiler.set('runs', settings.runs) - compiler.loadVersion(canUseWorker(settings.version), urlFromVersion(settings.version)) - compiler.event.register('compilationFinished', (success, compilationData, source) => { - resolve(new CompilerAbstract(settings.version, compilationData, source)) - }) - compiler.event.register('compilerLoaded', () => compiler.compile(compilationTargets, '')) - }) -} diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-utils.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-utils.ts deleted file mode 100644 index fe26765ac1..0000000000 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compiler-utils.ts +++ /dev/null @@ -1,46 +0,0 @@ -const semver = require('semver') -const minixhr = require('minixhr') -/* global Worker */ - -export const baseURLBin = 'https://binaries.soliditylang.org/bin' -export const baseURLWasm = 'https://binaries.soliditylang.org/wasm' - -export const pathToURL = {} - -/** - * Retrieves the URL of the given compiler version - * @param version is the version of compiler with or without 'soljson-v' prefix and .js postfix - */ -export function urlFromVersion (version) { - if (!version.startsWith('soljson-v')) version = 'soljson-v' + version - if (!version.endsWith('.js')) version = version + '.js' - return `${pathToURL[version]}/${version}` -} - -/** - * Checks if the worker can be used to load a compiler. - * checks a compiler whitelist, browser support and OS. - */ -export function canUseWorker (selectedVersion) { - const version = semver.coerce(selectedVersion) - const isNightly = selectedVersion.includes('nightly') - return browserSupportWorker() && ( - // All compiler versions (including nightlies) after 0.6.3 are wasm compiled - semver.gt(version, '0.6.3') || - // Only releases are wasm compiled starting with 0.3.6 - (semver.gte(version, '0.3.6') && !isNightly) - ) -} - -function browserSupportWorker () { - return document.location.protocol !== 'file:' && Worker !== undefined -} - -// returns a promise for minixhr -export function promisedMiniXhr (url) { - return new Promise((resolve) => { - minixhr(url, (json, event) => { - resolve({ json, event }) - }) - }) -} diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/index.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/index.ts index b67d648896..e2c8f6d006 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/index.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/index.ts @@ -1,5 +1,2 @@ export * from './compileTabLogic' -export * from './compiler-abstract' -export * from './compiler-helpers' -export * from './compiler-utils' export * from './contract-parser' diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 4434db6c26..e21fd83f97 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -7,6 +7,7 @@ import { RemixUiCheckbox } from '@remix-ui/checkbox' // eslint-disable-line import ErrorRenderer from './ErrorRenderer' // eslint-disable-line import { compilation } from './actions/staticAnalysisActions' import { initialState, analysisReducer } from './reducers/staticAnalysisReducer' +import { OverlayTrigger, Tooltip } from 'react-bootstrap'// eslint-disable-line const StaticAnalysisRunner = require('@remix-project/remix-analyzer').CodeAnalysis const utils = remixLib.util @@ -56,7 +57,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } const [autoRun, setAutoRun] = useState(true) const [slitherEnabled, setSlitherEnabled] = useState(false) - const [showSlither, setShowSlither] = useState('hidden') + const [showSlither, setShowSlither] = useState(false) const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules)) const warningContainer = React.useRef(null) @@ -88,7 +89,24 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { // Reset state dispatch({ type: '', payload: {} }) // Show 'Enable Slither Analysis' checkbox - if (currentWorkspace && currentWorkspace.isLocalhost === true) setShowSlither('visible') + if (currentWorkspace && currentWorkspace.isLocalhost === true) setShowSlither(true) + else { + setShowSlither(false) + setSlitherEnabled(false) + } + }) + props.analysisModule.on('manager', 'pluginDeactivated', (plugin) => { + // Hide 'Enable Slither Analysis' checkbox + if (plugin.name === 'remixd') { + // Reset warning state + setWarningState([]) + // Reset badge + props.event.trigger('staticAnaysisWarning', []) + // Reset state + dispatch({ type: '', payload: {} }) + setShowSlither(false) + setSlitherEnabled(false) + } }) return () => { } }, [props]) @@ -245,8 +263,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { showWarnings(warningMessage, 'warningModuleName') props.event.trigger('staticAnaysisWarning', [warningCount]) } - }).catch((error) => { - console.log('Error found:', error) // This should be removed once testing done + }).catch(() => { props.analysisModule.call('terminal', 'log', { type: 'error', value: '[Slither Analysis]: Error occured! See remixd console for details.' }) showWarnings(warningMessage, 'warningModuleName') }) @@ -398,17 +415,28 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { />
-
- {}} - visibility = {showSlither} - /> -
+ { showSlither && + + }
{Object.keys(groupedModules).map((categoryId, i) => { diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css index 890460b43c..24e9fc6400 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css @@ -354,3 +354,4 @@ input #terminalCliInput { .debug:hover { opacity: 0.8; } + diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 94c45e2b90..32a23f19e5 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -639,6 +639,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { const txDetails = (event, tx, obj) => { if (showTableDetails === null) { setShowTableDetails(true) + console.log({tx: tx.hash}) } else { setShowTableDetails(null) } diff --git a/libs/remix-url-resolver/package.json b/libs/remix-url-resolver/package.json index 7a6c7baeca..a9b6770890 100644 --- a/libs/remix-url-resolver/package.json +++ b/libs/remix-url-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remix-url-resolver", - "version": "0.0.24", + "version": "0.0.26", "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": "5e91f3010a7198f1b2d90cc7796bda750c58f1ea" + "gitHead": "df7abe1c219e361a947031d620f4ae6e3786a4d7" } \ No newline at end of file diff --git a/libs/remixd/package.json b/libs/remixd/package.json index 064fce325a..6f9123c651 100644 --- a/libs/remixd/package.json +++ b/libs/remixd/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remixd", - "version": "0.4.2", + "version": "0.5.0", "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", diff --git a/libs/remixd/src/services/slitherClient.ts b/libs/remixd/src/services/slitherClient.ts index e2d9a281bb..a0808d281f 100644 --- a/libs/remixd/src/services/slitherClient.ts +++ b/libs/remixd/src/services/slitherClient.ts @@ -120,9 +120,9 @@ export class SlitherClient extends PluginClient { allowPaths = allowPathString remaps = remapString.trim() } - const allowPathsOption: string = allowPaths ? `--allow-paths ${allowPaths}` : '' - const optimizeOption: string = optimize ? ' --optimize ' : '' - const evmOption: string = evmVersion ? ` --evm-version ${evmVersion}` : '' + const allowPathsOption: string = allowPaths ? `--allow-paths ${allowPaths} ` : '' + const optimizeOption: string = optimize ? '--optimize ' : '' + const evmOption: string = evmVersion ? `--evm-version ${evmVersion}` : '' const solcArgs: string = optimizeOption || evmOption || allowPathsOption ? `--solc-args '${allowPathsOption}${optimizeOption}${evmOption}'` : '' const solcRemaps = remaps ? `--solc-remaps "${remaps}"` : '' diff --git a/package-lock.json b/package-lock.json index 83fc0b9385..2a3685ee9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.15.0-dev", + "version": "0.17.0-dev", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2559,32 +2559,73 @@ } }, "@ethereumjs/block": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.3.0.tgz", - "integrity": "sha512-WoefY9Rs4W8vZTxG9qwntAlV61xsSv0NPoXmHO7x3SH16dwJQtU15YvahPCz4HEEXbu7GgGgNgu0pv8JY7VauA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.4.0.tgz", + "integrity": "sha512-umKAoTX32yXzErpIksPHodFc/5y8bmZMnOl6hWy5Vd8xId4+HKFUOyEiN16Y97zMwFRysRpcrR6wBejfqc6Bmg==", "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.0", - "ethereumjs-util": "^7.0.10", + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", + "ethereumjs-util": "^7.1.0", "merkle-patricia-tree": "^4.2.0" + }, + "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + } } }, "@ethereumjs/blockchain": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.3.0.tgz", - "integrity": "sha512-B0Y5QDZcRDQISPilv3m8nzk97QmC98DnSE9WxzGpCxfef22Mw7xhwGipci5Iy0dVC2Np2Cr5d3F6bHAR7+yVmQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.4.0.tgz", + "integrity": "sha512-wAuKLaew6PL52kH8YPXO7PbjjKV12jivRSyHQehkESw4slSLLfYA6Jv7n5YxyT2ajD7KNMPVh7oyF/MU6HcOvg==", "requires": { - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/common": "^2.3.0", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/common": "^2.4.0", "@ethereumjs/ethash": "^1.0.0", "debug": "^2.2.0", - "ethereumjs-util": "^7.0.10", + "ethereumjs-util": "^7.1.0", "level-mem": "^5.0.1", "lru-cache": "^5.1.1", "rlp": "^2.2.4", "semaphore-async-await": "^1.5.1" }, "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2593,6 +2634,19 @@ "ms": "2.0.0" } }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -2601,12 +2655,40 @@ } }, "@ethereumjs/common": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.3.1.tgz", - "integrity": "sha512-V8hrULExoq0H4HFs3cCmdRGbgmipmlNzak6Xg34nHYfQyqkSdrCuflvYjyWmsNpI8GtrcZhzifAbgX/1C1Cjwg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", + "integrity": "sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w==", "requires": { "crc-32": "^1.2.0", - "ethereumjs-util": "^7.0.10" + "ethereumjs-util": "^7.1.0" + }, + "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + } } }, "@ethereumjs/ethash": { @@ -2631,27 +2713,55 @@ } }, "@ethereumjs/tx": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.2.1.tgz", - "integrity": "sha512-i9V39OtKvwWos1uVNZxdVhd7zFOyzFLjgt69CoiOY0EmXugS0HjO3uxpLBSglDKFMRriuGqw6ddKEv+RP1UNEw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.0.tgz", + "integrity": "sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA==", "requires": { - "@ethereumjs/common": "^2.3.1", - "ethereumjs-util": "^7.0.10" + "@ethereumjs/common": "^2.4.0", + "ethereumjs-util": "^7.1.0" + }, + "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + } } }, "@ethereumjs/vm": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.4.1.tgz", - "integrity": "sha512-cpQcg5CtjzXJBn8QNiobaiWckeN/ZQwsDHLYa9df2wBEUvzuEZgFWK48YEXSpx3CnUY9fNT/lgA9CzKdq8HTzQ==", - "requires": { - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/blockchain": "^5.3.0", - "@ethereumjs/common": "^2.3.1", - "@ethereumjs/tx": "^3.2.1", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.5.2.tgz", + "integrity": "sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg==", + "requires": { + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/blockchain": "^5.4.0", + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", "async-eventemitter": "^0.2.4", "core-js-pure": "^3.0.1", "debug": "^2.2.0", - "ethereumjs-util": "^7.0.10", + "ethereumjs-util": "^7.1.0", "functional-red-black-tree": "^1.0.1", "mcl-wasm": "^0.7.1", "merkle-patricia-tree": "^4.2.0", @@ -2659,6 +2769,19 @@ "util.promisify": "^1.0.1" }, "dependencies": { + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2667,6 +2790,19 @@ "ms": "2.0.0" } }, + "ethereumjs-util": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", + "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "requires": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.4" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -2675,294 +2811,284 @@ } }, "@ethersproject/abi": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.1.2.tgz", - "integrity": "sha512-uMhoQVPX0UtfzTpekYQSEUcJGDgsJ25ifz+SV6PDETWaUFhcR8RNgb1QPTASP13inW8r6iy0/Xdq9D5hK2pNvA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.4.0.tgz", + "integrity": "sha512-9gU2H+/yK1j2eVMdzm6xvHSnMxk8waIHQGYCZg5uvAyH0rsAzxkModzBSpbAkAuhKFEovC2S9hM4nPuLym8IZw==", "requires": { - "@ethersproject/address": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/constants": "^5.1.0", - "@ethersproject/hash": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/strings": "^5.1.0" + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" } }, "@ethersproject/abstract-provider": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.1.0.tgz", - "integrity": "sha512-8dJUnT8VNvPwWhYIau4dwp7qe1g+KgdRm4XTWvjkI9gAT2zZa90WF5ApdZ3vl1r6NDmnn6vUVvyphClRZRteTQ==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz", + "integrity": "sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ==", "requires": { - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/networks": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/transactions": "^5.1.0", - "@ethersproject/web": "^5.1.0" + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0" } }, "@ethersproject/abstract-signer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.1.0.tgz", - "integrity": "sha512-qQDMkjGZSSJSKl6AnfTgmz9FSnzq3iEoEbHTYwjDlEAv+LNP7zd4ixCcVWlWyk+2siud856M5CRhAmPdupeN9w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz", + "integrity": "sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA==", "requires": { - "@ethersproject/abstract-provider": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0" + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0" } }, "@ethersproject/address": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.1.0.tgz", - "integrity": "sha512-rfWQR12eHn2cpstCFS4RF7oGjfbkZb0oqep+BfrT+gWEGWG2IowJvIsacPOvzyS1jhNF4MQ4BS59B04Mbovteg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.4.0.tgz", + "integrity": "sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==", "requires": { - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/rlp": "^5.1.0" + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/rlp": "^5.4.0" } }, "@ethersproject/base64": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.1.0.tgz", - "integrity": "sha512-npD1bLvK4Bcxz+m4EMkx+F8Rd7CnqS9DYnhNu0/GlQBXhWjvfoAZzk5HJ0f1qeyp8d+A86PTuzLOGOXf4/CN8g==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.4.0.tgz", + "integrity": "sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==", "requires": { - "@ethersproject/bytes": "^5.1.0" + "@ethersproject/bytes": "^5.4.0" } }, "@ethersproject/basex": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.1.0.tgz", - "integrity": "sha512-vBKr39bum7DDbOvkr1Sj19bRMEPA4FnST6Utt6xhDzI7o7L6QNkDn2yrCfP+hnvJGhZFKtLygWwqlTBZoBXYLg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.4.0.tgz", + "integrity": "sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/properties": "^5.1.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/properties": "^5.4.0" } }, "@ethersproject/bignumber": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.1.1.tgz", - "integrity": "sha512-AVz5iqz7+70RIqoQTznsdJ6DOVBYciNlvO+AlQmPTB6ofCvoihI9bQdr6wljsX+d5W7Yc4nyvQvP4JMzg0Agig==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.1.tgz", + "integrity": "sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "bn.js": "^4.4.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "bn.js": "^4.11.9" } }, "@ethersproject/bytes": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.1.0.tgz", - "integrity": "sha512-sGTxb+LVjFxJcJeUswAIK6ncgOrh3D8c192iEJd7mLr95V6du119rRfYT/b87WPkZ5I3gRBUYIYXtdgCWACe8g==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.4.0.tgz", + "integrity": "sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==", "requires": { - "@ethersproject/logger": "^5.1.0" + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/constants": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.1.0.tgz", - "integrity": "sha512-0/SuHrxc8R8k+JiLmJymxHJbojUDWBQqO+b+XFdwaP0jGzqC09YDy/CAlSZB6qHsBifY8X3I89HcK/oMqxRdBw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.4.0.tgz", + "integrity": "sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==", "requires": { - "@ethersproject/bignumber": "^5.1.0" + "@ethersproject/bignumber": "^5.4.0" } }, "@ethersproject/contracts": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.1.1.tgz", - "integrity": "sha512-6WwktLJ0DFWU8pDkgH4IGttQHhQN4SnwKFu9h+QYVe48VGWtbDu4W8/q/7QA1u/HWlWMrKxqawPiZUJj0UMvOw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.4.1.tgz", + "integrity": "sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==", "requires": { - "@ethersproject/abi": "^5.1.0", - "@ethersproject/abstract-provider": "^5.1.0", - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/address": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/constants": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/transactions": "^5.1.0" + "@ethersproject/abi": "^5.4.0", + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/transactions": "^5.4.0" } }, "@ethersproject/hash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.1.0.tgz", - "integrity": "sha512-fNwry20yLLPpnRRwm3fBL+2ksgO+KMadxM44WJmRIoTKzy4269+rbq9KFoe2LTqq2CXJM2CE70beGaNrpuqflQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.4.0.tgz", + "integrity": "sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==", "requires": { - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/address": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/strings": "^5.1.0" + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" } }, "@ethersproject/hdnode": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.1.0.tgz", - "integrity": "sha512-obIWdlujloExPHWJGmhJO/sETOOo7SEb6qemV4f8kyFoXg+cJK+Ta9SvBrj7hsUK85n3LZeZJZRjjM7oez3Clg==", - "requires": { - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/basex": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/pbkdf2": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/sha2": "^5.1.0", - "@ethersproject/signing-key": "^5.1.0", - "@ethersproject/strings": "^5.1.0", - "@ethersproject/transactions": "^5.1.0", - "@ethersproject/wordlists": "^5.1.0" + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.4.0.tgz", + "integrity": "sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/basex": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/pbkdf2": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/sha2": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0", + "@ethersproject/strings": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/wordlists": "^5.4.0" } }, "@ethersproject/json-wallets": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.1.0.tgz", - "integrity": "sha512-00n2iBy27w8zrGZSiU762UOVuzCQZxUZxopsZC47++js6xUFuI74DHcJ5K/2pddlF1YBskvmMuboEu1geK8mnA==", - "requires": { - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/address": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/hdnode": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/pbkdf2": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/random": "^5.1.0", - "@ethersproject/strings": "^5.1.0", - "@ethersproject/transactions": "^5.1.0", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz", + "integrity": "sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ==", + "requires": { + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/hdnode": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/pbkdf2": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/random": "^5.4.0", + "@ethersproject/strings": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", "aes-js": "3.0.0", "scrypt-js": "3.0.1" } }, "@ethersproject/keccak256": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.1.0.tgz", - "integrity": "sha512-vrTB1W6AEYoadww5c9UyVJ2YcSiyIUTNDRccZIgwTmFFoSHwBtcvG1hqy9RzJ1T0bMdATbM9Hfx2mJ6H0i7Hig==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.4.0.tgz", + "integrity": "sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==", "requires": { - "@ethersproject/bytes": "^5.1.0", + "@ethersproject/bytes": "^5.4.0", "js-sha3": "0.5.7" } }, "@ethersproject/logger": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.1.0.tgz", - "integrity": "sha512-wtUaD1lBX10HBXjjKV9VHCBnTdUaKQnQ2XSET1ezglqLdPdllNOIlLfhyCRqXm5xwcjExVI5ETokOYfjPtaAlw==" + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.0.tgz", + "integrity": "sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ==" }, "@ethersproject/networks": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.1.0.tgz", - "integrity": "sha512-A/NIrIED/G/IgU1XUukOA3WcFRxn2I4O5GxsYGA5nFlIi+UZWdGojs85I1VXkR1gX9eFnDXzjE6OtbgZHjFhIA==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.4.2.tgz", + "integrity": "sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw==", "requires": { - "@ethersproject/logger": "^5.1.0" + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/pbkdf2": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.1.0.tgz", - "integrity": "sha512-B8cUbHHTgs8OtgJIafrRcz/YPDobVd5Ru8gTnShOiM9EBuFpYHQpq3+8iQJ6pyczDu6HP/oc/njAsIBhwFZYew==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz", + "integrity": "sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/sha2": "^5.1.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/sha2": "^5.4.0" } }, "@ethersproject/properties": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.1.0.tgz", - "integrity": "sha512-519KKTwgmH42AQL3+GFV3SX6khYEfHsvI6v8HYejlkigSDuqttdgVygFTDsGlofNFchhDwuclrxQnD5B0YLNMg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.4.0.tgz", + "integrity": "sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A==", "requires": { - "@ethersproject/logger": "^5.1.0" + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/providers": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.1.2.tgz", - "integrity": "sha512-GqsS8rd+eyd4eNkcNgzZ4l9IRULBPUZa7JPnv22k4MHflMobUseyhfbVnmoN5bVNNkOxjV1IPTw9i0sV1hwdpg==", - "requires": { - "@ethersproject/abstract-provider": "^5.1.0", - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/address": "^5.1.0", - "@ethersproject/basex": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/constants": "^5.1.0", - "@ethersproject/hash": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/networks": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/random": "^5.1.0", - "@ethersproject/rlp": "^5.1.0", - "@ethersproject/sha2": "^5.1.0", - "@ethersproject/strings": "^5.1.0", - "@ethersproject/transactions": "^5.1.0", - "@ethersproject/web": "^5.1.0", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.4.3.tgz", + "integrity": "sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/basex": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/networks": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/random": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/sha2": "^5.4.0", + "@ethersproject/strings": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/web": "^5.4.0", "bech32": "1.1.4", - "ws": "7.2.3" + "ws": "7.4.6" }, "dependencies": { "ws": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.2.3.tgz", - "integrity": "sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ==" + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" } } }, "@ethersproject/random": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.1.0.tgz", - "integrity": "sha512-+uuczLQZ4+no9cP6TCoCktXx0u2YbNaRT7lRkSt12d8263e702f0u+4JnnRO8Qmv5nylWJebnqCHzyxP+6mLqw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.4.0.tgz", + "integrity": "sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/rlp": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.1.0.tgz", - "integrity": "sha512-vDTyHIwNPrecy55gKGZ47eJZhBm8LLBxihzi5ou+zrSvYTpkSTWRcKUlXFDFQVwfWB+P5PGyERAdiDEI76clxw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.4.0.tgz", + "integrity": "sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/sha2": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.1.0.tgz", - "integrity": "sha512-+fNSeZRstOpdRJpdGUkRONFCaiAqWkc91zXgg76Nlp5ndBQE25Kk5yK8gCPG1aGnCrbariiPr5j9DmrYH78JCA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.4.0.tgz", + "integrity": "sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "hash.js": "1.1.3" - }, - "dependencies": { - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - } + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "hash.js": "1.1.7" } }, "@ethersproject/signing-key": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.1.0.tgz", - "integrity": "sha512-tE5LFlbmdObG8bY04NpuwPWSRPgEswfxweAI1sH7TbP0ml1elNfqcq7ii/3AvIN05i5U0Pkm3Tf8bramt8MmLw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.4.0.tgz", + "integrity": "sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "bn.js": "^4.4.0", - "elliptic": "6.5.4" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.7" }, "dependencies": { "elliptic": { @@ -2982,97 +3108,97 @@ } }, "@ethersproject/solidity": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.1.0.tgz", - "integrity": "sha512-kPodsGyo9zg1g9XSXp1lGhFaezBAUUsAUB1Vf6OkppE5Wksg4Et+x3kG4m7J/uShDMP2upkJtHNsIBK2XkVpKQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.4.0.tgz", + "integrity": "sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ==", "requires": { - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/sha2": "^5.1.0", - "@ethersproject/strings": "^5.1.0" + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/sha2": "^5.4.0", + "@ethersproject/strings": "^5.4.0" } }, "@ethersproject/strings": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.1.0.tgz", - "integrity": "sha512-perBZy0RrmmL0ejiFGUOlBVjMsUceqLut3OBP3zP96LhiJWWbS8u1NqQVgN4/Gyrbziuda66DxiQocXhsvx+Sw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.4.0.tgz", + "integrity": "sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/constants": "^5.1.0", - "@ethersproject/logger": "^5.1.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/transactions": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.1.1.tgz", - "integrity": "sha512-Nwgbp09ttIVN0OoUBatCXaHxR7grWPHbozJN8v7AXDLrl6nnOIBEMDh+yJTnosSQlFhcyjfTGGN+Mx6R8HdvMw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.4.0.tgz", + "integrity": "sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==", "requires": { - "@ethersproject/address": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/constants": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/rlp": "^5.1.0", - "@ethersproject/signing-key": "^5.1.0" + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/rlp": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0" } }, "@ethersproject/units": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.1.0.tgz", - "integrity": "sha512-isvJrx6qG0nKWfxsGORNjmOq/nh175fStfvRTA2xEKrGqx8JNJY83fswu4GkILowfriEM/eYpretfJnfzi7YhA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.4.0.tgz", + "integrity": "sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg==", "requires": { - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/constants": "^5.1.0", - "@ethersproject/logger": "^5.1.0" + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/constants": "^5.4.0", + "@ethersproject/logger": "^5.4.0" } }, "@ethersproject/wallet": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.1.0.tgz", - "integrity": "sha512-ULmUtiYQLTUS+y3DgkLzRhFEK10zMwmjOthnjiZxee3Q/MVwr3rnmuAnXIUZrPjna6hvUPnyRIdW5XuF0Ld0YQ==", - "requires": { - "@ethersproject/abstract-provider": "^5.1.0", - "@ethersproject/abstract-signer": "^5.1.0", - "@ethersproject/address": "^5.1.0", - "@ethersproject/bignumber": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/hash": "^5.1.0", - "@ethersproject/hdnode": "^5.1.0", - "@ethersproject/json-wallets": "^5.1.0", - "@ethersproject/keccak256": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/random": "^5.1.0", - "@ethersproject/signing-key": "^5.1.0", - "@ethersproject/transactions": "^5.1.0", - "@ethersproject/wordlists": "^5.1.0" + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.4.0.tgz", + "integrity": "sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ==", + "requires": { + "@ethersproject/abstract-provider": "^5.4.0", + "@ethersproject/abstract-signer": "^5.4.0", + "@ethersproject/address": "^5.4.0", + "@ethersproject/bignumber": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/hdnode": "^5.4.0", + "@ethersproject/json-wallets": "^5.4.0", + "@ethersproject/keccak256": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/random": "^5.4.0", + "@ethersproject/signing-key": "^5.4.0", + "@ethersproject/transactions": "^5.4.0", + "@ethersproject/wordlists": "^5.4.0" } }, "@ethersproject/web": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.1.0.tgz", - "integrity": "sha512-LTeluWgTq04+RNqAkVhpydPcRZK/kKxD2Vy7PYGrAD27ABO9kTqTBKwiOuzTyAHKUQHfnvZbXmxBXJAGViSDcA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.4.0.tgz", + "integrity": "sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==", "requires": { - "@ethersproject/base64": "^5.1.0", - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/strings": "^5.1.0" + "@ethersproject/base64": "^5.4.0", + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" } }, "@ethersproject/wordlists": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.1.0.tgz", - "integrity": "sha512-NsUCi/TpBb+oTFvMSccUkJGtp5o/84eOyqp5q5aBeiNBSLkYyw21znRn9mAmxZgySpxgruVgKbaapnYPgvctPQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.4.0.tgz", + "integrity": "sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA==", "requires": { - "@ethersproject/bytes": "^5.1.0", - "@ethersproject/hash": "^5.1.0", - "@ethersproject/logger": "^5.1.0", - "@ethersproject/properties": "^5.1.0", - "@ethersproject/strings": "^5.1.0" + "@ethersproject/bytes": "^5.4.0", + "@ethersproject/hash": "^5.4.0", + "@ethersproject/logger": "^5.4.0", + "@ethersproject/properties": "^5.4.0", + "@ethersproject/strings": "^5.4.0" } }, "@evocateur/libnpmaccess": { @@ -7546,9 +7672,9 @@ "dev": true }, "@types/abstract-leveldown": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-5.0.1.tgz", - "integrity": "sha512-wYxU3kp5zItbxKmeRYCEplS2MW7DzyBnxPGj+GJVHZEUZiK/nn5Ei1sUFgURDh+X051+zsGe28iud3oHjrYWQQ==" + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz", + "integrity": "sha512-+jA1XXF3jsz+Z7FcuiNqgK53hTa/luglT2TyTpKPqoYbxVY+mCPF22Rm+q3KPBrMHJwNXFrTViHszBOfU4vftQ==" }, "@types/aria-query": { "version": "4.2.0", @@ -7728,12 +7854,18 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/level-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/level-errors/-/level-errors-3.0.0.tgz", + "integrity": "sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ==" + }, "@types/levelup": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.1.tgz", - "integrity": "sha512-n//PeTpbHLjMLTIgW5B/g06W/6iuTBHuvUka2nFL9APMSVMNe2r4enADfu3CIE9IyV9E+uquf9OEQQqrDeg24A==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.3.tgz", + "integrity": "sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA==", "requires": { "@types/abstract-leveldown": "*", + "@types/level-errors": "*", "@types/node": "*" } }, @@ -16206,40 +16338,40 @@ } }, "ethers": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.1.4.tgz", - "integrity": "sha512-EAPQ/fgGRu0PoR/VNFnHTMOtG/IZ0AItdW55C9T8ffmVu0rnyllZL404eBF66elJehOLz2kxnUrhXpE7TCpW7g==", - "requires": { - "@ethersproject/abi": "5.1.2", - "@ethersproject/abstract-provider": "5.1.0", - "@ethersproject/abstract-signer": "5.1.0", - "@ethersproject/address": "5.1.0", - "@ethersproject/base64": "5.1.0", - "@ethersproject/basex": "5.1.0", - "@ethersproject/bignumber": "5.1.1", - "@ethersproject/bytes": "5.1.0", - "@ethersproject/constants": "5.1.0", - "@ethersproject/contracts": "5.1.1", - "@ethersproject/hash": "5.1.0", - "@ethersproject/hdnode": "5.1.0", - "@ethersproject/json-wallets": "5.1.0", - "@ethersproject/keccak256": "5.1.0", - "@ethersproject/logger": "5.1.0", - "@ethersproject/networks": "5.1.0", - "@ethersproject/pbkdf2": "5.1.0", - "@ethersproject/properties": "5.1.0", - "@ethersproject/providers": "5.1.2", - "@ethersproject/random": "5.1.0", - "@ethersproject/rlp": "5.1.0", - "@ethersproject/sha2": "5.1.0", - "@ethersproject/signing-key": "5.1.0", - "@ethersproject/solidity": "5.1.0", - "@ethersproject/strings": "5.1.0", - "@ethersproject/transactions": "5.1.1", - "@ethersproject/units": "5.1.0", - "@ethersproject/wallet": "5.1.0", - "@ethersproject/web": "5.1.0", - "@ethersproject/wordlists": "5.1.0" + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.4.4.tgz", + "integrity": "sha512-zaTs8yaDjfb0Zyj8tT6a+/hEkC+kWAA350MWRp6yP5W7NdGcURRPMOpOU+6GtkfxV9wyJEShWesqhE/TjdqpMA==", + "requires": { + "@ethersproject/abi": "5.4.0", + "@ethersproject/abstract-provider": "5.4.1", + "@ethersproject/abstract-signer": "5.4.1", + "@ethersproject/address": "5.4.0", + "@ethersproject/base64": "5.4.0", + "@ethersproject/basex": "5.4.0", + "@ethersproject/bignumber": "5.4.1", + "@ethersproject/bytes": "5.4.0", + "@ethersproject/constants": "5.4.0", + "@ethersproject/contracts": "5.4.1", + "@ethersproject/hash": "5.4.0", + "@ethersproject/hdnode": "5.4.0", + "@ethersproject/json-wallets": "5.4.0", + "@ethersproject/keccak256": "5.4.0", + "@ethersproject/logger": "5.4.0", + "@ethersproject/networks": "5.4.2", + "@ethersproject/pbkdf2": "5.4.0", + "@ethersproject/properties": "5.4.0", + "@ethersproject/providers": "5.4.3", + "@ethersproject/random": "5.4.0", + "@ethersproject/rlp": "5.4.0", + "@ethersproject/sha2": "5.4.0", + "@ethersproject/signing-key": "5.4.0", + "@ethersproject/solidity": "5.4.0", + "@ethersproject/strings": "5.4.0", + "@ethersproject/transactions": "5.4.0", + "@ethersproject/units": "5.4.0", + "@ethersproject/wallet": "5.4.0", + "@ethersproject/web": "5.4.0", + "@ethersproject/wordlists": "5.4.0" } }, "ethjs-unit": { @@ -24818,9 +24950,19 @@ "dev": true }, "mcl-wasm": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.7.tgz", - "integrity": "sha512-jDGiCQA++5hX37gdH6RDZ3ZsA0raet7xyY/R5itj5cbcdf4Gvw+YyxWX/ZZ0Z2UPxJiw1ktRsCJZzpnqlQILdw==" + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.8.tgz", + "integrity": "sha512-qNHlYO6wuEtSoH5A8TcZfCEHtw8gGPqF6hLZpQn2SVd/Mck0ELIKOkmj072D98S9B9CI/jZybTUC96q1P2/ZDw==", + "requires": { + "typescript": "^4.3.4" + }, + "dependencies": { + "typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==" + } + } }, "md5.js": { "version": "1.3.5", diff --git a/package.json b/package.json index bb82c62830..511f75fffb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.15.0-dev", + "version": "0.17.0-dev", "license": "MIT", "description": "Ethereum Remix Monorepo", "keywords": [ @@ -130,10 +130,10 @@ }, "dependencies": { "@erebos/bzz-node": "^0.13.0", - "@ethereumjs/block": "^3.3.0", - "@ethereumjs/common": "^2.3.1", - "@ethereumjs/tx": "^3.2.1", - "@ethereumjs/vm": "^5.4.1", + "@ethereumjs/block": "^3.4.0", + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", + "@ethereumjs/vm": "^5.5.0", "@remixproject/engine": "^0.3.17", "@remixproject/engine-web": "^0.3.17", "@remixproject/plugin": "^0.3.17", @@ -153,7 +153,7 @@ "deep-equal": "^1.0.1", "document-register-element": "1.13.1", "ethereumjs-util": "^7.0.10", - "ethers": "^5.1.4", + "ethers": "^5.4.2", "express-ws": "^4.0.0", "file-saver": "^2.0.5", "form-data": "^4.0.0", diff --git a/release-process.md b/release-process.md index ceb1caccbc..67e100a5f8 100644 --- a/release-process.md +++ b/release-process.md @@ -1,13 +1,22 @@ # Release process This document includes: + - how to release the remixd - how to publish remix libs to NPM - how to update remix.ethereum.org - how to update remix-alpha.ethereum.org - how to update remix-beta.ethereum.org - how to release remix IDE +## RemixD release + - update new version number in remixd libs/remixd/package.json + - nx build remixd + - cd into ./dist/libs/remixd + - npm publish + - create bump PR to master. + ## Remix libs release +(remove dist and login to npm) - git fetch origin master - git checkout origin/master - git checkout -b bumpLibsVersion @@ -76,4 +85,4 @@ This is not strictly speaking a release. Updating the remix site is done through ## remix-alpha.ethereum.org update -remix-alpha.ethereum.org is automaticaly updated every time commits are pushed to master \ No newline at end of file +remix-alpha.ethereum.org is automaticaly updated every time commits are pushed to master