Skip to content

Commit

Permalink
Merge branch 'master' into partner_plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
LianaHus authored Sep 11, 2024
2 parents 3571d12 + 4ed2409 commit 7e2d0e5
Show file tree
Hide file tree
Showing 48 changed files with 150 additions and 73 deletions.
2 changes: 1 addition & 1 deletion apps/etherscan/src/app/views/VerifyView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from 'react'
import Web3 from 'web3'
import { Web3 } from 'web3'

import {PluginClient} from '@remixproject/plugin'
import {CustomTooltip} from '@remix-ui/helper'
Expand Down
6 changes: 5 additions & 1 deletion apps/remix-ide-e2e/src/githttpbackend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scripts": {
"start:server": "npx ts-node server.ts"
"start:server": "tsc && node ./dist/server.js"
},
"dependencies": {
"body-parser": "^1.20.2",
Expand All @@ -9,5 +9,9 @@
"git-http-backend": "^1.1.2",
"path": "^0.12.7",
"zlib": "^1.0.5"
},
"devDependencies": {
"@types/node": "^22.5.4",
"typescript": "^5.6.2"
}
}
25 changes: 25 additions & 0 deletions apps/remix-ide-e2e/src/githttpbackend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ES6", // Set the ECMAScript target version
"module": "commonjs", // Specify module code generation
"strict": true,
"noImplicitAny": false, // Enable all strict type-checking options
"esModuleInterop": true, // Emit additional code to make commonJS and ES modules work together
"skipLibCheck": true, // Skip type checking of all declaration files (.d.ts)
"forceConsistentCasingInFileNames": true, // Ensure file names are treated with case sensitivity
"outDir": "./dist", // Redirect output structure to the 'dist' directory
"rootDir": "./src", // Specify the root directory of input files
"sourceMap": true, // Create source map files
"types": [
"node"
], // Add node types
"moduleResolution": "node", // Ensure TypeScript resolves modules like Node.js
},
"include": [
"src/**/*" // Include all TypeScript files in the src directory
],
"exclude": [
"node_modules", // Exclude the node_modules folder
"**/*.test.ts" // Exclude test files
]
}
17 changes: 17 additions & 0 deletions apps/remix-ide-e2e/src/githttpbackend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
# yarn lockfile v1


"@types/node@^22.5.4":
version "22.5.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8"
integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==
dependencies:
undici-types "~6.19.2"

accepts@~1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
Expand Down Expand Up @@ -483,6 +490,16 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"

typescript@^5.6.2:
version "5.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==

unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/tests/dgit_local.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ async function createCommitOnLocalServer(path: string, message: string) {
async function spawnGitServer(path: string): Promise<ChildProcess> {
console.log(process.cwd())
try {
const server = spawn('yarn && sh setup.sh && npx ts-node server.ts', [`${path}`], { cwd: process.cwd() + '/apps/remix-ide-e2e/src/githttpbackend/', shell: true, detached: true })
const server = spawn('yarn && sh setup.sh && yarn start:server', [`${path}`], { cwd: process.cwd() + '/apps/remix-ide-e2e/src/githttpbackend/', shell: true, detached: true })
console.log('spawned', server.stdout.closed, server.stderr.closed)
return new Promise((resolve, reject) => {
server.stdout.on('data', function (data) {
Expand Down
2 changes: 2 additions & 0 deletions apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ module.exports = {
browser
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.20+commit.a1b79de6.js')
.click('*[data-id="scConfigExpander"]')
.setValue('#evmVersionSelector', 'berlin') // set target EVM for parser to berlin
.addFile('contracts/mytoken.sol', {
content: myToken
}).useXpath().waitForElementVisible("//*[@class='view-line' and contains(.,'gas')]")
Expand Down
35 changes: 34 additions & 1 deletion apps/remix-ide-e2e/src/tests/eip1153.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,21 @@ module.exports = {
1: 'uint256: out2 15'
}
})
.end()
},

'Should clear transient storage after tx execution #group1' : function (browser: NightwatchBrowser) {
browser.addFile('clear_transient.sol', { content: clearTransient })
.verifyContracts(['ClearTransient'])
.clickLaunchIcon('udapp')
.createContract('')
.clickInstance(1)
.clickFunction('get - call')
.testFunction('last',
{
'decoded output': {
0: 'uint256: 0'
}
})
}
}

Expand All @@ -49,3 +63,22 @@ contract TestTransientStorage {
}
}
}`

const clearTransient = `
// SPDX-License-Identifier: none
pragma solidity 0.8.26;
import "hardhat/console.sol";
contract ClearTransient {
uint p;
constructor() {
uint256 value;
assembly { value := tload(hex"1234") }
p = value;
assembly { tstore(hex"1234", 10) }
}
function get () public view returns (uint) {
return p;
}
}`
14 changes: 7 additions & 7 deletions apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ module.exports = {
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000)
.waitForElementContainsText('#solidityUnittestsOutput', 'tests/hhLogs_test.sol', 60000)
.pause(2000)
.assert.containsText('#journal > div:nth-child(4) > span', 'Before all:')
.assert.containsText('#journal > div:nth-child(4) > span', 'Inside beforeAll')
.assert.containsText('#journal > div:nth-child(5) > span', 'Check sender:')
.assert.containsText('#journal > div:nth-child(5) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4')
.assert.containsText('#journal > div:nth-child(6) > span', 'Check int logs:')
.assert.containsText('#journal > div:nth-child(6) > span', '10 20')
.assert.containsText('#journal > div:nth-child(6) > span', 'Number is 25')
.assert.textContains('#journal > div:nth-child(3) > span', 'Before all:')
.assert.textContains('#journal > div:nth-child(3) > span', 'Inside beforeAll')
.assert.textContains('#journal > div:nth-child(4) > span', 'Check sender:')
.assert.textContains('#journal > div:nth-child(4) > span', 'msg.sender is 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4')
.assert.textContains('#journal > div:nth-child(5) > span', 'Check int logs:')
.assert.textContains('#journal > div:nth-child(5) > span', '10 20')
.assert.textContains('#journal > div:nth-child(5) > span', 'Number is 25')
.openFile('tests/hhLogs_test.sol')
.removeFile('tests/hhLogs_test.sol', 'workspace_new')
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default class CodeParserCompiler {
"*": ["evm.gasEstimates"]
}
},
"evmVersion": state.evmVersion && state.evmVersion.toString() || "berlin",
"evmVersion": state.evmVersion && state.evmVersion.toString() || "cancun",
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { InjectedProviderDefault } from './injected-provider-default'

export class InjectedCustomProvider extends InjectedProviderDefault {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as packageJson from '../../../../../package.json'
import { InjectedCustomProvider } from './injected-custom-provider'
import Web3 from 'web3'
import { Web3 } from 'web3'

const profile = {
name: 'injected-ephemery-testnet-provider',
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/app/tabs/debugger-tab.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { DebuggerUI } from '@remix-ui/debugger-ui' // eslint-disable-line
import { DebuggerApiMixin } from '@remix-ui/debugger-ui'
import { ViewPlugin } from '@remixproject/engine-web'
Expand Down
6 changes: 3 additions & 3 deletions apps/remix-ide/src/app/tabs/locales/en/remixUiTabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"remixUiTabs.tooltipText3": "Select .sol or .yul file to compile OR a .ts or .js file to run",
"remixUiTabs.tooltipText4": "To explain a contract, choose a .sol file",
"remixUiTabs.tooltipText5": "Explain the contract(s) in current file [BETA]",
"remixUiTabs.tooltipText6": "Enable Remix AI Copilot [BETA]",
"remixUiTabs.tooltipText7": "Disable Remix AI Copilot [BETA]",
"remixUiTabs.tooltipText6": "Enable RemixAI Copilot [BETA]",
"remixUiTabs.tooltipText7": "Disable RemixAI Copilot [BETA]",
"remixUiTabs.tooltipText8": "Remix AI Tools Documentation",
"remixUiTabs.tooltipTextDisabledCopilot": "To use Remix AI Copilot, choose a .sol file",
"remixUiTabs.tooltipTextDisabledCopilot": "To use RemixAI Copilot, choose a .sol file",
"remixUiTabs.zoomOut": "Zoom out",
"remixUiTabs.zoomIn": "Zoom in"
}
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/execution-context.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global ethereum */
'use strict'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { execution } from '@remix-project/remix-lib'
import EventManager from '../lib/events'
import { bytesToHex } from '@ethereumjs/util'
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/providers/injected.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util'
import { ExecutionContext } from '../execution-context'

Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/providers/node.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util'
import { Personal } from 'web3-eth-personal'
import { ExecutionContext } from '../execution-context'
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/providers/vm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3, { FMT_BYTES, FMT_NUMBER, LegacySendAsyncProvider } from 'web3'
import { Web3, FMT_BYTES, FMT_NUMBER, LegacySendAsyncProvider } from 'web3'
import { fromWei, toBigInt } from 'web3-utils'
import { privateToAddress, hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util'
import { extend, JSONRPCRequestPayload, JSONRPCResponseCallback } from '@remix-project/remix-simulator'
Expand Down
2 changes: 1 addition & 1 deletion libs/ghaction-helper/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ethers } from "ethers"
import { Provider } from '@remix-project/remix-simulator'
import { getArtifactsByContractName } from './artifacts-helper'
import { SignerWithAddress } from './signer'
import Web3 from "web3"
import { Web3 } from "web3"

const providerConfig = {
fork: global.fork || null,
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@ethereumjs/block": "5.3.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@remix-project/remix-astwalker": "^0.0.86",
"@remix-project/remix-lib": "^0.5.63",
"async": "^2.6.2",
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-astwalker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@ethereumjs/block": "5.3.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@remix-project/remix-lib": "^0.5.63",
"@types/tape": "^4.2.33",
"async": "^2.6.2",
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@ethereumjs/common": "4.4.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@remix-project/remix-astwalker": "^0.0.86",
"@remix-project/remix-lib": "^0.5.63",
"@remix-project/remix-simulator": "^0.2.56",
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-debug/src/cmdline/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Debugger } from '../debugger/debugger'
import { EventEmitter } from 'events'

Expand Down
2 changes: 1 addition & 1 deletion libs/remix-debug/src/init.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
import Web3, { Web3PluginBase } from 'web3'
import { Web3, Web3PluginBase } from 'web3'
import { toNumber } from 'web3-utils'

export function extendWeb3 (web3) {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-lib/src/execution/txRunnerWeb3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'
import { EventManager } from '../eventManager'
import type { Transaction as InternalTransaction } from './txRunner'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { toBigInt, toHex } from 'web3-utils'

export class TxRunnerWeb3 {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-lib/src/init.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
import Web3, { Web3PluginBase } from 'web3'
import { Web3, Web3PluginBase } from 'web3'
import { toNumber } from 'web3-utils'

export function extendWeb3 (web3) {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@ethereumjs/common": "4.4.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@metamask/eth-sig-util": "^7.0.2",
"@remix-project/remix-lib": "^0.5.63",
"ansi-gray": "^0.1.1",
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/accounts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3, { FMT_BYTES, FMT_NUMBER } from 'web3'
import { Web3, FMT_BYTES, FMT_NUMBER } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/blocks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/events.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/misc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/transactions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { LegacyTransaction, FeeMarketEIP1559Transaction } from '@ethereumjs/tx'
import { Provider } from '../src/index'
const web3 = new Web3()
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-solidity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@ethereumjs/block": "5.3.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@remix-project/remix-lib": "^0.5.63",
"async": "^2.6.2",
"eslint-scope": "^5.0.0",
Expand Down
6 changes: 3 additions & 3 deletions libs/remix-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@ethereumjs/common": "4.4.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@remix-project/remix-lib": "^0.5.63",
"@remix-project/remix-simulator": "^0.2.56",
"@remix-project/remix-solidity": "^0.5.42",
Expand Down Expand Up @@ -81,11 +81,11 @@
"@ethereumjs/blockchain": "7.3.0",
"@ethereumjs/block": "5.3.0",
"@ethereumjs/common": "4.4.0",
"@ethereumjs/evm": "3.1.0",
"@ethereumjs/evm": "3.1.1",
"@ethereumjs/statemanager": "2.4.0",
"@ethereumjs/tx": "5.4.0",
"@ethereumjs/util": "9.1.0",
"@ethereumjs/vm": "8.1.0",
"@ethereumjs/vm": "8.1.1",
"@ethereumjs/trie": "6.2.1"
},
"typings": "src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/deployer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import async from 'async'
import { execution } from '@remix-project/remix-lib'
import Web3, { FMT_BYTES, FMT_NUMBER } from 'web3'
import { Web3, FMT_BYTES, FMT_NUMBER } from 'web3'
import { compilationInterface } from './types'

/**
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Command } from 'commander';
import Web3 from 'web3'
import { Web3 } from 'web3'
import path from 'path'
import axios, { AxiosResponse } from 'axios'
import { runTestFiles } from './runTestFiles'
Expand Down
Loading

0 comments on commit 7e2d0e5

Please sign in to comment.