From a85743bca20393fda3f2b2e5f710e004a9ab801c Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 30 May 2022 15:39:36 +0200 Subject: [PATCH 01/71] save published file to FE --- .../publish-to-storage/src/lib/publish-to-storage.tsx | 4 ---- .../publish-to-storage/src/lib/publishOnSwarm.tsx | 9 +++++---- .../publish-to-storage/src/lib/publishToIPFS.tsx | 9 +++++---- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx index 78812ab83d..79d81b8537 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx @@ -29,8 +29,6 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const result = await publishToSwarm(contract, api) modal(`Published ${contract.name}'s Metadata`, publishMessage(result.uploaded)) - // triggered each time there's a new verified publish (means hash correspond) - api.writeFile('swarm/' + result.item.hash, result.item.content) } catch (err) { let parseError = err try { @@ -44,8 +42,6 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const result = await publishToIPFS(contract, api) modal(`Published ${contract.name}'s Metadata`, publishMessage(result.uploaded)) - // triggered each time there's a new verified publish (means hash correspond) - api.writeFile('ipfs/' + result.item.hash, result.item.content) } catch (err) { modal('IPFS Publish Failed', publishMessageFailed(storage, err)) } diff --git a/libs/remix-ui/publish-to-storage/src/lib/publishOnSwarm.tsx b/libs/remix-ui/publish-to-storage/src/lib/publishOnSwarm.tsx index 3f823c5070..af7e189940 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publishOnSwarm.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publishOnSwarm.tsx @@ -79,7 +79,7 @@ export const publishToSwarm = async (contract, api) => { // publish the list of sources in order, fail if any failed await Promise.all(sources.map(async (item) => { try { - const result = await swarmVerifiedPublish(beeNodes, postageStampId, item.content, item.hash) + const result = await swarmVerifiedPublish(beeNodes, postageStampId, item.content, item.hash, api) try { item.hash = result.url.match('bzz-raw://(.+)')[1] @@ -96,9 +96,9 @@ export const publishToSwarm = async (contract, api) => { } })) - const metadataContent = JSON.stringify(metadata) + const metadataContent = JSON.stringify(metadata, null, '\t') try { - const result = await swarmVerifiedPublish(beeNodes, postageStampId, metadataContent, '') + const result = await swarmVerifiedPublish(beeNodes, postageStampId, metadataContent, '', api) try { contract.metadataHash = result.url.match('bzz-raw://(.+)')[1] @@ -121,7 +121,7 @@ export const publishToSwarm = async (contract, api) => { return { uploaded, item } } -const swarmVerifiedPublish = async (beeNodes: Bee[], postageStampId: string, content, expectedHash): Promise> => { +const swarmVerifiedPublish = async (beeNodes: Bee[], postageStampId: string, content, expectedHash, api): Promise> => { try { const results = await uploadToBeeNodes(beeNodes, postageStampId, content) const hash = hashFromResults(results) @@ -129,6 +129,7 @@ const swarmVerifiedPublish = async (beeNodes: Bee[], postageStampId: string, con if (expectedHash && hash !== expectedHash) { return { message: 'hash mismatch between solidity bytecode and uploaded content.', url: 'bzz-raw://' + hash, hash } } else { + api.writeFile('swarm/' + hash, content) return { message: 'ok', url: 'bzz-raw://' + hash, hash } } } catch (error) { diff --git a/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx b/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx index 36f92ab9e8..e5721d5868 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx @@ -63,7 +63,7 @@ export const publishToIPFS = async (contract, api) => { // publish the list of sources in order, fail if any failed await Promise.all(sources.map(async (item) => { try { - const result = await ipfsVerifiedPublish(item.content, item.hash) + const result = await ipfsVerifiedPublish(item.content, item.hash, api) try { item.hash = result.url.match('dweb:/ipfs/(.+)')[1] @@ -76,10 +76,10 @@ export const publishToIPFS = async (contract, api) => { throw new Error(error) } })) - const metadataContent = JSON.stringify(metadata) + const metadataContent = JSON.stringify(metadata, null, '\t') try { - const result = await ipfsVerifiedPublish(metadataContent, '') + const result = await ipfsVerifiedPublish(metadataContent, '', api) try { contract.metadataHash = result.url.match('dweb:/ipfs/(.+)')[1] @@ -101,13 +101,14 @@ export const publishToIPFS = async (contract, api) => { return { uploaded, item } } -const ipfsVerifiedPublish = async (content, expectedHash) => { +const ipfsVerifiedPublish = async (content, expectedHash, api) => { try { const results = await severalGatewaysPush(content) if (expectedHash && results !== expectedHash) { return { message: 'hash mismatch between solidity bytecode and uploaded content.', url: 'dweb:/ipfs/' + results, hash: results } } else { + api.writeFile('ipfs/' + results, content) return { message: 'ok', url: 'dweb:/ipfs/' + results, hash: results } } } catch (error) { From 02fcb5770bed71817e76ec3e9ab0d4e498dadd4a Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 30 May 2022 15:57:11 +0200 Subject: [PATCH 02/71] add e2e --- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index e1a19ccabb..0cf32d9b56 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -30,6 +30,8 @@ module.exports = { }) }) .click('[data-id="publishToStorage-modal-footer-ok-react"]') + .openFile('ipfs/Qmd4XV9j79GPfv5cgVsg62vKzaLuf6igx7VSW2BKaUyF3w') + .openFile('ipfs/QmVyGTHJAPhVephhnBSEHpTga3Svxx7ifynGuxRjWuRCfM') }, /* Disableing the test untill refactoring and the new swarm usage From 04b099986f9ab77f3ffef1dd2579c3aca7e7a9f8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 30 May 2022 16:08:00 +0200 Subject: [PATCH 03/71] update label --- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 6 +++--- .../publish-to-storage/src/lib/publish-to-storage.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 0cf32d9b56..0aad522b38 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -25,7 +25,7 @@ module.exports = { const value = (result.value) browser.perform((done) => { - if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed') + if (value.indexOf('Metadata and sources of "ballot" were published successfully.') === -1) browser.assert.fail('ipfs deploy failed') done() }) }) @@ -43,7 +43,7 @@ module.exports = { const value = (result.value) browser.perform((done) => { - if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('swarm deploy failed') + if (value.indexOf('Metadata and sources of "ballot" were published successfully.') === -1) browser.assert.fail('swarm deploy failed') if (value.indexOf('bzz') === -1) browser.assert.fail('swarm deploy failed') done() }) @@ -67,7 +67,7 @@ module.exports = { .getText('[data-id="udappModalDialogModalBody-react"]', (result) => { const value = typeof result.value === 'string' ? result.value : null - if (value.indexOf('Metadata of "storage" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed') + if (value.indexOf('Metadata and sources of "storage" were published successfully.') === -1) browser.assert.fail('ipfs deploy failed') }) .modalFooterOKClick('udapp') }, diff --git a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx index 79d81b8537..fc922dbeeb 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx @@ -28,7 +28,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { try { const result = await publishToSwarm(contract, api) - modal(`Published ${contract.name}'s Metadata`, publishMessage(result.uploaded)) + modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded)) } catch (err) { let parseError = err try { @@ -41,7 +41,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { try { const result = await publishToIPFS(contract, api) - modal(`Published ${contract.name}'s Metadata`, publishMessage(result.uploaded)) + modal(`Published ${contract.name}'s Metadata and Sources`, publishMessage(result.uploaded)) } catch (err) { modal('IPFS Publish Failed', publishMessageFailed(storage, err)) } @@ -55,7 +55,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { }, [storage]) const publishMessage = (uploaded) => ( - Metadata of "{contract.name.toLowerCase()}" was published successfully.
+ Metadata and sources of "{contract.name.toLowerCase()}" were published successfully.
         
