Merge branch 'master' into deploy

pull/3257/head
bunsenstraat 2 years ago committed by GitHub
commit 91730de497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  2. 2
      apps/remix-ide/ci/makeMockCompiler.js
  3. 2
      apps/solidity-compiler/src/app/compiler.ts
  4. 19
      libs/remix-tests/src/testRunner.ts
  5. 2
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  6. 4
      package.json

@ -95,7 +95,7 @@ module.exports = {
.waitForElementVisible('#stepdetail')
.waitForElementVisible({
locateStrategy: 'xpath',
selector: '//*[@data-id="treeViewLivm trace step" and contains(.,"545")]',
selector: '//*[@data-id="treeViewLivm trace step" and contains(.,"531")]',
})
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`constructor (string memory name_, string memory symbol_) {

@ -3,7 +3,7 @@
var fs = require('fs')
var compiler = require('solc')
var compilerInput = require('@remix-project/remix-solidity').CompilerInput
var defaultVersion = 'soljson-v0.8.7+commit.e28d00a7.js'
var defaultVersion = 'soljson-v0.8.17+commit.8df45f5f.js'
const path = require('path')
compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => {

@ -9,7 +9,7 @@ import { CompileTabLogic } from '@remix-ui/solidity-compiler'
const defaultCompilerParameters = {
runs: '200',
optimize: false,
version: 'soljson-v0.8.7+commit.e28d00a7',
version: 'soljson-v0.8.17+commit.8df45f5f',
evmVersion: null, // compiler default
language: 'Solidity',
useFileConfiguration: false,

@ -218,6 +218,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
if (!isJSONInterfaceAvailable) { return resultsCallback(new Error('Contract interface not available'), { passingNum, failureNum, timePassed }) }
const runList: RunListInterface[] = createRunList(testObject.options.jsonInterface, fileAST, testName)
const web3 = opts.web3 || new Web3()
web3.eth.handleRevert = true // enables returning error reason on revert
const accts: TestResultInterface = {
type: 'accountList',
value: opts.accounts
@ -375,23 +376,27 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
console.error(err)
return next(err)
}
}).on('error', async (err: Error) => {
}).on('error', async (err) => {
const time: number = (Date.now() - startTime) / 1000.0
let errMsg = err.message
let txHash
if (err.reason) errMsg = `transaction reverted with the reason: ${err.reason}`
const resp: TestResultInterface = {
type: 'testFailure',
value: changeCase.sentenceCase(func.name),
filename: testObject.filename,
time: time,
errMsg: err.message,
errMsg,
context: testName,
web3
}
if (err.message.includes('Transaction has been reverted by the EVM')) {
const txHash = JSON.parse(err.message.replace('Transaction has been reverted by the EVM:', '')).transactionHash
if (web3.eth && web3.eth.getHHLogsForTx) hhLogs = await web3.eth.getHHLogsForTx(txHash)
if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs
resp.debugTxHash = txHash
if (err.receipt) txHash = err.receipt.transactionHash
else if (err.message.includes('Transaction has been reverted by the EVM')) {
txHash = JSON.parse(err.message.replace('Transaction has been reverted by the EVM:', '')).transactionHash
}
if (web3.eth && web3.eth.getHHLogsForTx && txHash) hhLogs = await web3.eth.getHHLogsForTx(txHash)
if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs
resp.debugTxHash = txHash
testCallback(undefined, resp)
failureNum += 1
timePassed += time

@ -53,7 +53,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
customVersions: [],
compilerLicense: null,
selectedVersion: null,
defaultVersion: 'soljson-v0.8.7+commit.e28d00a7.js', // this default version is defined: in makeMockCompiler (for browser test)
defaultVersion: 'soljson-v0.8.17+commit.8df45f5f.js', // this default version is defined: in makeMockCompiler (for browser test)
runs: '',
compiledFileName: '',
includeNightlies: false,

@ -56,8 +56,8 @@
"browsertest": "sleep 5 && yarn run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/src/assets/css/font-awesome.min.css' apps/remix-ide/src/assets/css/",
"downloadsolc_assets_e2e": "node ./apps/remix-ide/ci/download_e2e_assets.js",
"downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/remix-ide/src/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/solidity-compiler/src/assets/js/soljson.js",
"downloadsolc_assets_dist": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./dist/apps/remix-ide/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./dist/apps/solidity-compiler/assets/js/soljson.js",
"downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.17+commit.8df45f5f.js -O ./apps/remix-ide/src/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.17+commit.8df45f5f.js -O ./apps/solidity-compiler/src/assets/js/soljson.js",
"downloadsolc_assets_dist": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.17+commit.8df45f5f.js -O ./dist/apps/remix-ide/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.17+commit.8df45f5f.js -O ./dist/apps/solidity-compiler/assets/js/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"build:production": "NODE_ENV=production nx build remix-ide --configuration=production --skip-nx-cache",

Loading…
Cancel
Save