From 7bab6c84f7697dbbb3b983f75caf3bc4a9ed4574 Mon Sep 17 00:00:00 2001 From: Manuel Wedler Date: Tue, 31 Dec 2024 13:43:48 +0100 Subject: [PATCH 01/43] Verification plugin: Add simple documentation on how to add a new verifier --- apps/contract-verification/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apps/contract-verification/README.md diff --git a/apps/contract-verification/README.md b/apps/contract-verification/README.md new file mode 100644 index 0000000000..6cbcd88173 --- /dev/null +++ b/apps/contract-verification/README.md @@ -0,0 +1,19 @@ +# Contract Verification Plugin + +With this plugin, contracts written and compiled in Remix can be verified at Sourcify, Etherscan, Blockscout and Routescan at the same time. Besides that, the source code of any address can be fetched from the verifiers and added to the file editor. + +## Adding a new verification service + +Currently, the plugin supports Sourcify, Etherscan, Blockscout and Routescan. To add a new verifier, you need to make the following changes: + +In `./src/app/types/VerificationTypes.ts`, add the new verifier to the `VerifierIdentifier` type and the`VERIFIERS` array. + +In order to interact with the API of the verification service, you need to create a new class that extends the `AbstractVerifier` class. If your API is based on the Etherscan API, you can simply extend the `EtherscanVerifier` class. In this case, see the `RoutescanVerifier` and the `BlockscoutVerifier` for reference. All related classes are located in the `./src/app/Verifiers` directory. + +In `./src/app/Verifiers/index.ts`, add your new verifier to the `getVerifier` function. Validate any settings properties that are required by your verifier. + +In `./src/app/utils/default-apis.json`, you need to add default settings for your new verifier. If you can, simply add your defaults in the form of `{ [VerifierIdentifier]: { [chainId]: { apiUrl: [value], explorerUrl: [value] } } }`. If you need more flexibility, you might also want to change the `src/app/utils/default-settings.ts` file. See Routescan there for reference. + +Your new verifier will automatically be shown in the `VerifyView` and the `LookupView` since we added it to the `VERIFIERS` array. You only need to make a change to the `SettingsView` because the required settings depend on the verifier. There, add a new div block in the same format as the other verifiers. Only add the `ConfigInput` elements for the settings that your verifier needs to the div block. + +That's it! Your verification service should be able to verify contracts through Remix now. From d2895aa061e24cc2b55b0a5bc977240ae839fac5 Mon Sep 17 00:00:00 2001 From: Maxim Evtush <154841002+maximevtush@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:25:09 +0100 Subject: [PATCH 02/43] fix typo in server status logging --- apps/remixdesktop/src/lib/InferenceServerManager.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remixdesktop/src/lib/InferenceServerManager.ts b/apps/remixdesktop/src/lib/InferenceServerManager.ts index 231e815914..4587e822db 100644 --- a/apps/remixdesktop/src/lib/InferenceServerManager.ts +++ b/apps/remixdesktop/src/lib/InferenceServerManager.ts @@ -149,8 +149,8 @@ export class InferenceManager implements ICompletions { } else { // Server is running with successful request // console.log('Inference server is running') - // console.log('completion is runnig', state.data?.completion) - // console.log('general is runnig', state.data?.general) + // console.log('completion is running', state.data?.completion) + // console.log('general is running', state.data?.general) } // this._handleResources() } @@ -176,7 +176,7 @@ export class InferenceManager implements ICompletions { } if (model.modelReqs.GPURequired) { if (gpu_available.length < 1) { - if (logger)console.warn('GPU requiredfor desktop inference but not available') + if (logger)console.warn('GPU required for desktop inference but not available') } } } From 599757252ee40a4b8cd41237e46d4b618d996176 Mon Sep 17 00:00:00 2001 From: Maxim Evtush <154841002+maximevtush@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:34:42 +0100 Subject: [PATCH 03/43] fix: spelling mistakes --- .../src/solidity-analyzer/modules/staticAnalysisCommon.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts index 10a4a1761a..4b4f82d471 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts @@ -409,7 +409,7 @@ function getLibraryCallContractName (node: FunctionCallAstNode): string | undefi * library set{...} * contract foo { * ... - * function () { set.union() => uinion} + * function () { set.union() => union} * @func {ASTNode} function call node * @return {string} name of function called on the library */ @@ -1040,7 +1040,7 @@ function matches (...fnArgs: any[]): string { /** * Finds first node of a certain type under a specific node. - * @node {AstNode} node to start form + * @node {AstNode} node to start from * @type {String} Type the ast node should have * @return {AstNode} null or node found * Note: developed keeping identifier node search in mind to get first identifier node from left in subscope From e98983bd011c12c92950aa44b7c7df6577341477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Uzdo=C4=9Fan?= Date: Mon, 30 Dec 2024 16:09:53 +0100 Subject: [PATCH 04/43] Fix Vyper runtime bytecode vs bytecode in the compilation UI --- apps/vyper/src/app/utils/compiler.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/vyper/src/app/utils/compiler.tsx b/apps/vyper/src/app/utils/compiler.tsx index 7f1c7d0f00..35657fc1c3 100644 --- a/apps/vyper/src/app/utils/compiler.tsx +++ b/apps/vyper/src/app/utils/compiler.tsx @@ -31,8 +31,6 @@ const compileReturnType = (output, contract): VyperCompilationResult => { const normal = normalizeContractPath(contract)[2] const abi = temp[normal]['abi'] const evm = _.merge(temp[normal]['evm']) - const depByteCode = evm.deployedBytecode - const runtimeBytecode = evm.bytecode const methodIdentifiers = evm.methodIdentifiers // TODO: verify this is correct const version = output.version || '0.4.0' @@ -52,8 +50,8 @@ const compileReturnType = (output, contract): VyperCompilationResult => { } = { contractName: normal, abi, - bytecode: depByteCode, - runtimeBytecode, + bytecode: evm.bytecode, + runtimeBytecode: evm.deployedBytecode, ir: '', methodIdentifiers, version, From 40bb52961a487771c4c9a233fc779fa30fd9d082 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 25 Dec 2024 18:47:30 +0530 Subject: [PATCH 05/43] VM state actions e2e --- apps/remix-ide-e2e/src/tests/vm_state.test.ts | 26 +++++++++++++++++++ .../src/lib/components/environment.tsx | 4 +-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 apps/remix-ide-e2e/src/tests/vm_state.test.ts diff --git a/apps/remix-ide-e2e/src/tests/vm_state.test.ts b/apps/remix-ide-e2e/src/tests/vm_state.test.ts new file mode 100644 index 0000000000..827252856d --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/vm_state.test.ts @@ -0,0 +1,26 @@ +'use strict' +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' + +declare global { + interface Window { testplugin: { name: string, url: string }; } +} + +const tests = { + '@disabled': true, + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done, null) + }, + + 'Should show fork and delete VM state icons #group1': function (browser: NightwatchBrowser) { + browser + .clickLaunchIcon('udapp') + .assert.elementPresent('*[data-id="selected-provider-vm-cancun"]') + .assert.elementPresent('*[data-id="fork-state-icon"]') + .assert.elementPresent('*[data-id="delete-state-icon"]') + }, +} + +module.exports = { + ...tests +}; 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 1783e30385..4e62973efb 100644 --- a/libs/remix-ui/run-tab/src/lib/components/environment.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/environment.tsx @@ -128,10 +128,10 @@ export function EnvironmentUI(props: EnvironmentProps) { { currentProvider && currentProvider.isVM && isSaveEvmStateChecked && }> - + } { currentProvider && currentProvider.isVM && isSaveEvmStateChecked && }> - + }
From 2a13be38682b5e411625be30fc29eed85c6fab1f Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 30 Dec 2024 12:56:18 +0530 Subject: [PATCH 06/43] failing test --- apps/remix-ide-e2e/src/tests/vm_state.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/vm_state.test.ts b/apps/remix-ide-e2e/src/tests/vm_state.test.ts index 827252856d..dc325edfa7 100644 --- a/apps/remix-ide-e2e/src/tests/vm_state.test.ts +++ b/apps/remix-ide-e2e/src/tests/vm_state.test.ts @@ -19,6 +19,13 @@ const tests = { .assert.elementPresent('*[data-id="fork-state-icon"]') .assert.elementPresent('*[data-id="delete-state-icon"]') }, + 'Should show toaster while trying fork and delete VM state without state #group1': function (browser: NightwatchBrowser) { + browser + .assert.elementPresent('*[data-id="fork-state-icon"]') + .click('*[data-id="fork-state-icon"]') + .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) + .assert.containsText('*[data-shared="tooltipPopup"]', `State not available to fork, as no transactions have been made for selected environment & selected workspace.`) + }, } module.exports = { From 48cc2bcf956ed1c83f91898b82f379e6ce08fc00 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 30 Dec 2024 14:09:31 +0530 Subject: [PATCH 07/43] should fork state e2e --- apps/remix-ide-e2e/src/tests/vm_state.test.ts | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/vm_state.test.ts b/apps/remix-ide-e2e/src/tests/vm_state.test.ts index dc325edfa7..0fa93e55fc 100644 --- a/apps/remix-ide-e2e/src/tests/vm_state.test.ts +++ b/apps/remix-ide-e2e/src/tests/vm_state.test.ts @@ -19,12 +19,52 @@ const tests = { .assert.elementPresent('*[data-id="fork-state-icon"]') .assert.elementPresent('*[data-id="delete-state-icon"]') }, - 'Should show toaster while trying fork and delete VM state without state #group1': function (browser: NightwatchBrowser) { + // 'Should show toaster while trying fork and delete VM state without state #group1': function (browser: NightwatchBrowser) { + // browser + // .assert.elementPresent('*[data-id="fork-state-icon"]') + // .click('*[data-id="fork-state-icon"]') + // .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) + // .assert.containsText('*[data-shared="tooltipPopup"]', `State not available to fork, as no transactions have been made for selected environment & selected workspace.`) + // }, + 'Should fork state successfully #group1': function (browser: NightwatchBrowser) { browser - .assert.elementPresent('*[data-id="fork-state-icon"]') + .openFile('contracts') + .openFile('contracts/1_Storage.sol') + .verifyContracts(['Storage']) + .clickLaunchIcon('udapp') + .click('*[data-id="Deploy - transact (not payable)"]') + .clickInstance(0) + .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"55"' }) + .testFunction('last', + { + status: '0x1 Transaction mined and execution succeed', + 'decoded input': { 'uint256 num': '55' } + }) + .clickFunction('retrieve - call') + .testFunction('last', + { + 'decoded output': { '0': 'uint256: 55' } + }) .click('*[data-id="fork-state-icon"]') + .waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]') + .click('input[data-id="modalDialogForkState"]') + .setValue('input[data-id="modalDialogForkState"]', 'forkedState_1') + .modalFooterOKClick('udappNotify') .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) - .assert.containsText('*[data-shared="tooltipPopup"]', `State not available to fork, as no transactions have been made for selected environment & selected workspace.`) + // check if toaster is shown + .assert.containsText('*[data-shared="tooltipPopup"]', `VM state 'forkedState_1' forked and selected as current envionment.`) + // check if forked state is selected as current envionment + .assert.elementPresent('*[data-id="selected-provider-vm-fs-forkedState_1"]') + // check if forked state file is created with expected details + .openFile('.states/forked_states/forkedState_1.json') + .getEditorValue((content) => { + browser.assert.ok(content.indexOf(`"latestBlockNumber": "0x2"`) !== -1) + browser.assert.ok(content.indexOf(`"stateName": "forkedState_1"`) !== -1) + browser.assert.ok(content.indexOf(`"forkName": "cancun"`) !== -1) + browser.assert.ok(content.indexOf(`"savingTimestamp":`) !== -1) + browser.assert.ok(content.indexOf(`"db":`) !== -1) + browser.assert.ok(content.indexOf(`"blocks":`) !== -1) + }) }, } From bcef7fbbd2aa0327db4b57885e603b21e1d9c9be Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 30 Dec 2024 16:33:34 +0530 Subject: [PATCH 08/43] show and load forked states --- apps/remix-ide-e2e/src/tests/vm_state.test.ts | 43 +++++++++++++++++++ .../components/environment-explorer-ui.tsx | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/vm_state.test.ts b/apps/remix-ide-e2e/src/tests/vm_state.test.ts index 0fa93e55fc..1590e6fd5f 100644 --- a/apps/remix-ide-e2e/src/tests/vm_state.test.ts +++ b/apps/remix-ide-e2e/src/tests/vm_state.test.ts @@ -66,6 +66,49 @@ const tests = { browser.assert.ok(content.indexOf(`"blocks":`) !== -1) }) }, + 'Should show fork states provider in environment explorer & make txs using forked state #group1': function (browser: NightwatchBrowser) { + browser + .clickLaunchIcon('udapp') + .waitForElementVisible('[data-id="settingsSelectEnvOptions"]') + .click('[data-id="settingsSelectEnvOptions"] button') + .waitForElementVisible(`[data-id="dropdown-item-another-chain"]`) + .click(`[data-id="dropdown-item-another-chain"]`) + .assert.visible('[data-id="remixUIGSDeploy to an In-browser Forked State."]') + .assert.elementPresent('[data-id="remixUIGSforkedState_1"]') + .assert.elementPresent('[data-id="vm-fs-forkedState_1-pinned"]') + .assert.containsText('[data-id="vm-fs-forkedState_1desc"]', 'Latest Block: 2') + .assert.not.elementPresent('[data-id="remixUIGSforkedState_2"]') + .switchEnvironment('vm-cancun') + .openFile('contracts/1_Storage.sol') + .verifyContracts(['Storage']) + .clickLaunchIcon('udapp') + .click('*[data-id="Deploy - transact (not payable)"]') + .click('*[data-id="fork-state-icon"]') + .waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]') + .click('input[data-id="modalDialogForkState"]') + .setValue('input[data-id="modalDialogForkState"]', 'forkedState_2') + .modalFooterOKClick('udappNotify') + .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) + .assert.containsText('*[data-shared="tooltipPopup"]', `VM state 'forkedState_2' forked and selected as current envionment.`) + // check if 'forkedState_2' is selected as current envionment + .assert.elementPresent('*[data-id="selected-provider-vm-fs-forkedState_2"]') + // check if 'forkedState_2' is present in envionment explorer + .assert.elementPresent('[data-id="remixUIGSforkedState_2"]') + // check if 'forkedState_2' is pinned in envionment explorer + .assert.elementPresent('[data-id="vm-fs-forkedState_2-pinned"]') + // 'forkedState_2' should have 3 blocks + .assert.containsText('[data-id="vm-fs-forkedState_2desc"]', 'Latest Block: 3') + .click('*[data-id="Deploy - transact (not payable)"]') + .clickInstance(0) + .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"555"' }) + // block number should be 5 after 2 txs + .testFunction('last', + { + status: '0x1 Transaction mined and execution succeed', + 'block number': '5', + 'decoded input': { 'uint256 num': '555' } + }) + } } module.exports = { diff --git a/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx b/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx index a76c319c5b..e52587db3a 100644 --- a/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx +++ b/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx @@ -101,7 +101,7 @@ export const EnvironmentExplorerUI = (props: environmentExplorerUIProps) => { await pinStateCallback(provider, pinned) }} > -
{(section.descriptionFn && section.descriptionFn(provider)) || provider.description}
+
{(section.descriptionFn && section.descriptionFn(provider)) || provider.description}
))} From b8833134148d0320c8c93d7f0b7be0ff6a3035ac Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 30 Dec 2024 17:27:45 +0530 Subject: [PATCH 09/43] delete state e2e --- apps/remix-ide-e2e/src/tests/vm_state.test.ts | 33 ++++++++++++++++--- .../src/lib/components/environment.tsx | 4 +-- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/vm_state.test.ts b/apps/remix-ide-e2e/src/tests/vm_state.test.ts index 1590e6fd5f..6932dba2b9 100644 --- a/apps/remix-ide-e2e/src/tests/vm_state.test.ts +++ b/apps/remix-ide-e2e/src/tests/vm_state.test.ts @@ -24,7 +24,7 @@ const tests = { // .assert.elementPresent('*[data-id="fork-state-icon"]') // .click('*[data-id="fork-state-icon"]') // .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) - // .assert.containsText('*[data-shared="tooltipPopup"]', `State not available to fork, as no transactions have been made for selected environment & selected workspace.`) + // .assert.textContains('*[data-shared="tooltipPopup"]', `State not available to fork, as no transactions have been made for selected environment & selected workspace.`) // }, 'Should fork state successfully #group1': function (browser: NightwatchBrowser) { browser @@ -52,7 +52,7 @@ const tests = { .modalFooterOKClick('udappNotify') .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) // check if toaster is shown - .assert.containsText('*[data-shared="tooltipPopup"]', `VM state 'forkedState_1' forked and selected as current envionment.`) + .assert.textContains('*[data-shared="tooltipPopup"]', `VM state 'forkedState_1' forked and selected as current envionment.`) // check if forked state is selected as current envionment .assert.elementPresent('*[data-id="selected-provider-vm-fs-forkedState_1"]') // check if forked state file is created with expected details @@ -76,7 +76,7 @@ const tests = { .assert.visible('[data-id="remixUIGSDeploy to an In-browser Forked State."]') .assert.elementPresent('[data-id="remixUIGSforkedState_1"]') .assert.elementPresent('[data-id="vm-fs-forkedState_1-pinned"]') - .assert.containsText('[data-id="vm-fs-forkedState_1desc"]', 'Latest Block: 2') + .assert.textContains('[data-id="vm-fs-forkedState_1desc"]', 'Latest Block: 2') .assert.not.elementPresent('[data-id="remixUIGSforkedState_2"]') .switchEnvironment('vm-cancun') .openFile('contracts/1_Storage.sol') @@ -89,7 +89,7 @@ const tests = { .setValue('input[data-id="modalDialogForkState"]', 'forkedState_2') .modalFooterOKClick('udappNotify') .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) - .assert.containsText('*[data-shared="tooltipPopup"]', `VM state 'forkedState_2' forked and selected as current envionment.`) + .assert.textContains('*[data-shared="tooltipPopup"]', `VM state 'forkedState_2' forked and selected as current envionment.`) // check if 'forkedState_2' is selected as current envionment .assert.elementPresent('*[data-id="selected-provider-vm-fs-forkedState_2"]') // check if 'forkedState_2' is present in envionment explorer @@ -97,7 +97,7 @@ const tests = { // check if 'forkedState_2' is pinned in envionment explorer .assert.elementPresent('[data-id="vm-fs-forkedState_2-pinned"]') // 'forkedState_2' should have 3 blocks - .assert.containsText('[data-id="vm-fs-forkedState_2desc"]', 'Latest Block: 3') + .assert.textContains('[data-id="vm-fs-forkedState_2desc"]', 'Latest Block: 3') .click('*[data-id="Deploy - transact (not payable)"]') .clickInstance(0) .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"555"' }) @@ -108,6 +108,29 @@ const tests = { 'block number': '5', 'decoded input': { 'uint256 num': '555' } }) + }, + 'Should delete state successfully #group1': function (browser: NightwatchBrowser) { + browser + .switchEnvironment('vm-cancun') + .openFile('contracts/1_Storage.sol') + .verifyContracts(['Storage']) + .clickLaunchIcon('udapp') + .click('*[data-id="Deploy - transact (not payable)"]') + .pause(10000) + .assert.textContains('*[data-id="deployedContractsBadge"]', '1') + .click(('*[data-id="delete-state-icon"]')) + .waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]') + .waitForElementVisible('*[data-id="deleteVmStateModal"]') + .modalFooterOKClick('udappNotify') + .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) + // check if toaster is shown + .assert.textContains('*[data-shared="tooltipPopup"]', `VM state deleted successfully.`) + // check that there are no instances + .assert.textContains('*[data-id="deployedContractsBadge"]', '0') + // check if state file is deleted + .openFile('.states/vm-cancun') + .assert.not.elementPresent('*[data-id="treeViewDivDraggableItem.states/vm-cancun/state.json"]') + } } 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 4e62973efb..e3faf9938e 100644 --- a/libs/remix-ui/run-tab/src/lib/components/environment.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/environment.tsx @@ -30,7 +30,7 @@ export function EnvironmentUI(props: EnvironmentProps) { const forkStatePrompt = (defaultName: string) => { return ( -
+
@@ -47,7 +47,7 @@ export function EnvironmentUI(props: EnvironmentProps) { const deleteVmStatePrompt = () => { return ( -
+
  • From bae1b9a9b7e03fe49207f9699255928fd1563722 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 30 Dec 2024 17:37:34 +0530 Subject: [PATCH 10/43] apply fixes --- apps/remix-ide-e2e/src/tests/vm_state.test.ts | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/vm_state.test.ts b/apps/remix-ide-e2e/src/tests/vm_state.test.ts index 6932dba2b9..69805a6de0 100644 --- a/apps/remix-ide-e2e/src/tests/vm_state.test.ts +++ b/apps/remix-ide-e2e/src/tests/vm_state.test.ts @@ -15,24 +15,36 @@ const tests = { 'Should show fork and delete VM state icons #group1': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('udapp') - .assert.elementPresent('*[data-id="selected-provider-vm-cancun"]') - .assert.elementPresent('*[data-id="fork-state-icon"]') - .assert.elementPresent('*[data-id="delete-state-icon"]') + .waitForElementVisible('*[data-id="selected-provider-vm-cancun"]') + .waitForElementVisible('*[data-id="fork-state-icon"]') + .waitForElementVisible('*[data-id="delete-state-icon"]') + }, + 'Should show toaster while trying fork and delete VM state without state #group1': function (browser: NightwatchBrowser) { + browser + .waitForElementVisible('*[data-id="fork-state-icon"]') + .click('*[data-id="fork-state-icon"]') + .waitForElementVisible( + { + selector: "//*[@data-shared='tooltipPopup' and contains(.,'State not available to fork')]", + locateStrategy: 'xpath' + } + ) + .waitForElementVisible('*[data-id="delete-state-icon"]') + .click('*[data-id="delete-state-icon"]') + .waitForElementVisible( + { + selector: "//*[@data-shared='tooltipPopup' and contains(.,'State not available to delete')]", + locateStrategy: 'xpath' + } + ) }, - // 'Should show toaster while trying fork and delete VM state without state #group1': function (browser: NightwatchBrowser) { - // browser - // .assert.elementPresent('*[data-id="fork-state-icon"]') - // .click('*[data-id="fork-state-icon"]') - // .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) - // .assert.textContains('*[data-shared="tooltipPopup"]', `State not available to fork, as no transactions have been made for selected environment & selected workspace.`) - // }, 'Should fork state successfully #group1': function (browser: NightwatchBrowser) { browser .openFile('contracts') .openFile('contracts/1_Storage.sol') .verifyContracts(['Storage']) .clickLaunchIcon('udapp') - .click('*[data-id="Deploy - transact (not payable)"]') + .click('[data-id="Deploy - transact (not payable)"]') .clickInstance(0) .clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"55"' }) .testFunction('last', @@ -50,9 +62,13 @@ const tests = { .click('input[data-id="modalDialogForkState"]') .setValue('input[data-id="modalDialogForkState"]', 'forkedState_1') .modalFooterOKClick('udappNotify') - .waitForElementVisible('*[data-shared="tooltipPopup"]', 10000) - // check if toaster is shown - .assert.textContains('*[data-shared="tooltipPopup"]', `VM state 'forkedState_1' forked and selected as current envionment.`) + // check toaster for forked state + .waitForElementVisible( + { + selector: '//*[@data-shared="tooltipPopup" and contains(.,"VM state \'forkedState_1\' forked")]', + locateStrategy: 'xpath' + } + ) // check if forked state is selected as current envionment .assert.elementPresent('*[data-id="selected-provider-vm-fs-forkedState_1"]') // check if forked state file is created with expected details @@ -130,7 +146,6 @@ const tests = { // check if state file is deleted .openFile('.states/vm-cancun') .assert.not.elementPresent('*[data-id="treeViewDivDraggableItem.states/vm-cancun/state.json"]') - } } From 66dd58499e6dc3a19a7b283695bf6d8786295d71 Mon Sep 17 00:00:00 2001 From: Aniket <30843294+Aniket-Engg@users.noreply.github.com> Date: Thu, 2 Jan 2025 13:27:56 +0530 Subject: [PATCH 11/43] Update environment-explorer-ui.tsx --- .../src/lib/components/environment-explorer-ui.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx b/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx index e52587db3a..cc8f307617 100644 --- a/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx +++ b/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx @@ -101,7 +101,7 @@ export const EnvironmentExplorerUI = (props: environmentExplorerUIProps) => { await pinStateCallback(provider, pinned) }} > -
    {(section.descriptionFn && section.descriptionFn(provider)) || provider.description}
    +
    {(section.descriptionFn && section.descriptionFn(provider)) || provider.description}
    ))} @@ -110,4 +110,4 @@ export const EnvironmentExplorerUI = (props: environmentExplorerUIProps) => { ) -} \ No newline at end of file +} From 1425d5b4dfbd31900edc5185567c39a3394fe646 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 2 Jan 2025 19:26:03 +0530 Subject: [PATCH 12/43] fix VM listing --- .../src/lib/components/environment-explorer-ui.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx b/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx index cc8f307617..0bd67a5c18 100644 --- a/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx +++ b/libs/remix-ui/environment-explorer/src/lib/components/environment-explorer-ui.tsx @@ -15,7 +15,7 @@ const defaultSections: environmentExplorerUIGridSections = { title: 'Deploy to an In-browser Virtual Machine.', keywords: ['Remix VMs'], providers: [], - filterFn: (provider) => provider.isVM + filterFn: (provider) => provider.isVM && !provider.isForkedVM }, 'Forked States': { title: 'Deploy to an In-browser Forked State.', From 0360ee6614ed4a33845d7d549d03c5fdd4e781c3 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 2 Jan 2025 19:20:31 +0530 Subject: [PATCH 13/43] fixes ABI loading --- libs/remix-ui/run-tab/src/lib/actions/deploy.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts index 2c2ee360c4..086dc76dfe 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts @@ -26,6 +26,8 @@ const loadContractFromAddress = (plugin: RunTab, address, confirmCb, cb) => { confirmCb(() => { let abi try { + const fileContent = plugin.editor.currentContent() + if (!Array.isArray(fileContent)) return cb('ABI should be an array object.') abi = JSON.parse(plugin.editor.currentContent()) } catch (e) { return cb('Failed to parse the current file as JSON ABI.') From 101a19184fc45d551e725c67c6e5283bc1ea0b75 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 3 Jan 2025 16:12:41 +0530 Subject: [PATCH 14/43] check after --- apps/remix-ide/src/app/editor/editor.js | 1 - libs/remix-ui/run-tab/src/lib/actions/deploy.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index 8072258c77..b5f763db62 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -5,7 +5,6 @@ import { EditorUI } from '@remix-ui/editor' // eslint-disable-line import { Plugin } from '@remixproject/engine' import * as packageJson from '../../../../../package.json' import { PluginViewWrapper } from '@remix-ui/helper' -import { commitChange } from '@remix-ui/git' const EventManager = require('../../lib/events') diff --git a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts index 086dc76dfe..dfdf4e1625 100644 --- a/libs/remix-ui/run-tab/src/lib/actions/deploy.ts +++ b/libs/remix-ui/run-tab/src/lib/actions/deploy.ts @@ -26,9 +26,8 @@ const loadContractFromAddress = (plugin: RunTab, address, confirmCb, cb) => { confirmCb(() => { let abi try { - const fileContent = plugin.editor.currentContent() - if (!Array.isArray(fileContent)) return cb('ABI should be an array object.') abi = JSON.parse(plugin.editor.currentContent()) + if (!Array.isArray(abi)) return cb('ABI should be an array object.') } catch (e) { return cb('Failed to parse the current file as JSON ABI.') } From d0fc2f57a811477238a6ad78f2b2d1a6ab2bacc6 Mon Sep 17 00:00:00 2001 From: hsy822 Date: Thu, 2 Jan 2025 14:03:11 +0900 Subject: [PATCH 15/43] feat: Integrate Linea chain in deployment environments --- apps/remix-ide/src/app/udapp/run-tab.tsx | 5 ++++- apps/remix-ide/src/assets/img/linea_chain.png | Bin 0 -> 7021 bytes 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 apps/remix-ide/src/assets/img/linea_chain.png diff --git a/apps/remix-ide/src/app/udapp/run-tab.tsx b/apps/remix-ide/src/app/udapp/run-tab.tsx index 600d4f79f0..f63b81e55c 100644 --- a/apps/remix-ide/src/app/udapp/run-tab.tsx +++ b/apps/remix-ide/src/app/udapp/run-tab.tsx @@ -160,13 +160,15 @@ export class RunTab extends ViewPlugin { 'injected-metamask-gnosis': 'Deploy to Gnosis through the Metamask browser extension.', 'injected-metamask-arbitrum': 'Deploy to Arbitrum through the Metamask browser extension.', 'injected-metamask-sepolia': 'Deploy to the Sepolia testnet through the Metamask browser extension.', - 'injected-metamask-ephemery': 'Deploy to the Ephemery testnet through the Metamask browser extension.' + 'injected-metamask-ephemery': 'Deploy to the Ephemery testnet through the Metamask browser extension.', + 'injected-metamask-linea': 'Deploy to Linea through the Metamask browser extension.' } const logos = { 'injected-metamask-optimism': ['assets/img/optimism-ethereum-op-logo.png', 'assets/img/metamask.png'], 'injected-metamask-arbitrum': ['assets/img/arbitrum-arb-logo.png', 'assets/img/metamask.png'], 'injected-metamask-gnosis': ['assets/img/gnosis_chain.png', 'assets/img/metamask.png'], + 'injected-metamask-linea': ['assets/img/linea_chain.png', 'assets/img/metamask.png'], 'injected-metamask-sepolia': ['assets/img/metamask.png'], 'injected-metamask-ephemery': ['assets/img/metamask.png'], 'injected-MetaMask': ['assets/img/metamask.png'], @@ -243,6 +245,7 @@ export class RunTab extends ViewPlugin { "decimals": 18 }) */ + await addCustomInjectedProvider(11, event, 'injected-metamask-linea', 'L2 - Linea', '0xe708', ['https://rpc.linea.build']) } } diff --git a/apps/remix-ide/src/assets/img/linea_chain.png b/apps/remix-ide/src/assets/img/linea_chain.png new file mode 100644 index 0000000000000000000000000000000000000000..cd527f52e90da24cf00902ed309fa3b03f65de2b GIT binary patch literal 7021 zcmeHMX;hPE7XBbWP=uhCMKA$Ng|?`S%2I(~5S1zopeV$$Dk{jXvcw1>Y5_Nl78MHu zv5u%o47jk%CMs40g2*C^kv)JAl`V#C?n~#KnKNh3nLpEi{K$dteeZkkeV@BM`EthD z(Oz|-&O!{sRJZ-Oc_)V9NbuRHtOP6GFBR^=p9Nt*?m3EKtG1($Tofamieb8X+cw+o zqF*0s-x$;s#jN}^k=ChZYd(yfliOf-@o%}|t62NF9`X4LuRkbb@v11AcNk0R6~9|; zr=hXn+Qrk`ukJs+%TL+ivbsk6FXmU@U)?2t{<7}L^TlOh&tEL7v9tVU^XOT%S>||^ zNF?d2^sQpiRs24VOn#X-r>E&S$x`r`a{VK$b^e0KFm)qq3}gM! zA%|g47Z5N^-;oYmho9gu?DV|oJOc9w%p>r>5Ezcjgic~vIhu$!vzmyht}$u&(6+NZ z!=20Jy02HskNM77#t#DE>h4n|wx4F=F~N zlrf*__LMz$`gI8djqP!TMS_HhU-DUZ4WR|tn^-@FN}ab9G+@_t}3FxB6P4V&Wg%@edokXiRGt8NB3-w z6;fsBlF`PCdN-YUyC#g^NQw1M+fZD&B3v8<{uGwq`z=n^7ggFn;Ld&hd?NVnxxR@O zrea#Z%p^4(!=!^XUimJiGu6B6J}s}e&}%eK5H#K*lms)rdcTYhcTPx2bLWbtX9y>6 zs&-B0zOk3+g^lAZ6Ewi^W;a1ilW_w7$fH16Z-uNu6ysWNK{6#T{J0eEKv9*-rg4|YTYbFooRo)()Cd@XEeoO9w+l{q$)sOk_cww7_ z?#+5zaEsylxk}dA5?z0D^zSBu>L%SJ@3RE|iytvoJjw(&HP3skQCcaaTesUwik!2S z%W4bFx_`5;f9@ybfV?7C`9!yzPuZ&mWz_ci!x>X|g% zA`ndz8kUf-?5zj;u3CT9e6wbQzZ%cb8uLkP-q+AN6}=Z_E&l{WZ!Wtl^~GIP6MRP5 z_uvN&R}vq(h*=}F0b9KNIlf&|>1VQqhixi4^Q$h~TytZnKO5q^oBk;O!-)db-q-ji zxRw>5UPIuKHW5;(^iWC*+GK^~PX=4)*7r5_rjq0eFTfe|>YCLJLq#f7wk@tC-&_*l z>3<0=Qw#nGuq!&!z{Nk>1lXlcbr#%T;N+i(_L>hqgA=*#wkn|UQF#D<_io5ybFzH6 zD!3S&-|1@ba>!M<5ItNg>36U|+ou2AUj4bs&}o&8m%x2}jjU`tT+qL+$<>N}Rz2>@ zViG3&+B^SP%D?^JGW6RFYXj(t0KI?Za%{zdhAf`iPe)e%ttzBnjWc~gaNSA%zu0{Ijf!5zw znNyC>DQLKBUG>Obp`!qv{*%(tR=D-cKaxO?W;vQ#X0ZAwTxrPaWBDSd)a6c^}|uVEl_^O8y!Dg)Xkv7E1yd3YJ1?$!aPaBRT=* zD$w8|OdMk<3f68NZD}gp_X03Xj-udA&mR6SZSU+uMMC>)c>E1#9<$}b{~)6FeE=YeTY zTQGeth}UrlZ%tA*{u<0}Vb*mYaxL>YFeiEz?=&)t{zSF;$6No}t zVOtuuGq>H=7>SmT>u|Yhj>^uo?@%ge>nR9?FKy`oHvyve8DH(P0IlArC>A~ad@G zirlnnhwiPvJpnV?8R>l8eW^nhKCs(8t7Wv?x)Po;?d6!LO6;cT!@j>?(1Xm`QTVde zD5`0!*64a4OU(c_D}Z6#wwY#oyHC?EAg~(zmO?rV!{KyPa9Y};(i}mo&5qEFwxJJ| z-Uyo5$z<<6JuEd;@#n6~4(VP>&0>aw*VDDJvzd;Ma~}5ZVD+g(l^j6HBuNvwd&ijX z0M21bb~Ly^A_+og2Azu`aDhi|I6M}P!dKPf>5u6)F~W9Q z1TX%nrFIdW&5k@>p)XYRXf~>S-M21~(szOQM)b5qQ$=)V7~kgPmRiKjPGzY!KphAw z;z($io|3NJq{MR^79jR_yw_=LtU3X>tS!(UTJq5q;JKOkI$GCcUgL=vcf^#Xq6Ohf zkUF|Ta4v&ztI5eErWWSmG|XY(XN*VEzC!Xy*O!Z~H@mla>}sgpd)P;GwWTCDX~-q} z1SAuO%e1~;0`$92u&E8m)w5?CXQxCb!YU|7IBDPYhZ}XzZ{rHU><>a1paaa z^5KgeCT6;1M7zy#Zl&xRLqh4UB>VVO5>CA2367RCIU;JB{vv^AnjiE+pzXpfK{@jC zP3o^j;Lo?m!cldY!cIjY&*onV&m%C8z&rx~4+QeHxC7p)Bq$cl|(2 RgrA Date: Mon, 23 Dec 2024 14:14:23 -0500 Subject: [PATCH 16/43] Update plonk_verifier.sol.ejs --- .../src/templates/rln/templates/plonk_verifier.sol.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ws-templates/src/templates/rln/templates/plonk_verifier.sol.ejs b/libs/remix-ws-templates/src/templates/rln/templates/plonk_verifier.sol.ejs index 963bade7f1..95fe2ba470 100644 --- a/libs/remix-ws-templates/src/templates/rln/templates/plonk_verifier.sol.ejs +++ b/libs/remix-ws-templates/src/templates/rln/templates/plonk_verifier.sol.ejs @@ -4,7 +4,7 @@ This file is generated with [snarkJS](https://github.com/iden3/snarkjs). - snarkJS is a free software: you can redistribute it and/or modify it + snarkJS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. From f6283a8facccc9c4d136c3eb8323a22aad8fa316 Mon Sep 17 00:00:00 2001 From: Danbo <140512416+dannbbb1@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:14:48 -0500 Subject: [PATCH 17/43] Update groth16_verifier.sol.ejs --- .../src/templates/rln/templates/groth16_verifier.sol.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/remix-ws-templates/src/templates/rln/templates/groth16_verifier.sol.ejs b/libs/remix-ws-templates/src/templates/rln/templates/groth16_verifier.sol.ejs index 692aedf612..54a6742bdc 100644 --- a/libs/remix-ws-templates/src/templates/rln/templates/groth16_verifier.sol.ejs +++ b/libs/remix-ws-templates/src/templates/rln/templates/groth16_verifier.sol.ejs @@ -4,7 +4,7 @@ This file is generated with [snarkJS](https://github.com/iden3/snarkjs). - snarkJS is a free software: you can redistribute it and/or modify it + snarkJS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. @@ -162,4 +162,4 @@ contract Groth16Verifier { return(0, 0x20) } } - } \ No newline at end of file + } From a742b42bec867583766a8e580da1b1619f9f9b24 Mon Sep 17 00:00:00 2001 From: Danbo <140512416+dannbbb1@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:15:40 -0500 Subject: [PATCH 18/43] Update .browserslistrc --- apps/vyper/.browserslistrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/vyper/.browserslistrc b/apps/vyper/.browserslistrc index f1d12df4fa..2f1ad55c32 100644 --- a/apps/vyper/.browserslistrc +++ b/apps/vyper/.browserslistrc @@ -10,7 +10,7 @@ last 1 Chrome version last 1 Firefox version last 2 Edge major versions -last 2 Safari major version +last 2 Safari major versions last 2 iOS major versions Firefox ESR -not IE 9-11 # For IE 9-11 support, remove 'not'. \ No newline at end of file +not IE 9-11 # For IE 9-11 support, remove 'not'. From b499dee861c58cafe00598a50fd7bd79474aef22 Mon Sep 17 00:00:00 2001 From: planetBoy <140164174+Guayaba221@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:02:06 +0100 Subject: [PATCH 19/43] Update util.ts --- libs/remix-debug/src/solidity-decoder/types/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-debug/src/solidity-decoder/types/util.ts b/libs/remix-debug/src/solidity-decoder/types/util.ts index a8d78b3acd..aec2849227 100644 --- a/libs/remix-debug/src/solidity-decoder/types/util.ts +++ b/libs/remix-debug/src/solidity-decoder/types/util.ts @@ -38,7 +38,7 @@ export function extractHexByteSlice (slotValue, byteLength, offsetFromLSB) { } /** - * @returns a hex encoded storage content at the given @arg location. it does not have Ox prefix but always has the full length. + * @returns a hex encoded storage content at the given @arg location. it does not have 0x prefix but always has the full length. * * @param {Object} location - object containing the slot and offset of the data to extract. * @param {Object} storageResolver - storage resolver From f46655c0376c67d21e00c7ce82c5eb7412283d20 Mon Sep 17 00:00:00 2001 From: planetBoy <140164174+Guayaba221@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:03:55 +0100 Subject: [PATCH 20/43] Update compiler-artefacts.ts --- libs/remix-core-plugin/src/lib/compiler-artefacts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts index ec5e5e57fb..258ee64cb3 100644 --- a/libs/remix-core-plugin/src/lib/compiler-artefacts.ts +++ b/libs/remix-core-plugin/src/lib/compiler-artefacts.ts @@ -101,7 +101,7 @@ export class CompilerArtefacts extends Plugin { * Get a particular contract output/artefacts from a compiler output of a Solidity file compilation * @param compilerOutput compiler output * @param contractName contract name - * @returns arefacts object, with fully qualified name (e.g; contracts/1_Storage.sol:Storage) as key + * @returns artefacts object, with fully qualified name (e.g; contracts/1_Storage.sol:Storage) as key */ _getAllContractArtefactsfromOutput(compilerOutput, contractName) { const contractArtefacts = {} From 27629845f2b7294c1c66ae118067e7a1781ca8f9 Mon Sep 17 00:00:00 2001 From: Marson Kotovi4 <137284002+MarsonKotovi4@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:49:49 +0200 Subject: [PATCH 21/43] Update README.md --- apps/remixdesktop/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remixdesktop/README.md b/apps/remixdesktop/README.md index e854386a6a..9a48f7c505 100644 --- a/apps/remixdesktop/README.md +++ b/apps/remixdesktop/README.md @@ -4,13 +4,13 @@ ### Running the app locally -In the main repo yarn, then run yarn serve +In the main repo run yarn, then run yarn serve In this directory apps/remixdesktop, yarn, then run: yarn start:dev to boot the electron app Then, the app will be started in live reload mode, and anything you do in Remix IDE will be reloaded. It will not however reload electron code. You need to rerun yarn start:dev every time. -If you run into issues with yarn when native node modules are being rebuilt you need +If you run into issues with yarn when native node modules are being rebuilt, you need - Windows: install Visual Studio Tools with Desktop Development C++ enabled in the Workloads - MacOS: install Xcode or Xcode Command Line Tools. Also make sure the compilers (clang++ | g++) target the right sdk includes, ```export SDKROOT="xcrun --show-sdk-path"``` - Linux: unknown, probably a C++ compiler From 71de19fbe7205555454c6163346cc7f8a886bf65 Mon Sep 17 00:00:00 2001 From: Marson Kotovi4 <137284002+MarsonKotovi4@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:51:26 +0200 Subject: [PATCH 22/43] Update release-process.md --- apps/remix-ide/release-process.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/release-process.md b/apps/remix-ide/release-process.md index 1d9c89a7fa..76d6cb74b4 100644 --- a/apps/remix-ide/release-process.md +++ b/apps/remix-ide/release-process.md @@ -1,9 +1,9 @@ -This document includes: +This document describes: - how to update remix.ethereum.org. - how to update remix-alpha.ethereum.org. - how to release remix IDE. -# remix IDE release +# Remix IDE Release - git fetch origin master - git checkout origin/master @@ -12,7 +12,7 @@ This document includes: - merge PR - git fetch origin master - git checkout origin/master - - git tag v(version-number) + - git tag v - git push --tags - github-changes -o ethereum -r remix-ide -a --only-pulls --use-commit-body --only-merges --between-tags previous_version...next_version - publish a release in github using the changelog @@ -23,7 +23,7 @@ This document includes: - npm publish - after remix_live is updated, drop the zip (from https://github.com/ethereum/remix-live/) to the release. -# remix-ide beta release +# Remix IDE Beta Release - git fetch origin master - git checkout origin/master - git checkout -b bumpVersion @@ -31,7 +31,7 @@ This document includes: - merge PR - git fetch origin master - git checkout origin/master - - git tag v(version-number) (with "vx.x.x-beta.1") + - git tag v (with "vx.x.x-beta.1") - git push --tags - github-changes -o ethereum -r remix-ide -a --only-pulls --use-commit-body --only-merges --between-tags previous_version...next_version - publish a beta release in github using the changelog @@ -41,7 +41,7 @@ This document includes: This is not strictly speaking a release. Updating the remix site is done through the Travis build: - - git co -b remix_live origin/remix_live + - git checkout -b remix_live origin/remix_live - git reset --hard -master-commit-hash- - git push -f origin remix_live From 700c068f8907a7bef71ee4a39890fb88595122da Mon Sep 17 00:00:00 2001 From: Marson Kotovi4 <137284002+MarsonKotovi4@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:55:06 +0200 Subject: [PATCH 23/43] 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 e0a6e78498..462e3a790e 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -16,7 +16,7 @@ jobs: - run: ls - run: pwd - 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_PROJECT_ID }} ${{ secrets.IPFS_PROJECT_SECRET }})" >> $GITHUB_ENV - uses: mshick/add-pr-comment@v1 with: message: | From 3f319dc87b186a5e385e41b1f47af32064415bc4 Mon Sep 17 00:00:00 2001 From: Marson Kotovi4 <137284002+MarsonKotovi4@users.noreply.github.com> Date: Tue, 24 Dec 2024 14:58:04 +0200 Subject: [PATCH 24/43] Update webpack.config.js --- apps/debugger/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/debugger/webpack.config.js b/apps/debugger/webpack.config.js index 4bc648f1db..3c2848f266 100644 --- a/apps/debugger/webpack.config.js +++ b/apps/debugger/webpack.config.js @@ -48,7 +48,7 @@ module.exports = composePlugins(withNx(), (config) => { }) ) - // souce-map loader + // source-map loader config.module.rules.push({ test: /\.js$/, use: ['source-map-loader'], From 07499eaa7f9132c6fcf631583cf314d62397b36b Mon Sep 17 00:00:00 2001 From: Marson Kotovi4 <137284002+MarsonKotovi4@users.noreply.github.com> Date: Tue, 24 Dec 2024 15:04:19 +0200 Subject: [PATCH 25/43] Update circomPluginClient.ts --- apps/circuit-compiler/src/app/services/circomPluginClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/circuit-compiler/src/app/services/circomPluginClient.ts b/apps/circuit-compiler/src/app/services/circomPluginClient.ts index f9421eb528..ff3170f26e 100644 --- a/apps/circuit-compiler/src/app/services/circomPluginClient.ts +++ b/apps/circuit-compiler/src/app/services/circomPluginClient.ts @@ -502,9 +502,9 @@ export class CircomPluginClient extends PluginClient { const exists = await this.call('fileManager', 'exists', path) if (exists) return path - else throw new Error(`Report path ${path} do no exist in the Remix FileSystem`) + else throw new Error(`Report path ${path} does not exist in the Remix FileSystem`) } else { - throw new Error(`Report path ${path} do no exist in the Remix FileSystem`) + throw new Error(`Report path ${path} does not exist in the Remix FileSystem`) } } } From 51eb2131c12930676b6a921a8b11b4e1966f0d5a Mon Sep 17 00:00:00 2001 From: Marson Kotovi4 <137284002+MarsonKotovi4@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:24:52 +0200 Subject: [PATCH 26/43] 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 462e3a790e..e0a6e78498 100644 --- a/.github/workflows/publish-action.yml +++ b/.github/workflows/publish-action.yml @@ -16,7 +16,7 @@ jobs: - run: ls - run: pwd - run: yarn run build:production - - run: echo "action_state=$('./apps/remix-ide/ci/publishIpfs' ${{ secrets.IPFS_PROJECT_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 e1a81bad3f1f6f7c89fa21f37a1fe709312a37fa Mon Sep 17 00:00:00 2001 From: XxAlex74xX <30472093+XxAlex74xX@users.noreply.github.com> Date: Tue, 24 Dec 2024 17:26:27 +0100 Subject: [PATCH 27/43] Update staticAnalysisCommon.ts --- .../src/solidity-analyzer/modules/staticAnalysisCommon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts index 4b4f82d471..c806e3ec1b 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts @@ -179,7 +179,7 @@ function getFunctionCallType (func: FunctionCallAstNode): string { } /** - * Get the variable name written to by a effect node, except for inline assembly because there is no information to find out where we write to. Trows if not a effect node or is inlineassmbly. + * Get the variable name written to by a effect node, except for inline assembly because there is no information to find out where we write to. Throws if not a effect node or is inline assembly. * Example: x = 10; => x * @effectNode {ASTNode} Assignment node * @return {string} variable name written to From 854622a99bffb7a1b7e575ea7600964d76d818fc Mon Sep 17 00:00:00 2001 From: Hack666r Date: Wed, 1 Jan 2025 14:59:12 +0100 Subject: [PATCH 28/43] typo fix udapp.json --- apps/remix-dapp/src/locales/en/udapp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-dapp/src/locales/en/udapp.json b/apps/remix-dapp/src/locales/en/udapp.json index 0badbdc97e..4315f57a59 100644 --- a/apps/remix-dapp/src/locales/en/udapp.json +++ b/apps/remix-dapp/src/locales/en/udapp.json @@ -133,7 +133,7 @@ "udapp.contractCreation": "Contract Creation", "udapp.transactionFee": "Transaction is invalid. Max fee should not be less than Base fee", "udapp.title1": "Represents the part of the tx fee that goes to the miner.", - "udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimun needs to be set to base fee.", + "udapp.title2": "Represents the maximum amount of fee that you will pay for this transaction. The minimum needs to be set to base fee.", "udapp.gasPrice": "Gas price", "udapp.gweiText": "visit {a} for current gas price info.", "udapp.maxTransactionFee": "Max transaction fee", From 64756aaaa7565ebacfda30b19bfcd8f492e42db0 Mon Sep 17 00:00:00 2001 From: Dmitry <98899785+mdqst@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:56:43 +0300 Subject: [PATCH 29/43] docs: Fix grammatical inconsistency Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83722de3d0..e3b742493d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,7 +72,7 @@ import panelJson from './panel.json'; import enJson from '../en'; // There may have some untranslated content. Always fill in the gaps with EN JSON. -// No need for a defaultMessage prop when render a FormattedMessage component. +// No need for a defaultMessage prop when rendering a FormattedMessage component. export default Object.assign({}, enJson, { ...panelJson, }) From 9a2c91a56a94b1f089550bc816cf56d66c9e32e4 Mon Sep 17 00:00:00 2001 From: Fallengirl <155266340+Fallengirl@users.noreply.github.com> Date: Tue, 24 Dec 2024 23:07:38 +0100 Subject: [PATCH 30/43] Update openzeppelin-proxy.ts --- libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts b/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts index 5f16219aa8..a2a50662a6 100644 --- a/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts +++ b/libs/remix-core-plugin/src/lib/openzeppelin-proxy.ts @@ -19,7 +19,7 @@ export class OpenZeppelinProxy extends Plugin { } async isConcerned(ast: ContractAST = {} as ContractAST): Promise { - // check in the AST if it's an upgradable contract + // check in the AST if it's an upgradeable contract const UUPSSymbol = ast.exportedSymbols && ast.exportedSymbols[UUPS] ? ast.exportedSymbols[UUPS][0] : null if (UUPSSymbol) { From 968b1e48ce03c95adbdc7ca1ea0180a5d6e3d531 Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:32:52 +0100 Subject: [PATCH 31/43] typo layout.test.ts --- apps/remix-ide-e2e/src/tests/layout.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/layout.test.ts b/apps/remix-ide-e2e/src/tests/layout.test.ts index 23398171d8..e267c0d5c0 100644 --- a/apps/remix-ide-e2e/src/tests/layout.test.ts +++ b/apps/remix-ide-e2e/src/tests/layout.test.ts @@ -26,7 +26,7 @@ module.exports = { .assert.containsText('.sidepanel h6[data-id="sidePanelSwapitTitle"]', 'SOLIDITY COMPILER') .waitForElementNotVisible('.pinned-panel h6[data-id="sidePanelSwapitTitle"]') }, - 'Should pin a plugin while a another plugin is already pinned': function (browser: NightwatchBrowser) { + 'Should pin a plugin while an another plugin is already pinned': function (browser: NightwatchBrowser) { browser.waitForElementVisible('[data-id="movePluginToRight"]') .click('[data-id="movePluginToRight"]') .waitForElementVisible('[data-id="movePluginToLeft"]') From 6797146f953b0b5c4e1b41dbb60f0d9bd000aaac Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:33:24 +0100 Subject: [PATCH 32/43] typo specialFunctions.test.ts --- apps/remix-ide-e2e/src/tests/specialFunctions.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts b/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts index 0a5942bd07..c9d2145105 100644 --- a/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts +++ b/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts @@ -7,7 +7,7 @@ module.exports = { before: function (browser: NightwatchBrowser, done: VoidFunction) { // this test suite also contribute testing https://github.com/ethereum/remix/pull/1497 and https://github.com/ethereum/remix-ide/pull/2898 // quick explanation: - // the goal of https://github.com/ethereum/remix-ide/pull/2898 is to keep track of all the compiled contracts an not only the last one. + // the goal of https://github.com/ethereum/remix-ide/pull/2898 is to keep track of all the compiled contracts a not only the last one. // this introduce an issue: if 2 compiled contracts have the same name, the second one override the first which is not wanted. // fix's delivered by https://github.com/ethereum/remix/pull/1497: instead of getting contract by name, // which result in name clashing we process the whole contract object (which contain bytecode, deployedbytecode, ...) From a87d8ad4fc89dbb9c9998efcf04ed49cf9c7dbf4 Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:34:05 +0100 Subject: [PATCH 33/43] typo sourceMappings.ts --- libs/remix-astwalker/src/sourceMappings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-astwalker/src/sourceMappings.ts b/libs/remix-astwalker/src/sourceMappings.ts index 69b279d608..70c6c5b90e 100644 --- a/libs/remix-astwalker/src/sourceMappings.ts +++ b/libs/remix-astwalker/src/sourceMappings.ts @@ -8,7 +8,7 @@ export declare interface SourceMappings { } /** - * Turn an character offset into a "LineColPosition". + * Turn a character offset into a "LineColPosition". * * @param offset The character offset to convert. */ From a8df2d35422ce34c8da552b16ff84eb322da4d09 Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:35:19 +0100 Subject: [PATCH 34/43] typo hash.ts --- libs/remix-lib/src/hash.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-lib/src/hash.ts b/libs/remix-lib/src/hash.ts index f1f00eed55..5e79f49ba7 100644 --- a/libs/remix-lib/src/hash.ts +++ b/libs/remix-lib/src/hash.ts @@ -37,7 +37,7 @@ export const keccak256 = function(a: Buffer): Uint8Array { } /** - * Creates Keccak hash of a utf-8 string input + * Creates Keccak hash of an utf-8 string input * @param a The input data (String) * @param bits (number = 256) The Keccak width */ From c1c23505d2c4b760658feb01e820bc9d591ffb43 Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:36:06 +0100 Subject: [PATCH 35/43] typo types.d.ts --- libs/remix-ui/plugin-manager/src/types.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/plugin-manager/src/types.d.ts b/libs/remix-ui/plugin-manager/src/types.d.ts index e7a0b10496..12ca50195e 100644 --- a/libs/remix-ui/plugin-manager/src/types.d.ts +++ b/libs/remix-ui/plugin-manager/src/types.d.ts @@ -20,7 +20,7 @@ export class RemixEngine extends Engine { export function isNative(name: any): any /** * Checks if plugin caller 'from' is allowed to activate plugin 'to' - * The caller can have 'canActivate' as a optional property in the plugin profile. + * The caller can have 'canActivate' as an optional property in the plugin profile. * This is an array containing the 'name' property of the plugin it wants to call. * canActivate = ['plugin1-to-call','plugin2-to-call',....] * or the plugin is allowed by default because it is native From 8771506a3a1b6af392db6e99213b715a08b39726 Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:36:39 +0100 Subject: [PATCH 36/43] typo migrateFileSystem.test.ts --- apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts b/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts index 1022471188..b2f09f0af3 100644 --- a/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts +++ b/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts @@ -101,7 +101,7 @@ module.exports = { browser.assert.equal(content, 'testing') }) }, - 'Should have a artifacts file with JSON test data #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) { + 'Should have an artifacts file with JSON test data #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) .click('*[data-id="treeViewLitreeViewItemtest_contracts/artifacts"]') .openFile('test_contracts/artifacts/Storage_metadata.json') From 63c4d2c627d5c7080d99a293996ac5a6dbca38bd Mon Sep 17 00:00:00 2001 From: Tristav <124001124+Pricstas@users.noreply.github.com> Date: Fri, 27 Dec 2024 20:37:00 +0100 Subject: [PATCH 37/43] typos migrateFileSystem.test.ts --- apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts b/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts index b2f09f0af3..bd5ae67a16 100644 --- a/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts +++ b/apps/remix-ide-e2e/src/tests/migrateFileSystem.test.ts @@ -111,7 +111,7 @@ module.exports = { browser.assert.equal(metadata.test, 'data') }) }, - 'Should have a empty workspace #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) { + 'Should have an empty workspace #group1 #group3 #group5 #group7': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) .switchWorkspace('emptyspace') }, From 97c107a4a9ac3e5a0a4c7bcb24ecfcb66f30474d Mon Sep 17 00:00:00 2001 From: Radovenchyk Date: Sat, 28 Dec 2024 10:40:02 +0200 Subject: [PATCH 38/43] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3b742493d..0f5759403b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.gg/mh9hFCKkEq). +Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.com/invite/nfv6ZYjAeP). ## Development Remix libraries work closely with [Remix IDE](https://remix.ethereum.org). Each library has a README to explain its application. From 22ef3f8fe3c380c00aede284733ce32ca5e978f9 Mon Sep 17 00:00:00 2001 From: Fallengirl <155266340+Fallengirl@users.noreply.github.com> Date: Sat, 28 Dec 2024 12:57:50 +0100 Subject: [PATCH 39/43] Update functionCallGraph.ts --- .../src/solidity-analyzer/modules/functionCallGraph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts b/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts index 017f50e9fa..90c793de89 100644 --- a/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts +++ b/libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts @@ -33,7 +33,7 @@ function buildLocalFuncCallGraphInternal (functions: FunctionHLAst[], nodeFilter * "functions": { * "KingOfTheEtherThrone.claimThrone(string memory)": { // function in KingOfEtherThrone * "node": {...}, // function node as defined in abstractAstView.js - * "calls": { // list of full qualified function names which are called form this function + * "calls": { // list of full qualified function names which are called from this function * } * } * } From bc08fd16def8220135891fdeb830a621dba6d2f4 Mon Sep 17 00:00:00 2001 From: maradini77 <140460067+maradini77@users.noreply.github.com> Date: Sat, 28 Dec 2024 10:35:10 +0100 Subject: [PATCH 40/43] Update streamHandler.ts --- libs/remix-ai-core/src/helpers/streamHandler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remix-ai-core/src/helpers/streamHandler.ts b/libs/remix-ai-core/src/helpers/streamHandler.ts index 9eb5511861..d2e18624b6 100644 --- a/libs/remix-ai-core/src/helpers/streamHandler.ts +++ b/libs/remix-ai-core/src/helpers/streamHandler.ts @@ -58,6 +58,6 @@ export const HandleStreamResponse = async (streamResponse, } } -export const UpdtateChatHistory = (userPromptprompt: string, AIAnswer: string) => { - ChatHistory.pushHistory(userPromptprompt, AIAnswer) -} \ No newline at end of file +export const UpdateChatHistory = (userPrompt: string, AIAnswer: string) => { + ChatHistory.pushHistory(userPrompt, AIAnswer) +} From 58d8308fd9f1b60238f125bbf7b81e3b2be8277f Mon Sep 17 00:00:00 2001 From: maradini77 <140460067+maradini77@users.noreply.github.com> Date: Sat, 28 Dec 2024 10:38:50 +0100 Subject: [PATCH 41/43] Update workspace_git.test.ts --- apps/remix-ide-e2e/src/tests/workspace_git.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace_git.test.ts b/apps/remix-ide-e2e/src/tests/workspace_git.test.ts index c495ce11b8..437d54dbb9 100644 --- a/apps/remix-ide-e2e/src/tests/workspace_git.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace_git.test.ts @@ -434,7 +434,7 @@ module.exports = { .click('*[data-id="saveGitHubCredentials"]') .modalFooterOKClick('github-credentials-error') }, - 'check source controle panel #group5': function (browser: NightwatchBrowser) { + 'check source control panel #group5': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="sourcecontrol-panel"]') .click('*[data-id="sourcecontrol-panel"]') @@ -448,7 +448,7 @@ module.exports = { .clickLaunchIcon('filePanel') .switchWorkspace('default_workspace') }, - 'check source controle panel again #group5': function (browser: NightwatchBrowser) { + 'check source control panel again #group5': function (browser: NightwatchBrowser) { browser .pause(1000) .clickLaunchIcon('dgit') @@ -485,7 +485,7 @@ module.exports = { 'Incorrect content') }) }, - 'check source controle panel for uniswap #group5': function (browser: NightwatchBrowser) { + 'check source control panel for uniswap #group5': function (browser: NightwatchBrowser) { browser .pause(5000) .clickLaunchIcon('dgit') From 4dd3f34a34b1367ea95cd302f42e64b55a4921d0 Mon Sep 17 00:00:00 2001 From: witty <131909329+0xwitty@users.noreply.github.com> Date: Thu, 26 Dec 2024 12:00:30 +0300 Subject: [PATCH 42/43] docs: Typo corrected Update webpack.config.js --- apps/doc-viewer/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/doc-viewer/webpack.config.js b/apps/doc-viewer/webpack.config.js index b21898ae87..e35074deef 100644 --- a/apps/doc-viewer/webpack.config.js +++ b/apps/doc-viewer/webpack.config.js @@ -28,7 +28,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => { new webpack.DefinePlugin({}) ) - // souce-map loader + // source-map loader config.module.rules.push({ test: /\.js$/, use: ['source-map-loader'], From 692f8933f0bea5744a6e424385c89e08746cb3a8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Fri, 3 Jan 2025 11:48:03 +0100 Subject: [PATCH 43/43] fix_logs --- apps/remix-ide-e2e/src/tests/terminal.test.ts | 69 +++++++++++++++++++ libs/remix-lib/src/execution/logsManager.ts | 16 ++++- libs/remix-simulator/test/events.ts | 17 +++-- 3 files changed, 97 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 1d9292b50c..7d7092431f 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -195,6 +195,34 @@ module.exports = { .journalChildIncludes('inside getOwner', { shouldHaveOnlyOneOccurence: true }) }, + 'Emit 2 similar events and check the filtering is done properly #group4': function (browser: NightwatchBrowser) { + let addressRef: string + browser + .addFile('contracts/contract_with_event.sol', { content: contract_with_event }) + .pause(1000) + .openFile('contracts/contract_with_event.sol') + .clickLaunchIcon('solidity') + .click('*[data-id="compilerContainerCompileBtn"]') + .clickLaunchIcon('udapp') + .click('*[data-id="deployAndRunClearInstances"]') + .selectContract('Example') + .createContract('') + .getAddressAtPosition(0, (address) => { + addressRef = address + }) + .perform((done) => { + browser.addFile('scripts/test_filtering_event.ts', { content: test_filtering_event.replace('
    ', addressRef) }) + .perform(() => done()) + }) + .executeScriptInTerminal('remix.execute(\'scripts/test_filtering_event.ts\')') + .pause(1000) + .waitForElementContainsText('*[data-id="terminalJournal"]', '1') + .waitForElementContainsText('*[data-id="terminalJournal"]', 'true') + .executeScriptInTerminal('remix.execute(\'scripts/test_filtering_event.ts\')') // re-emit the event + .waitForElementContainsText('*[data-id="terminalJournal"]', '2') + .waitForElementContainsText('*[data-id="terminalJournal"]', 'false') + }, + 'Should display auto-complete menu #group4': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="terminalCli"]') @@ -834,4 +862,45 @@ const scriptBlockAndTransaction = ` })() ` +const contract_with_event = ` +// SPDX-License-Identifier: MIT + +pragma solidity >=0.8.2 <0.9.0; + +contract Example { + event TextMessage(address indexed, string); + + function broadcastText(string calldata text, address dest) external { + emit TextMessage(dest, text); + } +} +` + +const test_filtering_event = ` +import { ethers } from 'ethers' // the version is v^5 + +const test = async (accountIndex?: number) => { + const signer = (new ethers.providers.Web3Provider(web3Provider)).getSigner(accountIndex) + const contract = new ethers.Contract(contractAddr, contractABI, signer) + await Promise.all(dest.map(a => contract.broadcastText('hi!', a))) // here emit 2 logs with unique address + const filter = contract.filters.TextMessage(dest[1]) // here request one address + + const logs = await contract.queryFilter(filter) + console.log(logs.length, logs.length === 1) // expected one, but actually two +} + +const contractAddr = '
    ' +const contractABI = [ + 'event TextMessage(address indexed, string)', + 'function broadcastText(string text, address dest)', +] + +const dest = [ + '0x27b07C05B74c45C8EBfc970aeF6B32180065e801', + '0xF2404a336381b2138b8D573e7F6b80445cc5F024', +] + +test() +` + const byteCodeInSepolia = `0x6080604052600436106102ae5760003560e01c80637edb2c8111610175578063ba1842c5116100dc578063d2241c2711610095578063f2fde38b1161006f578063f2fde38b14610ab2578063f31b5b3314610adb578063f5839de114610af7578063f69b1b2914610b13576102ae565b8063d2241c2714610a21578063d5abeb0114610a4a578063e985e9c514610a75576102ae565b8063ba1842c5146108fd578063ba70e07514610926578063bd32fb6614610951578063c062977d1461097a578063c7eb4522146109bb578063c87b56dd146109e4576102ae565b8063a0bcfc7f1161012e578063a0bcfc7f14610803578063a22cb4651461082c578063aa98e0c614610855578063b37ee32814610880578063b61aa0e214610897578063b88d4fde146108d4576102ae565b80637edb2c811461070757806383b043e8146107305780638da5cb5b14610759578063938e15d51461078457806395d89b41146107ad5780639abc8320146107d8576102ae565b806342966c68116102195780636c302394116101d25780636c302394146105e75780636f8b44b01461062457806370a082311461064d578063715018a61461068a57806375fea21b146106a15780637696e088146106de576102ae565b806342966c68146104b5578063438b6300146104de578063451cadf61461051b578063474ffc47146105445780634f6ccce71461056d5780636352211e146105aa576102ae565b806318160ddd1161026b57806318160ddd146103c857806323b872dd146103f35780632f745c591461041c5780633ca81826146104595780633ccfd60b1461047557806342842e0e1461048c576102ae565b806301ffc9a7146102b357806306fdde03146102f0578063078a4cae1461031b578063081812fc14610337578063095ea7b314610374578063160e84321461039d575b600080fd5b3480156102bf57600080fd5b506102da60048036038101906102d59190613f85565b610b3e565b6040516102e79190613fcd565b60405180910390f35b3480156102fc57600080fd5b50610305610b50565b6040516103129190614078565b60405180910390f35b61033560048036038101906103309190614135565b610be2565b005b34801561034357600080fd5b5061035e60048036038101906103599190614195565b610ef5565b60405161036b9190614203565b60405180910390f35b34801561038057600080fd5b5061039b6004803603810190610396919061424a565b610f3b565b005b3480156103a957600080fd5b506103b2611052565b6040516103bf91906142a3565b60405180910390f35b3480156103d457600080fd5b506103dd611058565b6040516103ea91906142cd565b60405180910390f35b3480156103ff57600080fd5b5061041a600480360381019061041591906142e8565b611065565b005b34801561042857600080fd5b50610443600480360381019061043e919061424a565b6110c5565b60405161045091906142cd565b60405180910390f35b610473600480360381019061046e9190614135565b61116a565b005b34801561048157600080fd5b5061048a61147e565b005b34801561049857600080fd5b506104b360048036038101906104ae91906142e8565b611521565b005b3480156104c157600080fd5b506104dc60048036038101906104d79190614195565b611541565b005b3480156104ea57600080fd5b506105056004803603810190610500919061433b565b6115da565b6040516105129190614426565b60405180910390f35b34801561052757600080fd5b50610542600480360381019061053d9190614586565b611688565b005b34801561055057600080fd5b5061056b600480360381019061056691906145e2565b61177e565b005b34801561057957600080fd5b50610594600480360381019061058f9190614195565b6117a5565b6040516105a191906142cd565b60405180910390f35b3480156105b657600080fd5b506105d160048036038101906105cc9190614195565b611816565b6040516105de9190614203565b60405180910390f35b3480156105f357600080fd5b5061060e6004803603810190610609919061433b565b61189c565b60405161061b9190613fcd565b60405180910390f35b34801561063057600080fd5b5061064b60048036038101906106469190614195565b611946565b005b34801561065957600080fd5b50610674600480360381019061066f919061433b565b611958565b60405161068191906142cd565b60405180910390f35b34801561069657600080fd5b5061069f611a0f565b005b3480156106ad57600080fd5b506106c860048036038101906106c39190614195565b611a23565b6040516106d59190614203565b60405180910390f35b3480156106ea57600080fd5b50610705600480360381019061070091906145e2565b611a62565b005b34801561071357600080fd5b5061072e600480360381019061072991906145e2565b611a89565b005b34801561073c57600080fd5b506107576004803603810190610752919061464e565b611ab0565b005b34801561076557600080fd5b5061076e611ac2565b60405161077b9190614203565b60405180910390f35b34801561079057600080fd5b506107ab60048036038101906107a69190614730565b611aec565b005b3480156107b957600080fd5b506107c2611b8c565b6040516107cf9190614078565b60405180910390f35b3480156107e457600080fd5b506107ed611c1e565b6040516107fa9190614078565b60405180910390f35b34801561080f57600080fd5b5061082a600480360381019061082591906147d9565b611cac565b005b34801561083857600080fd5b50610853600480360381019061084e919061484e565b611cc7565b005b34801561086157600080fd5b5061086a611cdd565b60405161087791906142a3565b60405180910390f35b34801561088c57600080fd5b50610895611ce3565b005b3480156108a357600080fd5b506108be60048036038101906108b9919061433b565b611cfb565b6040516108cb91906142cd565b60405180910390f35b3480156108e057600080fd5b506108fb60048036038101906108f6919061492f565b611d13565b005b34801561090957600080fd5b50610924600480360381019061091f91906145e2565b611d75565b005b34801561093257600080fd5b5061093b611d9c565b60405161094891906142a3565b60405180910390f35b34801561095d57600080fd5b506109786004803603810190610973919061464e565b611da2565b005b34801561098657600080fd5b506109a1600480360381019061099c9190614195565b611db4565b6040516109b29594939291906149b2565b60405180910390f35b3480156109c757600080fd5b506109e260048036038101906109dd919061433b565b611e72565b005b3480156109f057600080fd5b50610a0b6004803603810190610a069190614195565b611ebe565b604051610a189190614078565b60405180910390f35b348015610a2d57600080fd5b50610a486004803603810190610a43919061464e565b611f26565b005b348015610a5657600080fd5b50610a5f611f38565b604051610a6c91906142cd565b60405180910390f35b348015610a8157600080fd5b50610a9c6004803603810190610a979190614a0c565b611f3e565b604051610aa99190613fcd565b60405180910390f35b348015610abe57600080fd5b50610ad96004803603810190610ad4919061433b565b611fd2565b005b610af56004803603810190610af09190614195565b612055565b005b610b116004803603810190610b0c9190614135565b6122d3565b005b348015610b1f57600080fd5b50610b286125e7565b604051610b359190614203565b60405180910390f35b6000610b498261260d565b9050919050565b606060008054610b5f90614a7b565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8b90614a7b565b8015610bd85780601f10610bad57610100808354040283529160200191610bd8565b820191906000526020600020905b815481529060010190602001808311610bbb57829003601f168201915b5050505050905090565b8282600e54610c59838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508233604051602001610c3e9190614af4565b60405160208183030381529060405280519060200120612687565b610c98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8f90614b81565b60405180910390fd5b610ca13361189c565b15610ce1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd890614bed565b60405180910390fd5b600084600d5481610cf0611058565b610cfa9190614c3c565b1115610d3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3290614cbc565b60405180910390fd5b600081118015610d61575060116000838152602001908152602001600020600201548111155b610da0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9790614d28565b60405180910390fd5b42601160008481526020019081526020016000206003015411158015610ddb5750426011600084815260200190815260200160002060040154115b610e1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1190614d94565b60405180910390fd5b856011600080815260200190815260200160002060010154610e3c9190614db4565b341015610e7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7590614e42565b60405180910390fd5b610e88338761269e565b6014339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505050565b6000610f00826126de565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610f4682611816565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fad90614ed4565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610fd5612729565b73ffffffffffffffffffffffffffffffffffffffff161480611004575061100381610ffe612729565b611f3e565b5b611043576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103a90614f66565b60405180910390fd5b61104d8383612731565b505050565b600e5481565b6000600880549050905090565b611076611070612729565b826127ea565b6110b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ac90614ff8565b60405180910390fd5b6110c083838361287f565b505050565b60006110d083611958565b8210611111576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111089061508a565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b82826010546111e1838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505082336040516020016111c69190614af4565b60405160208183030381529060405280519060200120612687565b611220576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161121790614b81565b60405180910390fd5b6112293361189c565b15611269576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126090614bed565b60405180910390fd5b600284600d5481611278611058565b6112829190614c3c565b11156112c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112ba90614cbc565b60405180910390fd5b6000811180156112e9575060116000838152602001908152602001600020600201548111155b611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f90614d28565b60405180910390fd5b426011600084815260200190815260200160002060030154111580156113635750426011600084815260200190815260200160002060040154115b6113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139990614d94565b60405180910390fd5b856011600060028152602001908152602001600020600101546113c59190614db4565b341015611407576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fe90614e42565b60405180910390fd5b611411338761269e565b6014339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505050565b611486612b78565b6000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16476040516114ce906150db565b60006040518083038185875af1925050503d806000811461150b576040519150601f19603f3d011682016040523d82523d6000602084013e611510565b606091505b505090508061151e57600080fd5b50565b61153c83838360405180602001604052806000815250611d13565b505050565b61155261154c612729565b826127ea565b8061158f5750611560611ac2565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6115ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c590614ff8565b60405180910390fd5b6115d781612bf6565b50565b606060006115e783611958565b905060008167ffffffffffffffff81111561160557611604614448565b5b6040519080825280602002602001820160405280156116335781602001602082028036833780820191505090505b50905060005b8281101561167d5761164b85826110c5565b82828151811061165e5761165d6150f0565b5b60200260200101818152505080806116759061511f565b915050611639565b508092505050919050565b611690612b78565b600d548151836116a09190614db4565b6116a8611058565b6116b29190614c3c565b11156116f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ea90614cbc565b60405180910390fd5b60008211611736576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172d90614d28565b60405180910390fd5b60005b815181101561177957611766828281518110611758576117576150f0565b5b60200260200101518461269e565b80806117719061511f565b915050611739565b505050565b611786612b78565b8060116000848152602001908152602001600020600401819055505050565b60006117af611058565b82106117f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e7906151d9565b60405180910390fd5b60088281548110611804576118036150f0565b5b90600052602060002001549050919050565b60008061182283612d44565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188a90615245565b60405180910390fd5b80915050919050565b6000805b60148054905081101561193b578273ffffffffffffffffffffffffffffffffffffffff16601482815481106118d8576118d76150f0565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603611928576001915050611941565b80806119339061511f565b9150506118a0565b50600090505b919050565b61194e612b78565b80600d8190555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036119c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119bf906152d7565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611a17612b78565b611a216000612d81565b565b60148181548110611a3357600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611a6a612b78565b8060116000848152602001908152602001600020600101819055505050565b611a91612b78565b8060116000848152602001908152602001600020600301819055505050565b611ab8612b78565b8060108190555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611af4612b78565b84601160008881526020019081526020016000206000019081611b1791906154a3565b50836011600088815260200190815260200160002060010181905550826011600088815260200190815260200160002060020181905550816011600088815260200190815260200160002060030181905550806011600088815260200190815260200160002060040181905550505050505050565b606060018054611b9b90614a7b565b80601f0160208091040260200160405190810160405280929190818152602001828054611bc790614a7b565b8015611c145780601f10611be957610100808354040283529160200191611c14565b820191906000526020600020905b815481529060010190602001808311611bf757829003601f168201915b5050505050905090565b600c8054611c2b90614a7b565b80601f0160208091040260200160405190810160405280929190818152602001828054611c5790614a7b565b8015611ca45780601f10611c7957610100808354040283529160200191611ca4565b820191906000526020600020905b815481529060010190602001808311611c8757829003601f168201915b505050505081565b611cb4612b78565b80600c9081611cc391906154a3565b5050565b611cd9611cd2612729565b8383612e47565b5050565b600f5481565b611ceb612b78565b60146000611cf99190613edb565b565b60126020528060005260406000206000915090505481565b611d24611d1e612729565b836127ea565b611d63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5a90614ff8565b60405180910390fd5b611d6f84848484612fb3565b50505050565b611d7d612b78565b8060116000848152602001908152602001600020600201819055505050565b60105481565b611daa612b78565b80600f8190555050565b6011602052806000526040600020600091509050806000018054611dd790614a7b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0390614a7b565b8015611e505780601f10611e2557610100808354040283529160200191611e50565b820191906000526020600020905b815481529060010190602001808311611e3357829003601f168201915b5050505050908060010154908060020154908060030154908060040154905085565b611e7a612b78565b80601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6060611ec9826126de565b6000611ed361300f565b90506000815111611ef35760405180602001604052806000815250611f1e565b80611efd846130a1565b604051602001611f0e9291906155b1565b6040516020818303038152906040525b915050919050565b611f2e612b78565b80600e8190555050565b600d5481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611fda612b78565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612049576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204090615647565b60405180910390fd5b61205281612d81565b50565b600381600d5481612064611058565b61206e9190614c3c565b11156120af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a690614cbc565b60405180910390fd5b6000811180156120d5575060116000838152602001908152602001600020600201548111155b612114576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210b90614d28565b60405180910390fd5b4260116000848152602001908152602001600020600301541115801561214f5750426011600084815260200190815260200160002060040154115b61218e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218590614d94565b60405180910390fd5b42600f601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121db9190614c3c565b1061221b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612212906156b3565b60405180910390fd5b8260116000600381526020019081526020016000206001015461223e9190614db4565b341015612280576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227790614e42565b60405180910390fd5b61228a338461269e565b42601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b8282600f5461234a838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050823360405160200161232f9190614af4565b60405160208183030381529060405280519060200120612687565b612389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238090614b81565b60405180910390fd5b6123923361189c565b156123d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123c990614bed565b60405180910390fd5b600184600d54816123e1611058565b6123eb9190614c3c565b111561242c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242390614cbc565b60405180910390fd5b600081118015612452575060116000838152602001908152602001600020600201548111155b612491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248890614d28565b60405180910390fd5b426011600084815260200190815260200160002060030154111580156124cc5750426011600084815260200190815260200160002060040154115b61250b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161250290614d94565b60405180910390fd5b8560116000600181526020019081526020016000206001015461252e9190614db4565b341015612570576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256790614e42565b60405180910390fd5b61257a338761269e565b6014339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612680575061267f8261316f565b5b9050919050565b6000826126948584613251565b1490509392505050565b60005b818110156126d9576126b3600b6132a7565b6126c6836126c1600b6132bd565b6132cb565b80806126d19061511f565b9150506126a1565b505050565b6126e7816132e9565b612726576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271d90615245565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166127a483611816565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806127f683611816565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061283857506128378185611f3e565b5b8061287657508373ffffffffffffffffffffffffffffffffffffffff1661285e84610ef5565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661289f82611816565b73ffffffffffffffffffffffffffffffffffffffff16146128f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ec90615745565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612964576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295b906157d7565b60405180910390fd5b612971838383600161332a565b8273ffffffffffffffffffffffffffffffffffffffff1661299182611816565b73ffffffffffffffffffffffffffffffffffffffff16146129e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129de90615745565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b738383836001613488565b505050565b612b80612729565b73ffffffffffffffffffffffffffffffffffffffff16612b9e611ac2565b73ffffffffffffffffffffffffffffffffffffffff1614612bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612beb90615843565b60405180910390fd5b565b6000612c0182611816565b9050612c1181600084600161332a565b612c1a82611816565b90506004600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d40816000846001613488565b5050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612eb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eac906158af565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612fa69190613fcd565b60405180910390a3505050565b612fbe84848461287f565b612fca8484848461348e565b613009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161300090615941565b60405180910390fd5b50505050565b6060600c805461301e90614a7b565b80601f016020809104026020016040519081016040528092919081815260200182805461304a90614a7b565b80156130975780601f1061306c57610100808354040283529160200191613097565b820191906000526020600020905b81548152906001019060200180831161307a57829003601f168201915b5050505050905090565b6060600060016130b084613615565b01905060008167ffffffffffffffff8111156130cf576130ce614448565b5b6040519080825280601f01601f1916602001820160405280156131015781602001600182028036833780820191505090505b509050600082602001820190505b600115613164578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161315857613157615961565b5b0494506000850361310f575b819350505050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061323a57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061324a575061324982613768565b5b9050919050565b60008082905060005b845181101561329c576132878286838151811061327a576132796150f0565b5b60200260200101516137d2565b915080806132949061511f565b91505061325a565b508091505092915050565b6001816000016000828254019250508190555050565b600081600001549050919050565b6132e58282604051806020016040528060008152506137fd565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff1661330b83612d44565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61333684848484613858565b600181111561337a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161337190615a02565b60405180910390fd5b6000829050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036133c1576133bc8161397e565b613400565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146133ff576133fe85826139c7565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036134425761343d81613b34565b613481565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146134805761347f8482613c05565b5b5b5050505050565b50505050565b60006134af8473ffffffffffffffffffffffffffffffffffffffff16613c84565b15613608578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026134d8612729565b8786866040518563ffffffff1660e01b81526004016134fa9493929190615a77565b6020604051808303816000875af192505050801561353657506040513d601f19601f820116820180604052508101906135339190615ad8565b60015b6135b8573d8060008114613566576040519150601f19603f3d011682016040523d82523d6000602084013e61356b565b606091505b5060008151036135b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135a790615941565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061360d565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613673577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161366957613668615961565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106136b0576d04ee2d6d415b85acef810000000083816136a6576136a5615961565b5b0492506020810190505b662386f26fc1000083106136df57662386f26fc1000083816136d5576136d4615961565b5b0492506010810190505b6305f5e1008310613708576305f5e10083816136fe576136fd615961565b5b0492506008810190505b612710831061372d57612710838161372357613722615961565b5b0492506004810190505b60648310613750576064838161374657613745615961565b5b0492506002810190505b600a831061375f576001810190505b80915050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008183106137ea576137e58284613ca7565b6137f5565b6137f48383613ca7565b5b905092915050565b6138078383613cbe565b613814600084848461348e565b613853576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161384a90615941565b60405180910390fd5b505050565b600181111561397857600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146138ec5780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546138e49190615b05565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146139775780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461396f9190614c3c565b925050819055505b5b50505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016139d484611958565b6139de9190615b05565b9050600060076000848152602001908152602001600020549050818114613ac3576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006001600880549050613b489190615b05565b9050600060096000848152602001908152602001600020549050600060088381548110613b7857613b776150f0565b5b906000526020600020015490508060088381548110613b9a57613b996150f0565b5b906000526020600020018190555081600960008381526020019081526020016000208190555060096000858152602001908152602001600020600090556008805480613be957613be8615b39565b5b6001900381819060005260206000200160009055905550505050565b6000613c1083611958565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600082600052816020526040600020905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603613d2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d2490615bb4565b60405180910390fd5b613d36816132e9565b15613d76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613d6d90615c20565b60405180910390fd5b613d8460008383600161332a565b613d8d816132e9565b15613dcd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613dc490615c20565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4613ed7600083836001613488565b5050565b5080546000825590600052602060002090810190613ef99190613efc565b50565b5b80821115613f15576000816000905550600101613efd565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613f6281613f2d565b8114613f6d57600080fd5b50565b600081359050613f7f81613f59565b92915050565b600060208284031215613f9b57613f9a613f23565b5b6000613fa984828501613f70565b91505092915050565b60008115159050919050565b613fc781613fb2565b82525050565b6000602082019050613fe26000830184613fbe565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015614022578082015181840152602081019050614007565b60008484015250505050565b6000601f19601f8301169050919050565b600061404a82613fe8565b6140548185613ff3565b9350614064818560208601614004565b61406d8161402e565b840191505092915050565b60006020820190508181036000830152614092818461403f565b905092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126140bf576140be61409a565b5b8235905067ffffffffffffffff8111156140dc576140db61409f565b5b6020830191508360208202830111156140f8576140f76140a4565b5b9250929050565b6000819050919050565b614112816140ff565b811461411d57600080fd5b50565b60008135905061412f81614109565b92915050565b60008060006040848603121561414e5761414d613f23565b5b600084013567ffffffffffffffff81111561416c5761416b613f28565b5b614178868287016140a9565b9350935050602061418b86828701614120565b9150509250925092565b6000602082840312156141ab576141aa613f23565b5b60006141b984828501614120565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006141ed826141c2565b9050919050565b6141fd816141e2565b82525050565b600060208201905061421860008301846141f4565b92915050565b614227816141e2565b811461423257600080fd5b50565b6000813590506142448161421e565b92915050565b6000806040838503121561426157614260613f23565b5b600061426f85828601614235565b925050602061428085828601614120565b9150509250929050565b6000819050919050565b61429d8161428a565b82525050565b60006020820190506142b86000830184614294565b92915050565b6142c7816140ff565b82525050565b60006020820190506142e260008301846142be565b92915050565b60008060006060848603121561430157614300613f23565b5b600061430f86828701614235565b935050602061432086828701614235565b925050604061433186828701614120565b9150509250925092565b60006020828403121561435157614350613f23565b5b600061435f84828501614235565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61439d816140ff565b82525050565b60006143af8383614394565b60208301905092915050565b6000602082019050919050565b60006143d382614368565b6143dd8185614373565b93506143e883614384565b8060005b8381101561441957815161440088826143a3565b975061440b836143bb565b9250506001810190506143ec565b5085935050505092915050565b6000602082019050818103600083015261444081846143c8565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6144808261402e565b810181811067ffffffffffffffff8211171561449f5761449e614448565b5b80604052505050565b60006144b2613f19565b90506144be8282614477565b919050565b600067ffffffffffffffff8211156144de576144dd614448565b5b602082029050602081019050919050565b60006145026144fd846144c3565b6144a8565b90508083825260208201905060208402830185811115614525576145246140a4565b5b835b8181101561454e578061453a8882614235565b845260208401935050602081019050614527565b5050509392505050565b600082601f83011261456d5761456c61409a565b5b813561457d8482602086016144ef565b91505092915050565b6000806040838503121561459d5761459c613f23565b5b60006145ab85828601614120565b925050602083013567ffffffffffffffff8111156145cc576145cb613f28565b5b6145d885828601614558565b9150509250929050565b600080604083850312156145f9576145f8613f23565b5b600061460785828601614120565b925050602061461885828601614120565b9150509250929050565b61462b8161428a565b811461463657600080fd5b50565b60008135905061464881614622565b92915050565b60006020828403121561466457614663613f23565b5b600061467284828501614639565b91505092915050565b600080fd5b600067ffffffffffffffff82111561469b5761469a614448565b5b6146a48261402e565b9050602081019050919050565b82818337600083830152505050565b60006146d36146ce84614680565b6144a8565b9050828152602081018484840111156146ef576146ee61467b565b5b6146fa8482856146b1565b509392505050565b600082601f8301126147175761471661409a565b5b81356147278482602086016146c0565b91505092915050565b60008060008060008060c0878903121561474d5761474c613f23565b5b600061475b89828a01614120565b965050602087013567ffffffffffffffff81111561477c5761477b613f28565b5b61478889828a01614702565b955050604061479989828a01614120565b94505060606147aa89828a01614120565b93505060806147bb89828a01614120565b92505060a06147cc89828a01614120565b9150509295509295509295565b6000602082840312156147ef576147ee613f23565b5b600082013567ffffffffffffffff81111561480d5761480c613f28565b5b61481984828501614702565b91505092915050565b61482b81613fb2565b811461483657600080fd5b50565b60008135905061484881614822565b92915050565b6000806040838503121561486557614864613f23565b5b600061487385828601614235565b925050602061488485828601614839565b9150509250929050565b600067ffffffffffffffff8211156148a9576148a8614448565b5b6148b28261402e565b9050602081019050919050565b60006148d26148cd8461488e565b6144a8565b9050828152602081018484840111156148ee576148ed61467b565b5b6148f98482856146b1565b509392505050565b600082601f8301126149165761491561409a565b5b81356149268482602086016148bf565b91505092915050565b6000806000806080858703121561494957614948613f23565b5b600061495787828801614235565b945050602061496887828801614235565b935050604061497987828801614120565b925050606085013567ffffffffffffffff81111561499a57614999613f28565b5b6149a687828801614901565b91505092959194509250565b600060a08201905081810360008301526149cc818861403f565b90506149db60208301876142be565b6149e860408301866142be565b6149f560608301856142be565b614a0260808301846142be565b9695505050505050565b60008060408385031215614a2357614a22613f23565b5b6000614a3185828601614235565b9250506020614a4285828601614235565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614a9357607f821691505b602082108103614aa657614aa5614a4c565b5b50919050565b60008160601b9050919050565b6000614ac482614aac565b9050919050565b6000614ad682614ab9565b9050919050565b614aee614ae9826141e2565b614acb565b82525050565b6000614b008284614add565b60148201915081905092915050565b7f4164647265737320646f6573206e6f7420657869737420696e204d696e746c6960008201527f7374210000000000000000000000000000000000000000000000000000000000602082015250565b6000614b6b602383613ff3565b9150614b7682614b0f565b604082019050919050565b60006020820190508181036000830152614b9a81614b5e565b9050919050565b7f416c65616479204d696e74656421000000000000000000000000000000000000600082015250565b6000614bd7600e83613ff3565b9150614be282614ba1565b602082019050919050565b60006020820190508181036000830152614c0681614bca565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c47826140ff565b9150614c52836140ff565b9250828201905080821115614c6a57614c69614c0d565b5b92915050565b7f4d617820737570706c7920657863656564656421000000000000000000000000600082015250565b6000614ca6601483613ff3565b9150614cb182614c70565b602082019050919050565b60006020820190508181036000830152614cd581614c99565b9050919050565b7f496e76616c6964206d696e7420616d6f756e7421000000000000000000000000600082015250565b6000614d12601483613ff3565b9150614d1d82614cdc565b602082019050919050565b60006020820190508181036000830152614d4181614d05565b9050919050565b7f53616c6573206973206e6f742079657421000000000000000000000000000000600082015250565b6000614d7e601183613ff3565b9150614d8982614d48565b602082019050919050565b60006020820190508181036000830152614dad81614d71565b9050919050565b6000614dbf826140ff565b9150614dca836140ff565b9250828202614dd8816140ff565b91508282048414831517614def57614dee614c0d565b5b5092915050565b7f496e73756666696369656e742066756e64732100000000000000000000000000600082015250565b6000614e2c601383613ff3565b9150614e3782614df6565b602082019050919050565b60006020820190508181036000830152614e5b81614e1f565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ebe602183613ff3565b9150614ec982614e62565b604082019050919050565b60006020820190508181036000830152614eed81614eb1565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000614f50603d83613ff3565b9150614f5b82614ef4565b604082019050919050565b60006020820190508181036000830152614f7f81614f43565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b6000614fe2602d83613ff3565b9150614fed82614f86565b604082019050919050565b6000602082019050818103600083015261501181614fd5565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000615074602b83613ff3565b915061507f82615018565b604082019050919050565b600060208201905081810360008301526150a381615067565b9050919050565b600081905092915050565b50565b60006150c56000836150aa565b91506150d0826150b5565b600082019050919050565b60006150e6826150b8565b9150819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061512a826140ff565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361515c5761515b614c0d565b5b600182019050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b60006151c3602c83613ff3565b91506151ce82615167565b604082019050919050565b600060208201905081810360008301526151f2816151b6565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b600061522f601883613ff3565b915061523a826151f9565b602082019050919050565b6000602082019050818103600083015261525e81615222565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006152c1602983613ff3565b91506152cc82615265565b604082019050919050565b600060208201905081810360008301526152f0816152b4565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026153597fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261531c565b615363868361531c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006153a061539b615396846140ff565b61537b565b6140ff565b9050919050565b6000819050919050565b6153ba83615385565b6153ce6153c6826153a7565b848454615329565b825550505050565b600090565b6153e36153d6565b6153ee8184846153b1565b505050565b5b81811015615412576154076000826153db565b6001810190506153f4565b5050565b601f82111561545757615428816152f7565b6154318461530c565b81016020851015615440578190505b61545461544c8561530c565b8301826153f3565b50505b505050565b600082821c905092915050565b600061547a6000198460080261545c565b1980831691505092915050565b60006154938383615469565b9150826002028217905092915050565b6154ac82613fe8565b67ffffffffffffffff8111156154c5576154c4614448565b5b6154cf8254614a7b565b6154da828285615416565b600060209050601f83116001811461550d57600084156154fb578287015190505b6155058582615487565b86555061556d565b601f19841661551b866152f7565b60005b828110156155435784890151825560018201915060208501945060208101905061551e565b86831015615560578489015161555c601f891682615469565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b600061558b82613fe8565b6155958185615575565b93506155a5818560208601614004565b80840191505092915050565b60006155bd8285615580565b91506155c98284615580565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615631602683613ff3565b915061563c826155d5565b604082019050919050565b6000602082019050818103600083015261566081615624565b9050919050565b7f426f74206973206e6f7420616c6c6f7765643a00000000000000000000000000600082015250565b600061569d601383613ff3565b91506156a882615667565b602082019050919050565b600060208201905081810360008301526156cc81615690565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061572f602583613ff3565b915061573a826156d3565b604082019050919050565b6000602082019050818103600083015261575e81615722565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006157c1602483613ff3565b91506157cc82615765565b604082019050919050565b600060208201905081810360008301526157f0816157b4565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061582d602083613ff3565b9150615838826157f7565b602082019050919050565b6000602082019050818103600083015261585c81615820565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000615899601983613ff3565b91506158a482615863565b602082019050919050565b600060208201905081810360008301526158c88161588c565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061592b603283613ff3565b9150615936826158cf565b604082019050919050565b6000602082019050818103600083015261595a8161591e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f455243373231456e756d657261626c653a20636f6e736563757469766520747260008201527f616e7366657273206e6f7420737570706f727465640000000000000000000000602082015250565b60006159ec603583613ff3565b91506159f782615990565b604082019050919050565b60006020820190508181036000830152615a1b816159df565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000615a4982615a22565b615a538185615a2d565b9350615a63818560208601614004565b615a6c8161402e565b840191505092915050565b6000608082019050615a8c60008301876141f4565b615a9960208301866141f4565b615aa660408301856142be565b8181036060830152615ab88184615a3e565b905095945050505050565b600081519050615ad281613f59565b92915050565b600060208284031215615aee57615aed613f23565b5b6000615afc84828501615ac3565b91505092915050565b6000615b10826140ff565b9150615b1b836140ff565b9250828203905081811115615b3357615b32614c0d565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000615b9e602083613ff3565b9150615ba982615b68565b602082019050919050565b60006020820190508181036000830152615bcd81615b91565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000615c0a601c83613ff3565b9150615c1582615bd4565b602082019050919050565b60006020820190508181036000830152615c3981615bfd565b905091905056fea2646970667358221220cab453c54d0f54378c32d8041ca80fa3466bf7165db0242b387ea2433b3f619264736f6c63430008110033` diff --git a/libs/remix-lib/src/execution/logsManager.ts b/libs/remix-lib/src/execution/logsManager.ts index 65914215b4..0beefd5b64 100644 --- a/libs/remix-lib/src/execution/logsManager.ts +++ b/libs/remix-lib/src/execution/logsManager.ts @@ -52,7 +52,21 @@ export class LogsManager { } eventMatchesFilter (changeEvent, queryType, queryFilter) { - if (queryFilter.topics.filter((logTopic) => changeEvent.log.topics.indexOf(logTopic) >= 0).length === 0) return false + // topics should match + let noMatch = false + for (let i = 0; i < queryFilter.topics.length; i++) { + if (!queryFilter.topics[i]) { + continue // if the topic isn't defined, we consider it a match. + } + if (Array.isArray(queryFilter.topics[i])) { + if (queryFilter.topics[i].indexOf(changeEvent.log.topics[i]) === -1) { + noMatch = true + } + continue + } + if (queryFilter.topics[i] !== changeEvent.log.topics[i]) noMatch = true + } + if (noMatch) return false if (queryType === 'logs') { const fromBlock = parseInt(queryFilter.fromBlock || '0x0') diff --git a/libs/remix-simulator/test/events.ts b/libs/remix-simulator/test/events.ts index cd465caaf3..185c432472 100644 --- a/libs/remix-simulator/test/events.ts +++ b/libs/remix-simulator/test/events.ts @@ -38,14 +38,14 @@ describe('Events', () => { address: receiptTest.contractAddress, fromBlock: 3, toBlock: 'latest', - topics: ['0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc', '0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735'] + topics: ['0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc'] }) let ownerLogs = await web3.eth.getPastLogs({ address: receiptOwner.contractAddress, fromBlock: 3, toBlock: 'latest', - topics: ['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735', '0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc'] + topics: ['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735'] }) // this should include the event triggered by the "set" transaction call. @@ -56,7 +56,7 @@ describe('Events', () => { address: receiptOwner.contractAddress, fromBlock: 2, toBlock: 'latest', - topics: ['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735', '0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc'] + topics: ['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735'] }) // this should include the event triggered from the ctor. assert.equal(ownerLogs.length, 2, '3) ownerLogs length should be equal to 2') @@ -65,10 +65,19 @@ describe('Events', () => { address: receiptOwner.contractAddress, fromBlock: 1, toBlock: 2, - topics: ['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735', '0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc'] + topics: ['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735'] }) // this should only include the event triggered from the ctor. assert.equal(ownerLogs.length, 1, '4) ownerLogs length should be equal to 1') + + ownerLogs = await web3.eth.getPastLogs({ + address: receiptOwner.contractAddress, + fromBlock: 1, + toBlock: 2, + topics: [['0x342827c97908e5e2f71151c08502a66d44b6f758e3ac2f1de95f02eb95f0a735', '0xdcd9c7fa0342f01013bd0bf2bec103a81936162dcebd1f0c38b1d4164c17e0fc']] + }) + // 0xdcd9c7fa0342f01013b is a topic from a event emitted by the other contract and should not be take into account. + assert.equal(ownerLogs.length, 1, '5) ownerLogs length should be equal to 1') }) }) })