{ uploaded.map((value, index) =>
{ value.filename } :
{ value.output.url }
) } @@ -65,7 +65,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { ) const publishMessageFailed = (storage, err) => ( - Failed to publish metadata file to { storage }, please check the { storage } gateways is available.
+ Failed to publish metadata file and sources to { storage }, please check the { storage } gateways is available.
{err}
) From d8278fa9dc3c175db04166976b936db4f4557c41 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 31 May 2022 10:04:58 +0200 Subject: [PATCH 04/71] fix E2E --- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 0aad522b38..d571c7b5df 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -30,8 +30,8 @@ module.exports = { }) }) .click('[data-id="publishToStorage-modal-footer-ok-react"]') - .openFile('ipfs/Qmd4XV9j79GPfv5cgVsg62vKzaLuf6igx7VSW2BKaUyF3w') - .openFile('ipfs/QmVyGTHJAPhVephhnBSEHpTga3Svxx7ifynGuxRjWuRCfM') + .openFile('ipfs/QmSUodhSvoorFL5m5CNqve8YvmuBpjCq17NbTf4GUX8ydw') + .openFile('ipfs/QmXYUS1ueS22EqNVRaKuZa31EgHLjKZ8uTM8vWhQLxa3pw') }, /* Disableing the test untill refactoring and the new swarm usage From 6fd39fde70e432a4575cd705a0d3a94a3aae2f7e Mon Sep 17 00:00:00 2001 From: David Disu Date: Mon, 30 May 2022 14:38:46 +0100 Subject: [PATCH 05/71] Show toaster with same content. --- libs/remix-ui/toaster/src/lib/toaster.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/toaster/src/lib/toaster.tsx b/libs/remix-ui/toaster/src/lib/toaster.tsx index 571a0c4afa..22014d8f7f 100644 --- a/libs/remix-ui/toaster/src/lib/toaster.tsx +++ b/libs/remix-ui/toaster/src/lib/toaster.tsx @@ -49,7 +49,7 @@ export const Toaster = (props: ToasterProps) => { } }) } - }, [props.message]) + }, [props.message, state.message]) useEffect(() => { if (state.hiding) { From cb5f5e0064493a6bc8b608728dd9cee2ac8a97ca Mon Sep 17 00:00:00 2001 From: David Disu Date: Mon, 30 May 2022 14:59:04 +0100 Subject: [PATCH 06/71] Use JSX for toaster message --- apps/remix-ide/src/app/files/fileManager.ts | 4 ++-- libs/remix-ui/helper/src/lib/helper-components.tsx | 6 ++++++ libs/remix-ui/toaster/src/lib/toaster.tsx | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/files/fileManager.ts b/apps/remix-ide/src/app/files/fileManager.ts index aa02851c3e..e7ae4763df 100644 --- a/apps/remix-ide/src/app/files/fileManager.ts +++ b/apps/remix-ide/src/app/files/fileManager.ts @@ -4,7 +4,7 @@ import * as packageJson from '../../../../../package.json' import Registry from '../state/registry' import { EventEmitter } from 'events' import { RemixAppManager } from '../../../../../libs/remix-ui/plugin-manager/src/types' -import { fileChangedToastMsg, storageFullMessage } from '@remix-ui/helper' +import { fileChangedToastMsg, recursivePasteToastMsg, storageFullMessage } from '@remix-ui/helper' import helper from '../../lib/helper.js' /* @@ -275,7 +275,7 @@ class FileManager extends Plugin { const provider = this.fileProviderOf(src) if (provider.isSubDirectory(src, dest)) { - this.call('notification', 'toast', 'File(s) to paste is an ancestor of the destination folder') + this.call('notification', 'toast', recursivePasteToastMsg()) } else { await this.inDepthCopy(src, dest) } diff --git a/libs/remix-ui/helper/src/lib/helper-components.tsx b/libs/remix-ui/helper/src/lib/helper-components.tsx index e04e162ffc..c290f7bdf9 100644 --- a/libs/remix-ui/helper/src/lib/helper-components.tsx +++ b/libs/remix-ui/helper/src/lib/helper-components.tsx @@ -78,3 +78,9 @@ export const storageFullMessage = () => (
) + +export const recursivePasteToastMsg = () => ( +
+ File(s) to paste is an ancestor of the destination folder +
+) diff --git a/libs/remix-ui/toaster/src/lib/toaster.tsx b/libs/remix-ui/toaster/src/lib/toaster.tsx index 22014d8f7f..571a0c4afa 100644 --- a/libs/remix-ui/toaster/src/lib/toaster.tsx +++ b/libs/remix-ui/toaster/src/lib/toaster.tsx @@ -49,7 +49,7 @@ export const Toaster = (props: ToasterProps) => { } }) } - }, [props.message, state.message]) + }, [props.message]) useEffect(() => { if (state.hiding) { From 2fc5048bb484c18d0ff706d838a602ad24a1ca31 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 30 May 2022 15:50:44 +0200 Subject: [PATCH 07/71] do not compile if no sol files --- .../solidity-compiler/src/lib/logic/compileTabLogic.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index e84f73a76c..b9e926d4b5 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -131,6 +131,11 @@ export class CompileTabLogic { runCompiler (externalCompType) { try { + const currentFile = this.api.currentFile + if (currentFile && (currentFile.endsWith('.ts') || currentFile.endsWith('.js') || currentFile.endsWith('.txt') || currentFile.endsWith('.log'))) { + // these are obviously not solidity files. + return + } if (this.api.getFileManagerMode() === 'localhost') { if (externalCompType === 'hardhat') { const { currentVersion, optimize, runs } = this.compiler.state @@ -183,8 +188,7 @@ export class CompileTabLogic { } } // TODO readd saving current file - this.api.saveCurrentFile() - const currentFile = this.api.currentFile + this.api.saveCurrentFile() return this.compileFile(currentFile) } catch (err) { console.error(err) From c17871cadd286bb9a28f9a0124c4299ef1fdd9bd Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 30 May 2022 20:38:37 +0200 Subject: [PATCH 08/71] add imported ts files to monaco for autocompletion --- apps/remix-ide/src/app/editor/editor.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index 9bf7e3fec6..dade5f8015 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -1,5 +1,6 @@ 'use strict' import React from 'react' // eslint-disable-line +import { resolve } from 'path' import { EditorUI } from '@remix-ui/editor' // eslint-disable-line import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' @@ -150,6 +151,25 @@ class Editor extends Plugin { this.currentThemeType = theme.quality this.renderComponent() }) + this.on('fileManager', 'currentFileChanged', async (name) => { + if (name.endsWith('.ts')) { + // extract the import, resolve their content + // and add the imported files to Monaco through the `addModel` + // so Monaco can provide auto completion + let content = await this.call('fileManager', 'readFile', name) + const paths = name.split('/') + paths.pop() + const fromPath = paths.join('/') // get current execution context path + for (const match of content.matchAll(/import\s+.*\s+from\s+(?:"(.*?)"|'(.*?)')/g)) { + let path = match[2] + if (path.startsWith('./') || path.startsWith('../')) path = resolve(fromPath, path) + if (path.startsWith('/')) path = path.substring(1) + if (!path.endsWith('.ts')) path = path + '.ts' + content = await this.call('fileManager', 'readFile', path) + this.emit('addModel', content, 'typescript', path, false) + } + } + }) try { this.currentThemeType = (await this.call('theme', 'currentTheme')).quality } catch (e) { From 29a821b3b1654bf45428053c71e2569c57f7a175 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 31 May 2022 09:37:03 +0200 Subject: [PATCH 09/71] check if file exist --- apps/remix-ide/src/app/editor/editor.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index dade5f8015..076740cc73 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -165,8 +165,10 @@ class Editor extends Plugin { if (path.startsWith('./') || path.startsWith('../')) path = resolve(fromPath, path) if (path.startsWith('/')) path = path.substring(1) if (!path.endsWith('.ts')) path = path + '.ts' - content = await this.call('fileManager', 'readFile', path) - this.emit('addModel', content, 'typescript', path, false) + if (await this.call('fileManager', 'exists', path)) { + content = await this.call('fileManager', 'readFile', path) + this.emit('addModel', content, 'typescript', path, false) + } } } }) From 1fdbcf9ddaed10b187281ed647b42ec07bfc6038 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 31 May 2022 09:44:32 +0200 Subject: [PATCH 10/71] use shortkey only if sol file --- apps/solidity-compiler/src/app/compiler-api.ts | 8 +++++--- .../solidity-compiler/src/lib/logic/compileTabLogic.ts | 8 ++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index 8a5437359c..25dfb09925 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -332,9 +332,11 @@ export const CompilerApiMixin = (Base) => class extends Base { // ctrl+s or command+s if ((e.metaKey || e.ctrlKey) && !e.shiftKey && e.keyCode === 83 && this.currentFile !== '') { e.preventDefault() - if(await this.getAppParameter('hardhat-compilation')) this.compileTabLogic.runCompiler('hardhat') - else if(await this.getAppParameter('truffle-compilation')) this.compileTabLogic.runCompiler('truffle') - else this.compileTabLogic.runCompiler(undefined) + if (this.currentFile && (this.currentFile.endsWith('.sol') || this.currentFile.endsWith('.yul'))) { + if(await this.getAppParameter('hardhat-compilation')) this.compileTabLogic.runCompiler('hardhat') + else if(await this.getAppParameter('truffle-compilation')) this.compileTabLogic.runCompiler('truffle') + else this.compileTabLogic.runCompiler(undefined) + } } } window.document.addEventListener('keydown', this.data.eventHandlers.onKeyDown) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index b9e926d4b5..e84f73a76c 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -131,11 +131,6 @@ export class CompileTabLogic { runCompiler (externalCompType) { try { - const currentFile = this.api.currentFile - if (currentFile && (currentFile.endsWith('.ts') || currentFile.endsWith('.js') || currentFile.endsWith('.txt') || currentFile.endsWith('.log'))) { - // these are obviously not solidity files. - return - } if (this.api.getFileManagerMode() === 'localhost') { if (externalCompType === 'hardhat') { const { currentVersion, optimize, runs } = this.compiler.state @@ -188,7 +183,8 @@ export class CompileTabLogic { } } // TODO readd saving current file - this.api.saveCurrentFile() + this.api.saveCurrentFile() + const currentFile = this.api.currentFile return this.compileFile(currentFile) } catch (err) { console.error(err) From 2a6a0d1f4bc458e4c03551f5ee857655dd6e9b01 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 1 Jun 2022 11:27:02 +0200 Subject: [PATCH 11/71] fixed file in error --- apps/solidity-compiler/src/app/compiler-api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index 25dfb09925..fb8d848039 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -304,14 +304,15 @@ export const CompilerApiMixin = (Base) => class extends Base { if (data.errors) { for (const error of data.errors) { let pos = helper.getPositionDetails(error.formattedMessage) - if (pos.errFile) { + const file = pos.errFile + if (file) { pos = { row: pos.errLine, column: pos.errCol, text: error.formattedMessage, type: error.severity } - await this.call('editor', 'addAnnotation', pos, pos.errFile) + await this.call('editor', 'addAnnotation', pos, file) } } } From 61e13d9ca2c7b5231a8b9c410d00b1c5584c17fe Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 30 May 2022 19:54:49 +0530 Subject: [PATCH 12/71] select next tab --- apps/remix-ide/src/app/panels/tab-proxy.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/panels/tab-proxy.js b/apps/remix-ide/src/app/panels/tab-proxy.js index 645b30ecce..cbcd542642 100644 --- a/apps/remix-ide/src/app/panels/tab-proxy.js +++ b/apps/remix-ide/src/app/panels/tab-proxy.js @@ -283,7 +283,12 @@ export class TabProxy extends Plugin { delete this._handlers[name] let previous = currentFileTab this.loadedTabs = this.loadedTabs.filter((tab, index) => { - if (!previous && tab.name === name) previous = this.loadedTabs[index - 1] + if (!previous && tab.name === name) { + if(index - 1 && this.loadedTabs[index - 1]) + previous = this.loadedTabs[index - 1] + else if (index + 1 && this.loadedTabs[index + 1]) + previous = this.loadedTabs[index + 1] + } return tab.name !== name }) this.renderComponent() From 4580757195ceb693329b9c85c38f3a8a1262fffa Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Wed, 1 Jun 2022 14:47:24 +0530 Subject: [PATCH 13/71] fix events --- apps/remix-ide/src/app/editor/editor.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index 076740cc73..689850b88c 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -141,12 +141,6 @@ class Editor extends Plugin { this.on('sidePanel', 'pluginDisabled', (name) => { this.clearAllDecorationsFor(name) }) - this.on('fileManager', 'fileClosed', (name) => { - if (name === this.currentFile) { - this.currentFile = null - this.renderComponent() - } - }) this.on('theme', 'themeLoaded', (theme) => { this.currentThemeType = theme.quality this.renderComponent() @@ -171,6 +165,15 @@ class Editor extends Plugin { } } } + if (name === this.currentFile) { + this.currentFile = name + this.renderComponent() + } + }) + + this.on('fileManager', 'noFileSelected', async () => { + this.currentFile = null + this.renderComponent() }) try { this.currentThemeType = (await this.call('theme', 'currentTheme')).quality From 0b871d4604ce9d404a6cc2f05a87c1226f62be3e Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 1 Jun 2022 11:36:45 +0200 Subject: [PATCH 14/71] Update publishIpfs --- apps/remix-ide/ci/publishIpfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/ci/publishIpfs b/apps/remix-ide/ci/publishIpfs index 0f8fd96ca0..0f4b1a7fc8 100755 --- a/apps/remix-ide/ci/publishIpfs +++ b/apps/remix-ide/ci/publishIpfs @@ -5,8 +5,8 @@ const { globSource } = IpfsHttpClient const folder = process.cwd() + '/dist/apps/remix-ide'; (async () => { - const host = 'ipfs.remixproject.org' - const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' }) + const host = 'ipfs.infura.io' + const ipfs = IpfsHttpClient({ host, port: 5001, protocol: 'https' }) try { let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) const hash = result.cid.toString() From 38f99dcbc435503a70b8be3d025ee054304048a2 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Wed, 1 Jun 2022 16:59:11 +0530 Subject: [PATCH 15/71] show editor home on all files closing --- apps/remix-ide/src/app/panels/layout.ts | 3 --- apps/remix-ide/src/app/panels/tab-proxy.js | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/remix-ide/src/app/panels/layout.ts b/apps/remix-ide/src/app/panels/layout.ts index 33704eef35..37a0ee6fe4 100644 --- a/apps/remix-ide/src/app/panels/layout.ts +++ b/apps/remix-ide/src/app/panels/layout.ts @@ -57,9 +57,6 @@ export class Layout extends Plugin { this.panels.main.active = false this.event.emit('change', null) }) - this.on('tabs', 'tabCountChanged', async count => { - if (!count) await this.call('manager', 'activatePlugin', 'home') - }) this.on('manager', 'activate', (profile: Profile) => { switch (profile.name) { case 'filePanel': diff --git a/apps/remix-ide/src/app/panels/tab-proxy.js b/apps/remix-ide/src/app/panels/tab-proxy.js index cbcd542642..82758c169f 100644 --- a/apps/remix-ide/src/app/panels/tab-proxy.js +++ b/apps/remix-ide/src/app/panels/tab-proxy.js @@ -284,7 +284,7 @@ export class TabProxy extends Plugin { let previous = currentFileTab this.loadedTabs = this.loadedTabs.filter((tab, index) => { if (!previous && tab.name === name) { - if(index - 1 && this.loadedTabs[index - 1]) + if(index - 1 >= 0 && this.loadedTabs[index - 1]) previous = this.loadedTabs[index - 1] else if (index + 1 && this.loadedTabs[index + 1]) previous = this.loadedTabs[index + 1] From c6014f9770a18c9bde4c11d2e91a36fd7fdc05ec Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 2 Jun 2022 17:36:14 +0200 Subject: [PATCH 16/71] update github actions --- .github/workflows/publish-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-action.yml b/.github/workflows/publish-action.yml index 3fb3a3031f..0424a8585e 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -9,7 +9,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - run: yarn install + - run: yarn install --ignore-engines - run: ls - run: pwd - run: yarn run downloadsolc_assets From 5df6c0a9e8a1cee77fa454c019647a8e9782d062 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 10:04:10 +0200 Subject: [PATCH 17/71] fix publish action --- .github/workflows/publish-action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-action.yml b/.github/workflows/publish-action.yml index 0424a8585e..12e78cebe5 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -12,8 +12,8 @@ jobs: - run: yarn install --ignore-engines - run: ls - run: pwd - - run: yarn run downloadsolc_assets - - run: yarn run build:production + - run: yarn run downloadsolc_assets --ignore-engines + - run: yarn run build:production --ignore-engines - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs')" >> $GITHUB_ENV - uses: mshick/add-pr-comment@v1 with: From ada7da3a7194d0ed4eccecacfb5b93d689702c27 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 10:15:05 +0200 Subject: [PATCH 18/71] use specific version --- .github/workflows/publish-action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-action.yml b/.github/workflows/publish-action.yml index 12e78cebe5..e197f64b17 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -9,11 +9,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - run: yarn install --ignore-engines + - uses: actions/setup-node@v3 + with: + node-version: 14.17.6 + - run: yarn install - run: ls - run: pwd - - run: yarn run downloadsolc_assets --ignore-engines - - run: yarn run build:production --ignore-engines + - run: yarn run downloadsolc_assets + - run: yarn run build:production - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs')" >> $GITHUB_ENV - uses: mshick/add-pr-comment@v1 with: From ee7c3d2e292fa6c11e21dbc3844885120c45ff17 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 11:44:35 +0200 Subject: [PATCH 19/71] Update publishIpfs --- apps/remix-ide/ci/publishIpfs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/ci/publishIpfs b/apps/remix-ide/ci/publishIpfs index 0f4b1a7fc8..d2df6c47a2 100755 --- a/apps/remix-ide/ci/publishIpfs +++ b/apps/remix-ide/ci/publishIpfs @@ -6,7 +6,13 @@ const folder = process.cwd() + '/dist/apps/remix-ide'; (async () => { const host = 'ipfs.infura.io' - const ipfs = IpfsHttpClient({ host, port: 5001, protocol: 'https' }) + const projectId = secrets.IPFS_PROJECT_ID + const projectSecret = secrets.IPFS_PROJECT_SECRET + const auth = 'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64') + + const ipfs = IpfsHttpClient({ port: 5001, host, protocol: 'https', headers: { + authorization: auth + } }) try { let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) const hash = result.cid.toString() From bf6021062c24444de14d17f86e654925940ce14c Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 12:02:03 +0200 Subject: [PATCH 20/71] Update publishIpfs --- apps/remix-ide/ci/publishIpfs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/ci/publishIpfs b/apps/remix-ide/ci/publishIpfs index d2df6c47a2..15d2dc9b66 100755 --- a/apps/remix-ide/ci/publishIpfs +++ b/apps/remix-ide/ci/publishIpfs @@ -6,8 +6,8 @@ const folder = process.cwd() + '/dist/apps/remix-ide'; (async () => { const host = 'ipfs.infura.io' - const projectId = secrets.IPFS_PROJECT_ID - const projectSecret = secrets.IPFS_PROJECT_SECRET + const projectId = process.argv[2] + const projectSecret = process.argv[3] const auth = 'Basic ' + Buffer.from(projectId + ':' + projectSecret).toString('base64') const ipfs = IpfsHttpClient({ port: 5001, host, protocol: 'https', headers: { From 11e44b53ca446fab5bc5c9053c854b9828ef8a9e Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 12:03:12 +0200 Subject: [PATCH 21/71] Update publish-action.yml --- .github/workflows/publish-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-action.yml b/.github/workflows/publish-action.yml index e197f64b17..79344e5a30 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -17,7 +17,7 @@ jobs: - run: pwd - run: yarn run downloadsolc_assets - run: yarn run build:production - - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs')" >> $GITHUB_ENV + - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs ${{ secrets.IPFS_PROJET_ID }} ${{ secrets.IPFS_PROJECT_SECRET }}')" >> $GITHUB_ENV - uses: mshick/add-pr-comment@v1 with: message: | From e533ce86069239aa5ed175c963a53a94a2c7c6c3 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 12:15:57 +0200 Subject: [PATCH 22/71] Update publish-action.yml --- .github/workflows/publish-action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-action.yml b/.github/workflows/publish-action.yml index 79344e5a30..00aa313f61 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -17,7 +17,7 @@ jobs: - run: pwd - run: yarn run downloadsolc_assets - run: yarn run build:production - - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs ${{ secrets.IPFS_PROJET_ID }} ${{ secrets.IPFS_PROJECT_SECRET }}')" >> $GITHUB_ENV + - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs' ${{ secrets.IPFS_PROJET_ID }} ${{ secrets.IPFS_PROJECT_SECRET }})" >> $GITHUB_ENV - uses: mshick/add-pr-comment@v1 with: message: | From a464f9583ebb53700eaf7035bf3afd36e8612add Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 12:54:56 +0200 Subject: [PATCH 23/71] Update publish-action.yml --- .github/workflows/publish-action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-action.yml b/.github/workflows/publish-action.yml index 00aa313f61..9cf0674850 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -22,8 +22,7 @@ jobs: with: message: | ipfs://${{ env.action_state }} - https://ipfs.remixproject.org/ipfs/${{ env.action_state }} - https://gateway.ipfs.io/ipfs/${{ env.action_state }} + https://remix-project.infura-ipfs.io/ipfs/${{ env.action_state }} repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens allow-repeats: false # This is the default From f5bb0d37e9b99b166217e03d545807a3a1805e9e Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 13:01:48 +0200 Subject: [PATCH 24/71] fix setting teh current file --- apps/remix-ide/src/app/editor/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index 689850b88c..cffd5c3de3 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -165,7 +165,7 @@ class Editor extends Plugin { } } } - if (name === this.currentFile) { + if (name !== this.currentFile) { this.currentFile = name this.renderComponent() } From 3cbae1dcad8dd0999cde7c714042e25238856447 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 3 Jun 2022 21:54:20 +0530 Subject: [PATCH 25/71] remove unreachable code --- apps/remix-ide/src/app/editor/editor.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index cffd5c3de3..50f7f42d76 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -165,10 +165,6 @@ class Editor extends Plugin { } } } - if (name !== this.currentFile) { - this.currentFile = name - this.renderComponent() - } }) this.on('fileManager', 'noFileSelected', async () => { From b202d3872fce4a6bf0ccf9caef577fbd8764aaec Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 2 Jun 2022 22:17:38 +0200 Subject: [PATCH 26/71] bug fixes --- libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx | 4 +++- libs/remix-ui/run-tab/src/lib/components/environment.tsx | 2 +- libs/remix-ui/search/src/lib/context/context.tsx | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index cbb5f05179..a35f1f1b7e 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -111,7 +111,8 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { const scriptMedium = document.createElement('script') scriptMedium.src = 'https://www.twilik.com/assets/retainable/rss-embed/retainable-rss-embed.js' scriptMedium.async = true - document.body.appendChild(scriptMedium) + // script causes a bug in the editor and prevents syntax error detection + // document.body.appendChild(scriptMedium) return () => { document.body.removeChild(scriptTwitter) document.body.removeChild(scriptMedium) @@ -324,6 +325,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { className="btn-danger p-2 m-1 border rounded-circle remixui_home_mediaBadge fab fa-medium" id="remixIDEHomeMediumbtn" title="Medium blogs" + hidden={true} onClick={(e) => { setState(prevState => { return { ...prevState, showMediaPanel: state.showMediaPanel === 'medium' ? 'none' : 'medium' } diff --git a/libs/remix-ui/run-tab/src/lib/components/environment.tsx b/libs/remix-ui/run-tab/src/lib/components/environment.tsx index 23d04f6d20..4853f6f12b 100644 --- a/libs/remix-ui/run-tab/src/lib/components/environment.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/environment.tsx @@ -19,7 +19,7 @@ export function EnvironmentUI (props: EnvironmentProps) { Environment
- { handleChangeExEnv(e.target.value) }}> { props.providers.providerList.map((provider, index) =>
-
-
- +
@@ -797,13 +795,14 @@ export const CompilerContainer = (props: CompilerContainerProps) => { placeholder={"Enter the new path"} title="If the file you entered does not exist you will be able to create one in the next step." disabled={!state.useFileConfiguration} + data-id="scConfigFilePathInput" onKeyPress={event => { if (event.key === 'Enter') { handleConfigPathChange() } }} /> - { !showFilePathInput && } + { !showFilePathInput && }
diff --git a/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css b/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css index 354be77283..62a557f8cf 100644 --- a/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css +++ b/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css @@ -13,6 +13,7 @@ padding-left : 6px; padding-right : 6px; padding-top : 6px; + overflow-y : auto; } .remixui_fileExplorerTree { cursor : default; diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 9e0b0a0f04..2015c8d396 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -228,9 +228,9 @@ export function Workspace () {
-
-
-
+
+
+
{ (global.fs.mode === 'browser') && (currentWorkspace !== NO_WORKSPACE) && Date: Thu, 2 Jun 2022 17:18:27 +0200 Subject: [PATCH 37/71] added matomo tracking --- libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx | 3 +++ 1 file changed, 3 insertions(+) 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 a3b3d25ae2..2a0bf65f0d 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -424,6 +424,9 @@ export const CompilerContainer = (props: CompilerContainerProps) => { compileIcon.current.classList.remove('remixui_spinningIcon') compileIcon.current.classList.remove('remixui_bouncingIcon') if (!state.autoCompile || (state.autoCompile && state.matomoAutocompileOnce)) { + if (state.useFileConfiguration) + _paq.push(['trackEvent', 'compiler', 'compiled_with_config_file']) + _paq.push(['trackEvent', 'compiler', 'compiled_with_version', _retrieveVersion()]) if (state.autoCompile && state.matomoAutocompileOnce) { setState(prevState => { From 3967b6afabf3749562fd244d41e6b3da0bb9f3e4 Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 2 Jun 2022 17:29:36 +0200 Subject: [PATCH 38/71] load expanded if config option was saved --- .../remix-ui/solidity-compiler/src/lib/compiler-container.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 2a0bf65f0d..9ae631f6fe 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -79,10 +79,12 @@ export const CompilerContainer = (props: CompilerContainerProps) => { }, [workspaceName]) useEffect(() => { - if (state.useFileConfiguration) + if (state.useFileConfiguration) { api.fileExists(defaultPath).then((exists) => { if (!exists || state.useFileConfiguration ) createNewConfigFile() }) + setToggleExpander(true) + } }, [state.useFileConfiguration]) From ebc40039be43d397bdcf20c6623a6ebfa341da64 Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 2 Jun 2022 17:44:06 +0200 Subject: [PATCH 39/71] fixed e2e --- .../src/commands/verifyContracts.ts | 1 - apps/remix-ide-e2e/src/tests/ballot.test.ts | 36 +++++++++++-------- apps/remix-ide-e2e/src/tests/plugin_api.ts | 6 +--- .../remix-ide-e2e/src/tests/workspace.test.ts | 3 +- .../src/lib/compiler-container.tsx | 4 +-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/verifyContracts.ts b/apps/remix-ide-e2e/src/commands/verifyContracts.ts index 598efa2b7f..bd72f8e796 100644 --- a/apps/remix-ide-e2e/src/commands/verifyContracts.ts +++ b/apps/remix-ide-e2e/src/commands/verifyContracts.ts @@ -48,7 +48,6 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str .waitForElementVisible('*[data-id="treeViewDivtreeViewItemoptimizer"]') .click('*[data-id="treeViewDivtreeViewItemoptimizer"]') .waitForElementVisible('*[data-id="treeViewDivruns"]') - .assert.containsText('*[data-id="treeViewDivruns"]', `${opts.runs}`) .click('[data-id="workspacesModalDialog-modal-footer-ok-react"]') .perform(() => { diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 69b4c1e803..ba52a14ed6 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -111,33 +111,39 @@ module.exports = { .journalLastChildIncludes('data: 0x5c1...a733c') }, - 'Call method from Ballot to check return value using external web3': function (browser: NightwatchBrowser) { - browser - .clickFunction('winnerName - call') - // Test in terminal - .journalLastChildIncludes('Ballot.winnerName()') - .testFunction('last', - { - 'decoded output': { 0: 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000' } - }) - // Test in Udapp UI , treeViewDiv0 shows returned value on method click - .assert.containsText('*[data-id="treeViewDiv0"]', 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000') - .end() - }, - 'Compile Ballot using config file': function (browser: NightwatchBrowser) { browser .addFile('cf.json', {content: configFile}) .clickLaunchIcon('solidity') + .waitForElementVisible('*[data-id="scConfigExpander"]') .click('*[data-id="scConfigExpander"]') + .waitForElementVisible('*[data-id="scFileConfiguration"]', 10000) .click('*[data-id="scFileConfiguration"]') + .waitForElementVisible('*[data-id="scConfigChangeFilePath"]', 10000) .click('*[data-id="scConfigChangeFilePath"]') + .pause(10000) + .waitForElementVisible('*[data-id="scConfigFilePathInput"]', 10000) .click('*[data-id="scConfigFilePathInput]') .clearValue('*[data-id="scConfigFilePathInput"]') .setValue('*[data-id="scConfigFilePathInput"]', 'cf.json') + .sendKeys('*[data-id$="scConfigFilePathInput"]', browser.Keys.ENTER) .openFile('Untitled.sol') - .pause(5000) + .pause(20000) .verifyContracts(['Ballot'], {wait: 2000, runs: '300'}) + }, + + 'Call method from Ballot to check return value using external web3': function (browser: NightwatchBrowser) { + browser + .clickFunction('winnerName - call') + // Test in terminal + .journalLastChildIncludes('Ballot.winnerName()') + .testFunction('last', + { + 'decoded output': { 0: 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000' } + }) + // Test in Udapp UI , treeViewDiv0 shows returned value on method click + .assert.containsText('*[data-id="treeViewDiv0"]', 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000') + .end() } } diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index cf696f2bec..faabf03247 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -231,7 +231,6 @@ module.exports = { 'Should get current files #group7': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'fileManager:readdir', { - 'compiler_config.json': { isDirectory: false }, contracts: { isDirectory: true }, scripts: { isDirectory: true }, tests: { isDirectory: true }, @@ -286,15 +285,12 @@ module.exports = { 'Should create empty workspace #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'filePanel:createWorkspace', null, null, ['emptyworkspace', true]) await clickAndCheckLog(browser, 'filePanel:getCurrentWorkspace', { name: 'emptyworkspace', isLocalhost: false, absolutePath: '.workspaces/emptyworkspace' }, null, null) - await clickAndCheckLog(browser, 'fileManager:readdir', { - 'compiler_config.json': { isDirectory: false } - }, null, '/') + await clickAndCheckLog(browser, 'fileManager:readdir', {}, null, '/') }, 'Should create workspace #group2': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'filePanel:createWorkspace', null, null, 'testspace') await clickAndCheckLog(browser, 'filePanel:getCurrentWorkspace', { name: 'testspace', isLocalhost: false, absolutePath: '.workspaces/testspace' }, null, null) await clickAndCheckLog(browser, 'fileManager:readdir', { - 'compiler_config.json': { isDirectory: false }, contracts: { isDirectory: true }, scripts: { isDirectory: true }, tests: { isDirectory: true }, diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index f5fea02e36..0c36951a76 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -107,8 +107,7 @@ module.exports = { const fileList = document.querySelector('*[data-id="treeViewUltreeViewMenu"]') return fileList.getElementsByTagName('li').length; }, [], function(result){ - // check there are no files in FE except config file - browser.assert.equal(result.value, 1, 'Incorrect number of files'); + browser.assert.equal(result.value, 0, 'Incorrect number of files'); }); }, 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 9ae631f6fe..6632f8bd2e 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -784,8 +784,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
- - + +
{ (!showFilePathInput && state.useFileConfiguration) && Date: Fri, 3 Jun 2022 16:09:39 +0100 Subject: [PATCH 40/71] set details after contract has been parsed --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 3 -- .../solidity-compiler/src/app/compiler-api.ts | 45 +++++++++++++------ 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index ba52a14ed6..3d5dbcdb54 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -121,14 +121,11 @@ module.exports = { .click('*[data-id="scFileConfiguration"]') .waitForElementVisible('*[data-id="scConfigChangeFilePath"]', 10000) .click('*[data-id="scConfigChangeFilePath"]') - .pause(10000) .waitForElementVisible('*[data-id="scConfigFilePathInput"]', 10000) - .click('*[data-id="scConfigFilePathInput]') .clearValue('*[data-id="scConfigFilePathInput"]') .setValue('*[data-id="scConfigFilePathInput"]', 'cf.json') .sendKeys('*[data-id$="scConfigFilePathInput"]', browser.Keys.ENTER) .openFile('Untitled.sol') - .pause(20000) .verifyContracts(['Ballot'], {wait: 2000, runs: '300'}) }, diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index 47817450a0..4f38068ff0 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -287,23 +287,20 @@ export const CompilerApiMixin = (Base) => class extends Base { type: 'warning' }) } else this.statusChanged({ key: 'succeed', title: 'compilation successful', type: 'success' }) - // Store the contracts - this.compilationDetails.contractsDetails = {} - this.compiler.visitContracts((contract) => { - this.compilationDetails.contractsDetails[contract.name] = parseContracts( - contract.name, - contract.object, - this.compiler.getSource(contract.file) - ) - }) } else { const count = (data.errors ? data.errors.filter(error => error.severity === 'error').length : 0 + (data.error ? 1 : 0)) this.statusChanged({ key: count, title: `compilation failed with ${count} error${count > 1 ? 's' : ''}`, type: 'error' }) } - // Update contract Selection - this.compilationDetails.contractMap = {} - if (success) this.compiler.visitContracts((contract) => { this.compilationDetails.contractMap[contract.name] = contract }) - this.compilationDetails.target = source.target + // Store the contracts and Update contract Selection + if (success) { + this.compilationDetails = await this.visitsContractApi(source) + } else { + this.compilationDetails = { + contractMap: {}, + contractsDetails: {}, + target: source.target + } + } if (this.onCompilationFinished) this.onCompilationFinished(this.compilationDetails) // set annotations if (data.errors) { @@ -347,4 +344,26 @@ export const CompilerApiMixin = (Base) => class extends Base { } window.document.addEventListener('keydown', this.data.eventHandlers.onKeyDown) } + + async visitsContractApi (source): Promise<{ contractMap: { file: string } | Record, contractsDetails: Record, target?: string }> { + return new Promise((resolve) => { + this.compiler.visitContracts((contract) => { + const contractDetails = parseContracts( + contract.name, + contract.object, + this.compiler.getSource(contract.file) + ) + const contractMap = contract + + return resolve({ + contractMap: { + [contract.name]: contractMap + }, contractsDetails: { + [contract.name]: contractDetails + }, + target: source.target + }) + }) + }) + } } From 04fe82d62d81b1f688d474fac0524e2f83661a53 Mon Sep 17 00:00:00 2001 From: David Disu Date: Fri, 3 Jun 2022 17:34:55 +0100 Subject: [PATCH 41/71] Fix ballot test --- apps/remix-ide-e2e/src/tests/ballot.test.ts | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/ballot.test.ts b/apps/remix-ide-e2e/src/tests/ballot.test.ts index 3d5dbcdb54..5244241e89 100644 --- a/apps/remix-ide-e2e/src/tests/ballot.test.ts +++ b/apps/remix-ide-e2e/src/tests/ballot.test.ts @@ -111,6 +111,19 @@ module.exports = { .journalLastChildIncludes('data: 0x5c1...a733c') }, + 'Call method from Ballot to check return value using external web3': function (browser: NightwatchBrowser) { + browser + .clickFunction('winnerName - call') + // Test in terminal + .journalLastChildIncludes('Ballot.winnerName()') + .testFunction('last', + { + 'decoded output': { 0: 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000' } + }) + // Test in Udapp UI , treeViewDiv0 shows returned value on method click + .assert.containsText('*[data-id="treeViewDiv0"]', 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000') + }, + 'Compile Ballot using config file': function (browser: NightwatchBrowser) { browser .addFile('cf.json', {content: configFile}) @@ -127,19 +140,6 @@ module.exports = { .sendKeys('*[data-id$="scConfigFilePathInput"]', browser.Keys.ENTER) .openFile('Untitled.sol') .verifyContracts(['Ballot'], {wait: 2000, runs: '300'}) - }, - - 'Call method from Ballot to check return value using external web3': function (browser: NightwatchBrowser) { - browser - .clickFunction('winnerName - call') - // Test in terminal - .journalLastChildIncludes('Ballot.winnerName()') - .testFunction('last', - { - 'decoded output': { 0: 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000' } - }) - // Test in Udapp UI , treeViewDiv0 shows returned value on method click - .assert.containsText('*[data-id="treeViewDiv0"]', 'bytes32: winnerName_ 0x48656c6c6f20576f726c64210000000000000000000000000000000000000000') .end() } } @@ -387,7 +387,7 @@ const configFile = ` "outputSelection": { "*": { "": ["ast"], - "*": [] + "*": ["abi", "metadata", "devdoc", "userdoc", "storageLayout", "evm.legacyAssembly", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "evm.gasEstimates", "evm.assembly"] } }, "evmVersion": "byzantium" From 0fd96316b4aa21ea779761a8033a544d283a324a Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 19:55:54 +0200 Subject: [PATCH 42/71] update UI if no compiled contract --- apps/solidity-compiler/src/app/compiler-api.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index 4f38068ff0..dae58ab8e7 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -293,7 +293,7 @@ export const CompilerApiMixin = (Base) => class extends Base { } // Store the contracts and Update contract Selection if (success) { - this.compilationDetails = await this.visitsContractApi(source) + this.compilationDetails = await this.visitsContractApi(source, data) } else { this.compilationDetails = { contractMap: {}, @@ -345,8 +345,15 @@ export const CompilerApiMixin = (Base) => class extends Base { window.document.addEventListener('keydown', this.data.eventHandlers.onKeyDown) } - async visitsContractApi (source): Promise<{ contractMap: { file: string } | Record, contractsDetails: Record, target?: string }> { + async visitsContractApi (source, data): Promise<{ contractMap: { file: string } | Record, contractsDetails: Record, target?: string }> { return new Promise((resolve) => { + if (!data.contracts || (data.contracts && Object.keys(data.contracts).length === 0)) { + return resolve({ + contractMap: {}, + contractsDetails: {}, + target: source.target + }) + } this.compiler.visitContracts((contract) => { const contractDetails = parseContracts( contract.name, From 88572cc316a4ae6afa2b1aa42559fe07eb9df25c Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 20:42:22 +0200 Subject: [PATCH 43/71] fix tests --- apps/remix-ide-e2e/src/commands/verifyContracts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/verifyContracts.ts b/apps/remix-ide-e2e/src/commands/verifyContracts.ts index bd72f8e796..d9f5a7606d 100644 --- a/apps/remix-ide-e2e/src/commands/verifyContracts.ts +++ b/apps/remix-ide-e2e/src/commands/verifyContracts.ts @@ -19,7 +19,7 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str .pause(opts.wait) .pause(5000) .waitForElementPresent('*[data-id="compiledContracts"] option', 60000) - .perform((done) => { + .perform(async (done) => { if (opts.version) { browser .click('*[data-id="compilation-details"]') @@ -55,9 +55,9 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str callback() }) } else { - compiledContractNames.forEach((name) => { - browser.waitForElementContainsText('[data-id="compiledContracts"]', name, 60000) - }) + for (const name in compiledContractNames) { + await browser.waitForElementContainsText('[data-id="compiledContracts"]', name, 60000) + } done() callback() } From 998bb565bcf01fdf944dacabc01f4e30941ac864 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 21:34:18 +0200 Subject: [PATCH 44/71] fix selecting test --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec1788e7c2..17d92657a0 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "build:production": "NODE_ENV=production nx build remix-ide --skip-nx-cache", "serve:production": "npx http-server ./dist/apps/remix-ide", - "select_test": "sh apps/remix-ide-e2e/src/select_tests.sh", + "select_test": "bash apps/remix-ide-e2e/src/select_tests.sh", "group_test": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${npm_config_test}_group${npm_config_group}.test.js --env=${npm_config_env}", "nightwatch_parallel": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", "nightwatch_local_firefox": "yarn run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox", From f4faa02cd68572ae070eee0028b0625e8384d7ba Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 21:34:37 +0200 Subject: [PATCH 45/71] readFile only if path defined --- .../solidity-compiler/src/lib/logic/compileTabLogic.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts index b4e26182ac..7497a529ae 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts +++ b/libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts @@ -106,9 +106,11 @@ export class CompileTabLogic { const sources = { [target]: { content } } this.event.emit('removeAnnotations') this.event.emit('startingCompilation') - this.api.readFile(this.configFilePath).then( contentConfig => { - this.compiler.set('configFileContent', contentConfig) - }) + if (this.configFilePath) { + this.api.readFile(this.configFilePath).then( contentConfig => { + this.compiler.set('configFileContent', contentConfig) + }) + } // setTimeout fix the animation on chrome... (animation triggered by 'staringCompilation') setTimeout(() => { this.compiler.compile(sources, target); resolve(true) }, 100) }).catch((error) => { From 10d55a40e020938fe4b28da67d4866ddd1630e41 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jun 2022 21:34:49 +0200 Subject: [PATCH 46/71] fix visiting contract --- .../solidity-compiler/src/app/compiler-api.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index dae58ab8e7..f1f03ac9f9 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -354,22 +354,21 @@ export const CompilerApiMixin = (Base) => class extends Base { target: source.target }) } + const contractMap = {} + const contractsDetails = {} this.compiler.visitContracts((contract) => { const contractDetails = parseContracts( contract.name, contract.object, this.compiler.getSource(contract.file) ) - const contractMap = contract - - return resolve({ - contractMap: { - [contract.name]: contractMap - }, contractsDetails: { - [contract.name]: contractDetails - }, - target: source.target - }) + contractMap[contract.name] = contract + contractDetails[contract.name] = contractDetails + }) + return resolve({ + contractMap, + contractsDetails, + target: source.target }) }) } From acfefac5b5b6099ce9281ebbfca65f6598c97307 Mon Sep 17 00:00:00 2001 From: yann300 Date: Sat, 4 Jun 2022 08:07:38 +0200 Subject: [PATCH 47/71] fix set default files --- .../remix-ui/solidity-compiler/src/lib/compiler-container.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 6632f8bd2e..bc06aae822 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -71,7 +71,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { api.setAppParameter('configFilePath', defaultPath) if (state.useFileConfiguration) { api.fileExists(defaultPath).then((exists) => { - if (!exists || state.useFileConfiguration ) createNewConfigFile() + if (!exists && state.useFileConfiguration) createNewConfigFile() }) } setShowFilePathInput(false) @@ -81,7 +81,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => { useEffect(() => { if (state.useFileConfiguration) { api.fileExists(defaultPath).then((exists) => { - if (!exists || state.useFileConfiguration ) createNewConfigFile() + if (!exists) createNewConfigFile() }) setToggleExpander(true) } From 47baf742f870bddc794fe6b0a14220e15285377c Mon Sep 17 00:00:00 2001 From: yann300 Date: Sat, 4 Jun 2022 08:15:09 +0200 Subject: [PATCH 48/71] fix visiting contracts --- apps/solidity-compiler/src/app/compiler-api.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/solidity-compiler/src/app/compiler-api.ts b/apps/solidity-compiler/src/app/compiler-api.ts index f1f03ac9f9..3065af630a 100644 --- a/apps/solidity-compiler/src/app/compiler-api.ts +++ b/apps/solidity-compiler/src/app/compiler-api.ts @@ -357,13 +357,12 @@ export const CompilerApiMixin = (Base) => class extends Base { const contractMap = {} const contractsDetails = {} this.compiler.visitContracts((contract) => { - const contractDetails = parseContracts( + contractMap[contract.name] = contract + contractsDetails[contract.name] = parseContracts( contract.name, contract.object, this.compiler.getSource(contract.file) ) - contractMap[contract.name] = contract - contractDetails[contract.name] = contractDetails }) return resolve({ contractMap, From 2c41ea02915847e7a2030194cbb1996d8212ead9 Mon Sep 17 00:00:00 2001 From: yann300 Date: Sat, 4 Jun 2022 08:31:20 +0200 Subject: [PATCH 49/71] fix test --- apps/remix-ide-e2e/src/commands/verifyContracts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/verifyContracts.ts b/apps/remix-ide-e2e/src/commands/verifyContracts.ts index d9f5a7606d..f29c3e42c6 100644 --- a/apps/remix-ide-e2e/src/commands/verifyContracts.ts +++ b/apps/remix-ide-e2e/src/commands/verifyContracts.ts @@ -55,8 +55,8 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str callback() }) } else { - for (const name in compiledContractNames) { - await browser.waitForElementContainsText('[data-id="compiledContracts"]', name, 60000) + for (const index in compiledContractNames) { + await browser.waitForElementContainsText('[data-id="compiledContracts"]', compiledContractNames[index], 60000) } done() callback() From 0705e19ced4f023a1114e0b85d248acb591092a6 Mon Sep 17 00:00:00 2001 From: yann300 Date: Sat, 4 Jun 2022 09:16:35 +0200 Subject: [PATCH 50/71] fix wrong rebase --- apps/remix-ide/src/app/editor/editor.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index a8ed3f5ea4..97dc63f988 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -191,10 +191,6 @@ class Editor extends Plugin { } } } - if (name === this.currentFile) { - this.currentFile = name - this.renderComponent() - } }) this.on('fileManager', 'noFileSelected', async () => { From 0522e02939e521d2dd7d7b59ccf9a8a8fb4325a3 Mon Sep 17 00:00:00 2001 From: ryestew Date: Wed, 1 Jun 2022 12:03:37 -0400 Subject: [PATCH 51/71] update remixd modal text --- apps/remix-ide/src/app/plugins/remixd-handle.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/remixd-handle.tsx b/apps/remix-ide/src/app/plugins/remixd-handle.tsx index edaf7683d5..17588b7a85 100644 --- a/apps/remix-ide/src/app/plugins/remixd-handle.tsx +++ b/apps/remix-ide/src/app/plugins/remixd-handle.tsx @@ -142,11 +142,14 @@ function remixdDialog () { Remixd needs to be running in the background to load the files in localhost workspace. For more info, please check the Remixd documentation.
- If you are just looking for the remixd command, here it is: -

- Go to your working directory and then run: + The remixd command is:

{commandText} - +
+
+ The remixd command without options uses the terminal's current directory as the shared directory and the shared Remix domain can only be https://remix.ethereum.org, https://remix-alpha.ethereum.org, or https://remix-beta.ethereum.org +
+
+ See all remixd options: remixd --help
When connected, a session will be started between {window.location.origin} and your local file system at ws://127.0.0.1:65520. From 0f881d4c31ddba0d1ccc2174e03d691bd237e80e Mon Sep 17 00:00:00 2001 From: ryestew Date: Thu, 2 Jun 2022 12:27:56 -0400 Subject: [PATCH 52/71] edit more --- apps/remix-ide/src/app/plugins/remixd-handle.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide/src/app/plugins/remixd-handle.tsx b/apps/remix-ide/src/app/plugins/remixd-handle.tsx index 17588b7a85..da3b2506b9 100644 --- a/apps/remix-ide/src/app/plugins/remixd-handle.tsx +++ b/apps/remix-ide/src/app/plugins/remixd-handle.tsx @@ -135,26 +135,28 @@ export class RemixdHandle extends WebsocketPlugin { function remixdDialog () { const commandText = 'remixd' + const fullCommandText = 'remixd -s -u ' return (<>
- 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 documentation. + Access your local file system from Remix IDE using Remixd NPM package. +
+
+ Remixd documentation.
The remixd command is: -

{commandText} +
{commandText}
The remixd command without options uses the terminal's current directory as the shared directory and the shared Remix domain can only be https://remix.ethereum.org, https://remix-alpha.ethereum.org, or https://remix-beta.ethereum.org
- See all remixd options: remixd --help + Example command with flags:
+ {fullCommandText}
- 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 + For info about ports, see Remixd ports usage
This feature is still in Alpha. We recommend to keep a backup of the shared folder. From 80da2c5e033a0041eb713c3c4b9a7b7e69ad2f8a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Fri, 3 Jun 2022 16:26:31 +0200 Subject: [PATCH 53/71] RSS --- .../home-tab/src/lib/components/rssFeed.css | 12 ++++++ .../home-tab/src/lib/components/rssFeed.tsx | 42 +++++++++++++++++++ .../home-tab/src/lib/remix-ui-home-tab.tsx | 20 +-------- package.json | 1 + 4 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 libs/remix-ui/home-tab/src/lib/components/rssFeed.css create mode 100644 libs/remix-ui/home-tab/src/lib/components/rssFeed.tsx diff --git a/libs/remix-ui/home-tab/src/lib/components/rssFeed.css b/libs/remix-ui/home-tab/src/lib/components/rssFeed.css new file mode 100644 index 0000000000..22e231c0e0 --- /dev/null +++ b/libs/remix-ui/home-tab/src/lib/components/rssFeed.css @@ -0,0 +1,12 @@ +.RSSFeed-item img { + width: 100%; +} + +.RSSFeed-item .truncate { + max-height: 500px; + overflow: hidden; +} + +.RSSFeed-item .more-button { + +} \ No newline at end of file diff --git a/libs/remix-ui/home-tab/src/lib/components/rssFeed.tsx b/libs/remix-ui/home-tab/src/lib/components/rssFeed.tsx new file mode 100644 index 0000000000..d616f1e915 --- /dev/null +++ b/libs/remix-ui/home-tab/src/lib/components/rssFeed.tsx @@ -0,0 +1,42 @@ +import React, { useState, useEffect } from "react"; +import Parser from "rss-parser"; +import './RssFeed.css'; + +interface RSSFeedProps { + feedUrl: string, + maxItems: number, +} + +export function RSSFeed({ feedUrl, maxItems }: RSSFeedProps) { + const [feed, setFeed] = useState(null); + + useEffect(() => { + const fetchData = async () => { + let parser = new Parser() + let feed = await parser.parseURL(feedUrl); + for (const item of feed.items) { + item.content = item['content:encoded'] + item.date = new Date(item.pubDate).toLocaleDateString('en-US', { + month: 'short', + day: 'numeric' + }) + } + setFeed(feed); + }; + fetchData(); + }, [feedUrl]); + + + return (<> + {feed && feed.items.slice(0, maxItems).map((item: any, index: any) => ( +
+

{item.title}

+

Author: {item.creator}

+

{item.date}

+
+ READ MORE +
+
+ ))} + ) +} \ No newline at end of file diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx index a35f1f1b7e..ba1e10e1a5 100644 --- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx +++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx @@ -5,6 +5,7 @@ import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line import { Toaster } from '@remix-ui/toaster' // eslint-disable-line import PluginButton from './components/pluginButton' // eslint-disable-line import { ThemeContext, themes } from './themeContext' +import { RSSFeed } from './components/rssFeed' declare global { interface Window { _paq: any @@ -107,15 +108,8 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { scriptTwitter.src = 'https://platform.twitter.com/widgets.js' scriptTwitter.async = true document.body.appendChild(scriptTwitter) - // to retrieve medium publications - const scriptMedium = document.createElement('script') - scriptMedium.src = 'https://www.twilik.com/assets/retainable/rss-embed/retainable-rss-embed.js' - scriptMedium.async = true - // script causes a bug in the editor and prevents syntax error detection - // document.body.appendChild(scriptMedium) return () => { document.body.removeChild(scriptTwitter) - document.body.removeChild(scriptMedium) } }, []) @@ -342,17 +336,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => { >
) + // ipfs settings + + const handleSaveIpfsProjectId = useCallback( + (event) => { + setipfsProjectId(event.target.value) + } + , [ipfsProjectId] + ) + + const handleSaveIpfsSecret = useCallback( + (event) => { + setipfsProjectSecret(event.target.value) + } + , [ipfsProjectSecret] + ) + + const handleSaveIpfsUrl = useCallback( + (event) => { + setipfsUrl(event.target.value) + } + , [ipfsUrl] + ) + + const handleSaveIpfsPort = useCallback( + (event) => { + setipfsPort(event.target.value) + } + , [ipfsPort] + ) + + const handleSaveIpfsProtocol = useCallback( + (event) => { + setipfsProtocol(event.target.value) + } + , [ipfsProtocol] + ) + + const saveIpfsSettings = () => { + saveIpfsSettingsToast(props.config, dispatchToast, ipfsUrl, ipfsProtocol, ipfsPort, ipfsProjectId, ipfsProjectSecret) + } + + const ipfsSettings = () => ( +
+
+
{ ipfsSettingsText }
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+ saveIpfsSettings()} value="Save" type="button"> +
+
+
) + + return (
{state.message ? : null} @@ -244,6 +350,7 @@ export const RemixUiSettings = (props: RemixUiSettingsProps) => { {token('gist')} {token('etherscan')} {swarmSettings()} + {ipfsSettings()}
) diff --git a/libs/remix-ui/settings/src/lib/settingsAction.ts b/libs/remix-ui/settings/src/lib/settingsAction.ts index 8519efb6f5..b7a7eddd95 100644 --- a/libs/remix-ui/settings/src/lib/settingsAction.ts +++ b/libs/remix-ui/settings/src/lib/settingsAction.ts @@ -56,3 +56,12 @@ export const saveSwarmSettingsToast = (config, dispatch, privateBeeAddress, post config.set('settings/swarm-postage-stamp-id', postageStampId) dispatch({ type: 'save', payload: { message: 'Swarm settings have been saved' } }) } + +export const saveIpfsSettingsToast = (config, dispatch, ipfsURL, ipfsProtocol, ipfsPort, ipfsProjectId, ipfsProjectSecret) => { + config.set('settings/ipfs-url', ipfsURL) + config.set('settings/ipfs-protocol', ipfsProtocol) + config.set('settings/ipfs-port', ipfsPort) + config.set('settings/ipfs-project-id', ipfsProjectId) + config.set('settings/ipfs-project-secret', ipfsProjectSecret) + dispatch({ type: 'save', payload: { message: 'IPFS settings have been saved' } }) +} From 9f60ada45a326611aebf2a2bdb7f21f2e05b3e0a Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 6 Jun 2022 14:09:21 +0200 Subject: [PATCH 59/71] fix test --- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index d571c7b5df..63b0dfeb61 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -19,6 +19,9 @@ module.exports = { .openFile('contracts/3_Ballot.sol') .verifyContracts(['Ballot']) .click('#publishOnIpfs') + .pause(2000) + .waitForElementVisible('[data-id="publishToStorageModalDialogModalBody-react"]', 60000) + .click('[data-id="publishToStorage-modal-footer-ok-react"]') .pause(8000) .waitForElementVisible('[data-id="publishToStorageModalDialogModalBody-react"]', 60000) .getText('[data-id="publishToStorageModalDialogModalBody-react"]', (result) => { From ba58484d21dc191c1926df06b6eed7131e1ff480 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 6 Jun 2022 15:04:46 +0200 Subject: [PATCH 60/71] fix test --- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 4 +++- .../publish-to-storage/src/lib/publish-to-storage.tsx | 4 +++- libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 63b0dfeb61..5161584789 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -66,7 +66,9 @@ module.exports = { .waitForElementVisible('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]') .pause(5000) - .waitForElementVisible('[data-id="udappModalDialogModalBody-react"]') + .waitForElementVisible('[data-id="publishToStorageModalDialogModalBody-react"]', 60000) + .click('[data-id="publishToStorage-modal-footer-ok-react"]') + .pause(8000) .getText('[data-id="udappModalDialogModalBody-react"]', (result) => { const value = typeof result.value === 'string' ? result.value : null diff --git a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx index e8f68524c4..4d9e25f404 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx @@ -6,6 +6,7 @@ import { publishToSwarm } from './publishOnSwarm' export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { const { api, storage, contract, resetStorage } = props + const [modalShown, setModalShown] = useState(false) const [state, setState] = useState({ modal: { title: '', @@ -38,7 +39,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { modal('Swarm Publish Failed', publishMessageFailed(storage, parseError)) } } else { - if (!api.config.get('settings/ipfs-url')) { + if (!api.config.get('settings/ipfs-url') && !modalShown) { modal('IPFS Settings',
You have not set your own custom IPFS settings.



We won’t be providing a public endpoint anymore for publishing your contracts to IPFS.

Instead of that, 4 options are now available:

@@ -82,6 +83,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => { } catch (err) { modal('IPFS Publish Failed', publishMessageFailed(storage, err)) } + setModalShown(true) } const publishMessage = (uploaded) => ( diff --git a/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx b/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx index 44a45a6329..dbea8a4766 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publishToIPFS.tsx @@ -121,7 +121,7 @@ const ipfsVerifiedPublish = async (content, expectedHash, api) => { if (expectedHash && hash !== expectedHash) { return { message: 'hash mismatch between solidity bytecode and uploaded content.', url: 'dweb:/ipfs/' + hash, hash } } else { - api.writeFile('ipfs/' + results, content) + api.writeFile('ipfs/' + hash, content) return { message: 'ok', url: 'dweb:/ipfs/' + hash, hash } } } catch (error) { From 9880ecc2ba812aecfac168855180e2c7ff3109b8 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 6 Jun 2022 18:36:49 +0530 Subject: [PATCH 61/71] remove extra console logs --- libs/remix-simulator/src/methods/blocks.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/remix-simulator/src/methods/blocks.ts b/libs/remix-simulator/src/methods/blocks.ts index 1ecc7b30e4..e2594b05ac 100644 --- a/libs/remix-simulator/src/methods/blocks.ts +++ b/libs/remix-simulator/src/methods/blocks.ts @@ -40,7 +40,6 @@ export class Blocks { return cb(new Error('block not found')) } - console.log(block.transactions) const transactions = block.transactions.map((t) => { const hash = '0x' + t.hash().toString('hex') const tx = this.vmContext.txByHash[hash] @@ -95,7 +94,6 @@ export class Blocks { eth_getBlockByHash (payload, cb) { const block = this.vmContext.blocks[payload.params[0]] - console.log(block.transactions) const transactions = block.transactions.map((t) => { const hash = '0x' + t.hash().toString('hex') const tx = this.vmContext.txByHash[hash] From c3560041abc95c0503b1477f6b81c48980dda515 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 6 Jun 2022 15:17:51 +0200 Subject: [PATCH 62/71] fix test --- apps/remix-ide-e2e/src/tests/publishContract.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/publishContract.test.ts b/apps/remix-ide-e2e/src/tests/publishContract.test.ts index 5161584789..38ee1c3e54 100644 --- a/apps/remix-ide-e2e/src/tests/publishContract.test.ts +++ b/apps/remix-ide-e2e/src/tests/publishContract.test.ts @@ -66,8 +66,8 @@ module.exports = { .waitForElementVisible('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]') .pause(5000) - .waitForElementVisible('[data-id="publishToStorageModalDialogModalBody-react"]', 60000) - .click('[data-id="publishToStorage-modal-footer-ok-react"]') + .waitForElementVisible('[data-id="udappModalDialogModalBody-react"]', 60000) + .modalFooterOKClick('udapp') .pause(8000) .getText('[data-id="udappModalDialogModalBody-react"]', (result) => { const value = typeof result.value === 'string' ? result.value : null From 618432d564a4569aae2f92649f0cfc8afcd94e28 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 6 Jun 2022 15:28:00 +0200 Subject: [PATCH 63/71] Update publish-to-storage.tsx --- libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx index 4d9e25f404..8ff00ca026 100644 --- a/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx +++ b/libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx @@ -47,7 +47,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
  • DEFAULT OPTION: - Use the public INFURA node. This will not guarantee your data will persists. + Use the public INFURA node. This will not guarantee your data will persist.
  • Use your own INFURA IPFS node. This requires a subscription. Learn more From 78556af4d7206e303a4814660747782a48728bd7 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 6 Jun 2022 13:20:53 +0200 Subject: [PATCH 64/71] fix typescript error --- .../src/templates/ozerc20/scripts/web3-lib.ts | 2 +- .../src/templates/ozerc721/scripts/web3-lib.ts | 2 +- .../src/templates/remixDefault/scripts/web3-lib.ts | 2 +- .../src/templates/zeroxErc20/scripts/web3-lib.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts index 37ff2be99b..3c1565a072 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts @@ -2,7 +2,7 @@ import Web3 from 'web3' export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { - const web3 = new Web3(window.web3Provider) + const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts index 37ff2be99b..3c1565a072 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts @@ -2,7 +2,7 @@ import Web3 from 'web3' export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { - const web3 = new Web3(window.web3Provider) + const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts index 9ec1a2d864..f9dcdc3f89 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts @@ -2,7 +2,7 @@ import Web3 from 'web3' export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { - const web3 = new Web3(window.web3Provider) + const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts index 37ff2be99b..3c1565a072 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts @@ -2,7 +2,7 @@ import Web3 from 'web3' export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { - const web3 = new Web3(window.web3Provider) + const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated From 69dd6e0dd4f374b042483ecd3e7be1be04480b95 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 6 Jun 2022 13:59:35 +0200 Subject: [PATCH 65/71] fix monaco typescript error with --- libs/remix-ui/editor/src/lib/web-types.ts | 4 ++++ .../templates/ozerc20/scripts/ethers-lib.ts | 21 +++++++++++-------- .../src/templates/ozerc20/scripts/web3-lib.ts | 17 +++++++++++---- .../templates/ozerc721/scripts/ethers-lib.ts | 21 +++++++++++-------- .../templates/ozerc721/scripts/web3-lib.ts | 17 +++++++++++---- .../remixDefault/scripts/ethers-lib.ts | 19 ++++++++++------- .../remixDefault/scripts/web3-lib.ts | 19 ++++++++++++----- .../zeroxErc20/scripts/ethers-lib.ts | 21 +++++++++++-------- .../templates/zeroxErc20/scripts/web3-lib.ts | 17 +++++++++++---- 9 files changed, 104 insertions(+), 52 deletions(-) diff --git a/libs/remix-ui/editor/src/lib/web-types.ts b/libs/remix-ui/editor/src/lib/web-types.ts index 2ac05a5d26..065e4557bd 100644 --- a/libs/remix-ui/editor/src/lib/web-types.ts +++ b/libs/remix-ui/editor/src/lib/web-types.ts @@ -199,6 +199,10 @@ export const loadTypes = async (monaco) => { const indexWeb3Personal = await import('raw-loader!web3-eth-personal/types/index.d.ts') monaco.languages.typescript.typescriptDefaults.addExtraLib(indexWeb3Personal.default, `file:///node_modules/@types/web3-eth-personal/index.d.ts`) + // @ts-ignore + const indexWeb3Contract = await import('raw-loader!web3-eth-contract/types/index.d.ts') + monaco.languages.typescript.typescriptDefaults.addExtraLib(indexWeb3Contract.default, `file:///node_modules/@types/web3-eth-contract/index.d.ts`) + // @ts-ignore const indexWeb3Net = await import('raw-loader!web3-net/types/index.d.ts') monaco.languages.typescript.typescriptDefaults.addExtraLib(indexWeb3Net.default, `file:///node_modules/@types/web3-net/index.d.ts`) diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts index 1c5f4c6548..99439abd49 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts @@ -1,24 +1,27 @@ import { ethers } from 'ethers' -export const deploy = async (contractName: string, args: Array, from?: string): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {Number} acountIndex account index from the exposed account + * @return {Contract} deployed contract + */ +export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated - const artifactsPath = `browser/contracts/artifacts/${contractName}.json` + const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() + + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); - let contract - if (from) { - contract = await factory.connect(from).deploy(...args); - } else { - contract = await factory.deploy(...args); - } + let contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts index 3c1565a072..be0c09a4ab 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts @@ -1,6 +1,15 @@ import Web3 from 'web3' +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; -export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {string} from account used to send the transaction + * @param {number} gas gas limit + * @return {Options} deployed contract + */ +export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) @@ -12,14 +21,14 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract = new web3.eth.Contract(metadata.abi) + let contract: Contract = new web3.eth.Contract(metadata.abi) - contract = contract.deploy({ + let contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) - const newContractInstance = await contract.send({ + const newContractInstance = await contractSend.send({ from: from || accounts[0], gas: gas || 1500000 }) diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts index 1c5f4c6548..99439abd49 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts @@ -1,24 +1,27 @@ import { ethers } from 'ethers' -export const deploy = async (contractName: string, args: Array, from?: string): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {Number} acountIndex account index from the exposed account + * @return {Contract} deployed contract + */ +export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated - const artifactsPath = `browser/contracts/artifacts/${contractName}.json` + const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() + + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); - let contract - if (from) { - contract = await factory.connect(from).deploy(...args); - } else { - contract = await factory.deploy(...args); - } + let contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts index 3c1565a072..be0c09a4ab 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts @@ -1,6 +1,15 @@ import Web3 from 'web3' +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; -export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {string} from account used to send the transaction + * @param {number} gas gas limit + * @return {Options} deployed contract + */ +export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) @@ -12,14 +21,14 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract = new web3.eth.Contract(metadata.abi) + let contract: Contract = new web3.eth.Contract(metadata.abi) - contract = contract.deploy({ + let contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) - const newContractInstance = await contract.send({ + const newContractInstance = await contractSend.send({ from: from || accounts[0], gas: gas || 1500000 }) diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts index 40a478efbb..99439abd49 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts @@ -1,6 +1,13 @@ import { ethers } from 'ethers' -export const deploy = async (contractName: string, args: Array, from?: string): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {Number} acountIndex account index from the exposed account + * @return {Contract} deployed contract + */ +export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. @@ -9,16 +16,12 @@ export const deploy = async (contractName: string, args: Array, from?: stri const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() + + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); - let contract - if (from) { - contract = await factory.connect(from).deploy(...args); - } else { - contract = await factory.deploy(...args); - } + let contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts index f9dcdc3f89..be0c09a4ab 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts @@ -1,25 +1,34 @@ import Web3 from 'web3' +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; -export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {string} from account used to send the transaction + * @param {number} gas gas limit + * @return {Options} deployed contract + */ +export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated - const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path + const artifactsPath = `browser/contracts/artifacts/${contractName}.json` const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) const accounts = await web3.eth.getAccounts() - let contract = new web3.eth.Contract(metadata.abi) + let contract: Contract = new web3.eth.Contract(metadata.abi) - contract = contract.deploy({ + let contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) - const newContractInstance = await contract.send({ + const newContractInstance = await contractSend.send({ from: from || accounts[0], gas: gas || 1500000 }) diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts index 1c5f4c6548..99439abd49 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts @@ -1,24 +1,27 @@ import { ethers } from 'ethers' -export const deploy = async (contractName: string, args: Array, from?: string): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {Number} acountIndex account index from the exposed account + * @return {Contract} deployed contract + */ +export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. // Make sure contract is compiled and artifacts are generated - const artifactsPath = `browser/contracts/artifacts/${contractName}.json` + const artifactsPath = `browser/contracts/artifacts/${contractName}.json` // Change this for different path const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() + + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); - let contract - if (from) { - contract = await factory.connect(from).deploy(...args); - } else { - contract = await factory.deploy(...args); - } + let contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts index 3c1565a072..be0c09a4ab 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts @@ -1,6 +1,15 @@ import Web3 from 'web3' +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; -export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { +/** + * Deploy the given contract + * @param {string} contractName name of the contract to deploy + * @param {Array} args list of constructor' parameters + * @param {string} from account used to send the transaction + * @param {number} gas gas limit + * @return {Options} deployed contract + */ +export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => { const web3 = new Web3(web3Provider) console.log(`deploying ${contractName}`) @@ -12,14 +21,14 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract = new web3.eth.Contract(metadata.abi) + let contract: Contract = new web3.eth.Contract(metadata.abi) - contract = contract.deploy({ + let contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) - const newContractInstance = await contract.send({ + const newContractInstance = await contractSend.send({ from: from || accounts[0], gas: gas || 1500000 }) From 65cb7af38b73caf253bdac2e64eac1b0120149a2 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 6 Jun 2022 14:24:38 +0200 Subject: [PATCH 66/71] fix e2e test --- apps/remix-ide-e2e/src/tests/search.test.ts | 4 ++-- apps/remix-ide-e2e/src/tests/workspace.test.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/search.test.ts b/apps/remix-ide-e2e/src/tests/search.test.ts index f7925fb9ea..b2cff57b7c 100644 --- a/apps/remix-ide-e2e/src/tests/search.test.ts +++ b/apps/remix-ide-e2e/src/tests/search.test.ts @@ -33,11 +33,11 @@ module.exports = { .clearValue('*[id="search_include"]').pause(2000) .setValue('*[id="search_include"]', '**').sendKeys('*[id="search_include"]', browser.Keys.ENTER).pause(4000) .elements('css selector', '.search_plugin_search_line', (res) => { - Array.isArray(res.value) && browser.assert.equal(res.value.length, 48) + Array.isArray(res.value) && browser.assert.equal(res.value.length, 61) }) .setValue('*[id="search_exclude"]', ',contracts/**').sendKeys('*[id="search_exclude"]', browser.Keys.ENTER).pause(4000) .elements('css selector', '.search_plugin_search_line', (res) => { - Array.isArray(res.value) && browser.assert.equal(res.value.length, 42) + Array.isArray(res.value) && browser.assert.equal(res.value.length, 55) }) .clearValue('*[id="search_include"]').setValue('*[id="search_include"]', '*.sol, *.js, *.txt') .clearValue('*[id="search_exclude"]').setValue('*[id="search_exclude"]', '.*/**/*') diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 0c36951a76..bfb210167e 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -68,14 +68,14 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(2000) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string): Promise => { `) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') @@ -145,14 +145,14 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string): Promise => { `) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') @@ -193,14 +193,14 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string): Promise => { `) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') From bfb90d554f70b0340a731fd1780fa4a05b3f1411 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 6 Jun 2022 16:14:03 +0200 Subject: [PATCH 67/71] linting --- apps/remix-ide-e2e/src/tests/terminal.test.ts | 8 ++++---- apps/remix-ide-e2e/src/tests/workspace.test.ts | 6 +++--- .../src/templates/ozerc20/scripts/ethers-lib.ts | 10 +++++----- .../src/templates/ozerc20/scripts/web3-lib.ts | 6 +++--- .../src/templates/ozerc721/scripts/ethers-lib.ts | 10 +++++----- .../src/templates/ozerc721/scripts/web3-lib.ts | 6 +++--- .../src/templates/remixDefault/scripts/ethers-lib.ts | 10 +++++----- .../src/templates/remixDefault/scripts/web3-lib.ts | 6 +++--- .../src/templates/zeroxErc20/scripts/ethers-lib.ts | 10 +++++----- .../src/templates/zeroxErc20/scripts/web3-lib.ts | 6 +++--- 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index fb828248fe..a824c7871f 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -291,7 +291,7 @@ const deployWithEthersJs = ` // 'web3Provider' is a remix global variable object const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() - let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + let factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) let contract = await factory.deploy(...constructorArgs); @@ -320,7 +320,7 @@ describe("Storage with lib", function () { // Make sure contract is compiled and artifacts are generated const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'contracts/artifacts/Storage.json')) const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() - let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) let storage = await Storage.deploy(); console.log('storage contract Address: ' + storage.address); await storage.deployed() @@ -330,7 +330,7 @@ describe("Storage with lib", function () { it("test updating and retrieving updated value", async function () { const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'contracts/artifacts/Storage.json')) const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() - let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) let storage = await Storage.deploy(); await storage.deployed() const setValue = await storage.store(56); @@ -341,7 +341,7 @@ describe("Storage with lib", function () { it("fail test updating and retrieving updated value", async function () { const metadata = JSON.parse(await remix.call('fileManager', 'getFile', 'contracts/artifacts/Storage.json')) const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner() - let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + let Storage = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) let storage = await Storage.deploy(); await storage.deployed() const setValue = await storage.store(56); diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index bfb210167e..7e7cfbd55e 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -75,7 +75,7 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => {`) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') @@ -152,7 +152,7 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => {`) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') @@ -200,7 +200,7 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { - browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => {`) !== -1, + browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts index 99439abd49..e875db9a43 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/ethers-lib.ts @@ -4,10 +4,10 @@ import { ethers } from 'ethers' * Deploy the given contract * @param {string} contractName name of the contract to deploy * @param {Array} args list of constructor' parameters - * @param {Number} acountIndex account index from the exposed account + * @param {Number} accountIndex account index from the exposed account * @return {Contract} deployed contract */ -export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { +export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. @@ -17,11 +17,11 @@ export const deploy = async (contractName: string, args: Array, acountIndex const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) - const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) - let contract = await factory.deploy(...args) + const contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts index be0c09a4ab..cbffde3aac 100644 --- a/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc20/scripts/web3-lib.ts @@ -1,5 +1,5 @@ import Web3 from 'web3' -import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** * Deploy the given contract @@ -21,9 +21,9 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract: Contract = new web3.eth.Contract(metadata.abi) + const contract: Contract = new web3.eth.Contract(metadata.abi) - let contractSend: ContractSendMethod = contract.deploy({ + const contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts index 99439abd49..e875db9a43 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/ethers-lib.ts @@ -4,10 +4,10 @@ import { ethers } from 'ethers' * Deploy the given contract * @param {string} contractName name of the contract to deploy * @param {Array} args list of constructor' parameters - * @param {Number} acountIndex account index from the exposed account + * @param {Number} accountIndex account index from the exposed account * @return {Contract} deployed contract */ -export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { +export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. @@ -17,11 +17,11 @@ export const deploy = async (contractName: string, args: Array, acountIndex const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) - const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) - let contract = await factory.deploy(...args) + const contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts index be0c09a4ab..cbffde3aac 100644 --- a/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/ozerc721/scripts/web3-lib.ts @@ -1,5 +1,5 @@ import Web3 from 'web3' -import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** * Deploy the given contract @@ -21,9 +21,9 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract: Contract = new web3.eth.Contract(metadata.abi) + const contract: Contract = new web3.eth.Contract(metadata.abi) - let contractSend: ContractSendMethod = contract.deploy({ + const contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts index 99439abd49..e875db9a43 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/ethers-lib.ts @@ -4,10 +4,10 @@ import { ethers } from 'ethers' * Deploy the given contract * @param {string} contractName name of the contract to deploy * @param {Array} args list of constructor' parameters - * @param {Number} acountIndex account index from the exposed account + * @param {Number} accountIndex account index from the exposed account * @return {Contract} deployed contract */ -export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { +export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. @@ -17,11 +17,11 @@ export const deploy = async (contractName: string, args: Array, acountIndex const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) - const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) - let contract = await factory.deploy(...args) + const contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts index be0c09a4ab..cbffde3aac 100644 --- a/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/remixDefault/scripts/web3-lib.ts @@ -1,5 +1,5 @@ import Web3 from 'web3' -import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** * Deploy the given contract @@ -21,9 +21,9 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract: Contract = new web3.eth.Contract(metadata.abi) + const contract: Contract = new web3.eth.Contract(metadata.abi) - let contractSend: ContractSendMethod = contract.deploy({ + const contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts index 99439abd49..e875db9a43 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/ethers-lib.ts @@ -4,10 +4,10 @@ import { ethers } from 'ethers' * Deploy the given contract * @param {string} contractName name of the contract to deploy * @param {Array} args list of constructor' parameters - * @param {Number} acountIndex account index from the exposed account + * @param {Number} accountIndex account index from the exposed account * @return {Contract} deployed contract */ -export const deploy = async (contractName: string, args: Array, acountIndex?: number): Promise => { +export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => { console.log(`deploying ${contractName}`) // Note that the script needs the ABI which is generated from the compilation artifact. @@ -17,11 +17,11 @@ export const deploy = async (contractName: string, args: Array, acountIndex const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath)) // 'web3Provider' is a remix global variable object - const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(acountIndex) + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) - const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer); + const factory = new ethers.ContractFactory(metadata.abi, metadata.data.bytecode.object, signer) - let contract = await factory.deploy(...args) + const contract = await factory.deploy(...args) // The contract is NOT deployed yet; we must wait until it is mined await contract.deployed() diff --git a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts index be0c09a4ab..cbffde3aac 100644 --- a/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts +++ b/libs/remix-ws-templates/src/templates/zeroxErc20/scripts/web3-lib.ts @@ -1,5 +1,5 @@ import Web3 from 'web3' -import { Contract, ContractSendMethod, Options } from 'web3-eth-contract'; +import { Contract, ContractSendMethod, Options } from 'web3-eth-contract' /** * Deploy the given contract @@ -21,9 +21,9 @@ export const deploy = async (contractName: string, args: Array, from?: stri const accounts = await web3.eth.getAccounts() - let contract: Contract = new web3.eth.Contract(metadata.abi) + const contract: Contract = new web3.eth.Contract(metadata.abi) - let contractSend: ContractSendMethod = contract.deploy({ + const contractSend: ContractSendMethod = contract.deploy({ data: metadata.data.bytecode.object, arguments: args }) From 3758c9eebc19b17e1878c47a88d3e95b0cd7b912 Mon Sep 17 00:00:00 2001 From: David Disu Date: Mon, 6 Jun 2022 15:25:43 +0100 Subject: [PATCH 68/71] Fix height in File-Explorer --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 2015c8d396..98a80306bd 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -230,7 +230,7 @@ export function Workspace () {
-
+
{ (global.fs.mode === 'browser') && (currentWorkspace !== NO_WORKSPACE) && Date: Mon, 6 Jun 2022 18:22:36 +0200 Subject: [PATCH 69/71] bump dev branch --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1081c06428..478fe06031 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remix-project", - "version": "0.24.0-dev", + "version": "0.25.0-dev", "license": "MIT", "description": "Ethereum Remix Monorepo", "keywords": [ From 08edd39d41568ea52bc82eee4927e0ee40a61a99 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 6 Jun 2022 18:53:54 +0200 Subject: [PATCH 70/71] publish libs --- libs/remix-analyzer/package.json | 8 ++--- libs/remix-astwalker/package.json | 6 ++-- libs/remix-debug/package.json | 10 +++--- libs/remix-lib/package.json | 4 +-- libs/remix-simulator/package.json | 6 ++-- libs/remix-solidity/package.json | 6 ++-- libs/remix-tests/package.json | 10 +++--- libs/remix-url-resolver/package.json | 4 +-- libs/remix-ws-templates/package.json | 50 ++++++++++++++++------------ 9 files changed, 55 insertions(+), 49 deletions(-) diff --git a/libs/remix-analyzer/package.json b/libs/remix-analyzer/package.json index 903e5f3c15..22d8646744 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.22", + "version": "0.5.23", "description": "Tool to perform static analysis on Solidity smart contracts", "main": "src/index.js", "types": "src/index.d.ts", @@ -22,8 +22,8 @@ "@ethereumjs/block": "^3.5.1", "@ethereumjs/tx": "^3.3.2", "@ethereumjs/vm": "^5.5.3", - "@remix-project/remix-astwalker": "^0.0.43", - "@remix-project/remix-lib": "^0.5.13", + "@remix-project/remix-astwalker": "^0.0.44", + "@remix-project/remix-lib": "^0.5.14", "async": "^2.6.2", "ethereumjs-util": "^7.0.10", "ethers": "^5.4.2", @@ -52,5 +52,5 @@ "typescript": "^3.7.5" }, "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-astwalker/package.json b/libs/remix-astwalker/package.json index 6a76dcf6dc..60e7f14374 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.43", + "version": "0.0.44", "description": "Tool to walk through Solidity AST", "main": "src/index.js", "scripts": { @@ -37,7 +37,7 @@ "@ethereumjs/block": "^3.5.1", "@ethereumjs/tx": "^3.3.2", "@ethereumjs/vm": "^5.5.3", - "@remix-project/remix-lib": "^0.5.13", + "@remix-project/remix-lib": "^0.5.14", "@types/tape": "^4.2.33", "async": "^2.6.2", "ethereumjs-util": "^7.0.10", @@ -54,5 +54,5 @@ "tap-spec": "^5.0.0" }, "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-debug/package.json b/libs/remix-debug/package.json index 8d26e36358..e70aba4523 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.13", + "version": "0.5.14", "description": "Tool to debug Ethereum transactions", "contributors": [ { @@ -22,9 +22,9 @@ "@ethereumjs/common": "^2.5.0", "@ethereumjs/tx": "^3.3.2", "@ethereumjs/vm": "^5.5.3", - "@remix-project/remix-astwalker": "^0.0.43", - "@remix-project/remix-lib": "^0.5.13", - "@remix-project/remix-simulator": "^0.2.13", + "@remix-project/remix-astwalker": "^0.0.44", + "@remix-project/remix-lib": "^0.5.14", + "@remix-project/remix-simulator": "^0.2.14", "ansi-gray": "^0.1.1", "async": "^2.6.2", "color-support": "^1.1.3", @@ -68,5 +68,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug#readme", "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-lib/package.json b/libs/remix-lib/package.json index 9decef15f7..1a26aee068 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.13", + "version": "0.5.14", "description": "Library to various Remix tools", "contributors": [ { @@ -54,5 +54,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib#readme", "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-simulator/package.json b/libs/remix-simulator/package.json index 95985105e7..edebf864e9 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.13", + "version": "0.2.14", "description": "Ethereum IDE and tools for the web", "contributors": [ { @@ -18,7 +18,7 @@ "@ethereumjs/common": "^2.5.0", "@ethereumjs/tx": "^3.3.2", "@ethereumjs/vm": "^5.5.3", - "@remix-project/remix-lib": "^0.5.13", + "@remix-project/remix-lib": "^0.5.14", "ansi-gray": "^0.1.1", "async": "^3.1.0", "body-parser": "^1.18.2", @@ -67,5 +67,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator#readme", "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-solidity/package.json b/libs/remix-solidity/package.json index 351f9ab46f..bc1038ded4 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.13", + "version": "0.5.0", "description": "Tool to load and run Solidity compiler", "main": "src/index.js", "types": "src/index.d.ts", @@ -18,7 +18,7 @@ "@ethereumjs/block": "^3.5.1", "@ethereumjs/tx": "^3.3.2", "@ethereumjs/vm": "^5.5.3", - "@remix-project/remix-lib": "^0.5.13", + "@remix-project/remix-lib": "^0.5.14", "async": "^2.6.2", "eslint-scope": "^5.0.0", "ethereumjs-util": "^7.0.10", @@ -61,5 +61,5 @@ }, "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity#readme", "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-tests/package.json b/libs/remix-tests/package.json index 35e805d91f..2029b0ed7e 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.13", + "version": "0.2.14", "description": "Tool to test Solidity smart contracts", "main": "src/index.js", "types": "./src/index.d.ts", @@ -39,9 +39,9 @@ "@ethereumjs/common": "^2.5.0", "@ethereumjs/tx": "^3.3.2", "@ethereumjs/vm": "^5.5.3", - "@remix-project/remix-lib": "^0.5.13", - "@remix-project/remix-simulator": "^0.2.13", - "@remix-project/remix-solidity": "^0.4.13", + "@remix-project/remix-lib": "^0.5.14", + "@remix-project/remix-simulator": "^0.2.14", + "@remix-project/remix-solidity": "^0.5.0", "ansi-gray": "^0.1.1", "async": "^2.6.0", "axios": ">=0.21.1", @@ -79,5 +79,5 @@ "typescript": "^3.3.1" }, "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-url-resolver/package.json b/libs/remix-url-resolver/package.json index eacc1d95e3..f0cabcd04c 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.34", + "version": "0.0.35", "description": "Solidity import url resolver engine", "main": "src/index.js", "types": "src/index.d.ts", @@ -41,5 +41,5 @@ "typescript": "^3.1.6" }, "typings": "src/index.d.ts", - "gitHead": "2be5108c51f2ac9226e4598c512ec6d3c63f5c78" + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" } \ No newline at end of file diff --git a/libs/remix-ws-templates/package.json b/libs/remix-ws-templates/package.json index 949c7b21f8..988da22abe 100644 --- a/libs/remix-ws-templates/package.json +++ b/libs/remix-ws-templates/package.json @@ -1,23 +1,29 @@ { - "name": "@remix-project/remix-ws-templates", - "version": "1.0.0", - "description": "Create a Remix IDE workspace using different templates", - "main": "src/index.js", - "types": "src/index.d.ts", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ethereum/remix-project.git" - }, - "author": "Aniket-Engg", - "license": "MIT", - "bugs": { - "url": "https://github.com/ethereum/remix-project/issues" - }, - "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-ws-templates#readme" - } \ No newline at end of file + "name": "@remix-project/remix-ws-templates", + "version": "1.0.1", + "description": "Create a Remix IDE workspace using different templates", + "main": "src/index.js", + "types": "src/index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ethereum/remix-project.git" + }, + "author": "Aniket-Engg", + "license": "MIT", + "bugs": { + "url": "https://github.com/ethereum/remix-project/issues" + }, + "homepage": "https://github.com/ethereum/remix-project/tree/master/libs/remix-ws-templates#readme", + "typings": "./src/index.d.ts", + "dependencies": { + "ethers": "^5.4.2", + "web3": "^1.5.1" + }, + "gitHead": "3f311aaf25f5796f70711006bb783ee4087ffc71" +} \ No newline at end of file From d38e8ee65758d2de1d965be931f653bbe16c9c29 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 6 Jun 2022 18:57:14 +0200 Subject: [PATCH 71/71] bump remixd --- libs/remixd/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remixd/package.json b/libs/remixd/package.json index 13e8c3a3f5..451cc8db16 100644 --- a/libs/remixd/package.json +++ b/libs/remixd/package.json @@ -1,6 +1,6 @@ { "name": "@remix-project/remixd", - "version": "0.6.1", + "version": "0.6.2", "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",