Merge branch 'master' of https://github.com/ethereum/remix-project into deploy3

pull/3260/head
filip mertens 2 years ago
commit f6e283cc4a
  1. 2
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  2. 2
      apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh
  3. 2
      apps/remix-ide/ci/deploy_from_travis_remix-beta.sh
  4. 2
      apps/remix-ide/ci/deploy_from_travis_remix-live.sh
  5. 2
      apps/remix-ide/ci/makeMockCompiler.js
  6. 2
      apps/solidity-compiler/src/app/compiler.ts
  7. 19
      libs/remix-tests/src/testRunner.ts
  8. 2
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  9. 4
      package.json

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

@ -14,7 +14,7 @@ echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./" cp -r $FILES_TO_PACKAGE "./"
rm -rf dist rm -rf dist
ls ls
FILES_TO_DEPLOY="assets index.html 404.html main*.js polyfills*.js *.css favicon.ico vendors~app*.js app*.js *raw-loader*.js" FILES_TO_DEPLOY="assets index.html 404.html *.js *.css favicon.ico"
# ZIP the whole directory # ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore # -f is needed because "build" is part of .gitignore

@ -14,7 +14,7 @@ echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./" cp -r $FILES_TO_PACKAGE "./"
rm -rf dist rm -rf dist
ls ls
FILES_TO_DEPLOY="assets index.html 404.html main*.js polyfills*.js *.css favicon.ico vendors~app*.js app*.js *raw-loader*.js" FILES_TO_DEPLOY="assets index.html 404.html *.js *.css favicon.ico"
# ZIP the whole directory # ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore # -f is needed because "build" is part of .gitignore

@ -14,7 +14,7 @@ echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./" cp -r $FILES_TO_PACKAGE "./"
rm -rf dist rm -rf dist
ls ls
FILES_TO_DEPLOY="assets index.html 404.html main*.js polyfills*.js *.css favicon.ico vendors~app*.js app*.js *raw-loader*.js" FILES_TO_DEPLOY="assets index.html 404.html *.js *.css favicon.ico"
# ZIP the whole directory # ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore # -f is needed because "build" is part of .gitignore

@ -3,7 +3,7 @@
var fs = require('fs') var fs = require('fs')
var compiler = require('solc') var compiler = require('solc')
var compilerInput = require('@remix-project/remix-solidity').CompilerInput 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') const path = require('path')
compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => { compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => {

@ -9,7 +9,7 @@ import { CompileTabLogic } from '@remix-ui/solidity-compiler'
const defaultCompilerParameters = { const defaultCompilerParameters = {
runs: '200', runs: '200',
optimize: false, optimize: false,
version: 'soljson-v0.8.7+commit.e28d00a7', version: 'soljson-v0.8.17+commit.8df45f5f',
evmVersion: null, // compiler default evmVersion: null, // compiler default
language: 'Solidity', language: 'Solidity',
useFileConfiguration: false, 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 }) } if (!isJSONInterfaceAvailable) { return resultsCallback(new Error('Contract interface not available'), { passingNum, failureNum, timePassed }) }
const runList: RunListInterface[] = createRunList(testObject.options.jsonInterface, fileAST, testName) const runList: RunListInterface[] = createRunList(testObject.options.jsonInterface, fileAST, testName)
const web3 = opts.web3 || new Web3() const web3 = opts.web3 || new Web3()
web3.eth.handleRevert = true // enables returning error reason on revert
const accts: TestResultInterface = { const accts: TestResultInterface = {
type: 'accountList', type: 'accountList',
value: opts.accounts value: opts.accounts
@ -375,23 +376,27 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
console.error(err) console.error(err)
return next(err) return next(err)
} }
}).on('error', async (err: Error) => { }).on('error', async (err) => {
const time: number = (Date.now() - startTime) / 1000.0 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 = { const resp: TestResultInterface = {
type: 'testFailure', type: 'testFailure',
value: changeCase.sentenceCase(func.name), value: changeCase.sentenceCase(func.name),
filename: testObject.filename, filename: testObject.filename,
time: time, time: time,
errMsg: err.message, errMsg,
context: testName, context: testName,
web3 web3
} }
if (err.message.includes('Transaction has been reverted by the EVM')) { if (err.receipt) txHash = err.receipt.transactionHash
const txHash = JSON.parse(err.message.replace('Transaction has been reverted by the EVM:', '')).transactionHash else if (err.message.includes('Transaction has been reverted by the EVM')) {
if (web3.eth && web3.eth.getHHLogsForTx) hhLogs = await web3.eth.getHHLogsForTx(txHash) txHash = JSON.parse(err.message.replace('Transaction has been reverted by the EVM:', '')).transactionHash
if (hhLogs && hhLogs.length) resp.hhLogs = hhLogs
resp.debugTxHash = txHash
} }
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) testCallback(undefined, resp)
failureNum += 1 failureNum += 1
timePassed += time timePassed += time

@ -53,7 +53,7 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
customVersions: [], customVersions: [],
compilerLicense: null, compilerLicense: null,
selectedVersion: 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: '', runs: '',
compiledFileName: '', compiledFileName: '',
includeNightlies: false, includeNightlies: false,

@ -56,8 +56,8 @@
"browsertest": "sleep 5 && yarn run nightwatch_local", "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/", "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_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": "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.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_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", "make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "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", "build:production": "NODE_ENV=production nx build remix-ide --configuration=production --skip-nx-cache",

Loading…
Cancel
Save