Unverified Commit ab6a04b3 authored by David Disu's avatar David Disu Committed by GitHub

Merge branch 'master' into cleanup-useEffect

parents 36d31f8b a269a468
...@@ -238,8 +238,8 @@ jobs: ...@@ -238,8 +238,8 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npx nx build remix-ide --with-deps
- run: npm run downloadsolc_assets - run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run: - run:
name: Deploy name: Deploy
command: | command: |
...@@ -267,6 +267,7 @@ jobs: ...@@ -267,6 +267,7 @@ jobs:
- checkout - checkout
- setup_remote_docker - setup_remote_docker
- run: npm install - run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps - run: npx nx build remix-ide --with-deps
- run: ./apps/remix-ide/ci/copy_resources.sh - run: ./apps/remix-ide/ci/copy_resources.sh
- run: ./apps/remix-ide/ci/publishIpfs - run: ./apps/remix-ide/ci/publishIpfs
...@@ -291,8 +292,8 @@ jobs: ...@@ -291,8 +292,8 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npx nx build remix-ide --with-deps
- run: npm run downloadsolc_assets - run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
- run: - run:
name: Deploy name: Deploy
command: | command: |
...@@ -320,8 +321,8 @@ jobs: ...@@ -320,8 +321,8 @@ jobs:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run build:libs - run: npm run build:libs
- run: npm run build
- run: npm run downloadsolc_assets - run: npm run downloadsolc_assets
- run: npm run build
- run: - run:
name: Deploy name: Deploy
command: | command: |
......
...@@ -49,7 +49,7 @@ module.exports = { ...@@ -49,7 +49,7 @@ module.exports = {
'Debug Ballot / delegate': function (browser: NightwatchBrowser) { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) {
browser.pause(500) browser.pause(500)
.click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') .click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]')
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000) .pause(2000)
......
...@@ -45,7 +45,7 @@ module.exports = { ...@@ -45,7 +45,7 @@ module.exports = {
'Debug Ballot / delegate': function (browser: NightwatchBrowser) { 'Debug Ballot / delegate': function (browser: NightwatchBrowser) {
browser.pause(500) browser.pause(500)
.click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') .click('*[data-id="txLoggerDebugButton0xf88bc0ac0761f78d8c883b32550c68dadcdb095595c30e1a1b7c583e5e958dcb"]')
.pause(2000) .pause(2000)
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
......
...@@ -420,7 +420,7 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line ...@@ -420,7 +420,7 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line
const jsGetTrace = `(async () => { const jsGetTrace = `(async () => {
try { try {
const result = await remix.call('debugger', 'getTrace', '0xbf309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af') const result = await remix.call('debugger', 'getTrace', '0xa38bff6f06e7c4fc91df1db6aa31a69ab5d5882faa953b1e7a88bfa523268ed7')
console.log('result ', result) console.log('result ', result)
} catch (e) { } catch (e) {
console.log(e.message) console.log(e.message)
...@@ -429,7 +429,7 @@ const jsGetTrace = `(async () => { ...@@ -429,7 +429,7 @@ const jsGetTrace = `(async () => {
const jsDebug = `(async () => { const jsDebug = `(async () => {
try { try {
const result = await remix.call('debugger', 'debug', '0xbf309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af') const result = await remix.call('debugger', 'debug', '0xa38bff6f06e7c4fc91df1db6aa31a69ab5d5882faa953b1e7a88bfa523268ed7')
console.log('result ', result) console.log('result ', result)
} catch (e) { } catch (e) {
console.log(e.message) console.log(e.message)
......
...@@ -170,6 +170,7 @@ class CompilerContainer { ...@@ -170,6 +170,7 @@ class CompilerContainer {
_retrieveVersion (version) { _retrieveVersion (version) {
if (!version) version = this._view.versionSelector.value if (!version) version = this._view.versionSelector.value
if (version === 'builtin') version = this.data.defaultVersion
return semver.coerce(version) ? semver.coerce(version).version : '' return semver.coerce(version) ? semver.coerce(version).version : ''
} }
...@@ -487,7 +488,7 @@ class CompilerContainer { ...@@ -487,7 +488,7 @@ class CompilerContainer {
this._view.versionSelector.appendChild(option) this._view.versionSelector.appendChild(option)
} }
}) })
if (semver.lt(this._retrieveVersion(), 'v0.4.12+commit.194ff033.js')) { if (this.data.selectedVersion !== 'builtin' && semver.lt(this._retrieveVersion(), 'v0.4.12+commit.194ff033.js')) {
toaster(yo` toaster(yo`
<div> <div>
<b>Old compiler usage detected.</b> <b>Old compiler usage detected.</b>
...@@ -500,7 +501,7 @@ class CompilerContainer { ...@@ -500,7 +501,7 @@ class CompilerContainer {
// Workers cannot load js on "file:"-URLs and we get a // Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// resort to non-worker version in that case. // resort to non-worker version in that case.
if (this.data.selectedVersion !== 'builtin' && canUseWorker(this.data.selectedVersion)) { if (canUseWorker(this._retrieveVersion())) {
this.compileTabLogic.compiler.loadVersion(true, url) this.compileTabLogic.compiler.loadVersion(true, url)
this.setVersionText('(loading using worker)') this.setVersionText('(loading using worker)')
} else { } else {
......
...@@ -9,7 +9,7 @@ const _paq = window._paq = window._paq || [] ...@@ -9,7 +9,7 @@ const _paq = window._paq = window._paq || []
const requiredModules = [ // services + layout views + system views const requiredModules = [ // services + layout views + system views
'manager', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme', 'manager', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme',
'fileManager', 'contentImport', 'web3Provider', 'scriptRunner', 'fetchAndCompile', 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'fileManager', 'contentImport', 'web3Provider', 'scriptRunner', 'fetchAndCompile', 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons',
'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp'] 'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider']
const dependentModules = ['git', 'hardhat'] // module which shouldn't be manually activated (e.g git is activated by remixd) const dependentModules = ['git', 'hardhat'] // module which shouldn't be manually activated (e.g git is activated by remixd)
......
...@@ -113,7 +113,7 @@ export class Transactions { ...@@ -113,7 +113,7 @@ export class Transactions {
} }
eth_estimateGas (payload, cb) { eth_estimateGas (payload, cb) {
cb(null, 3000000) cb(null, 10000000 * 8)
} }
eth_getCode (payload, cb) { eth_getCode (payload, cb) {
......
...@@ -122,7 +122,8 @@ export class VMContext { ...@@ -122,7 +122,8 @@ export class VMContext {
const vm = new VM({ const vm = new VM({
common, common,
activatePrecompiles: true, activatePrecompiles: true,
stateManager: stateManager stateManager: stateManager,
allowUnlimitedContractSize: true
}) })
const web3vm = new remixLibVm.Web3VMProvider() const web3vm = new remixLibVm.Web3VMProvider()
......
...@@ -110,7 +110,7 @@ export function deployAll (compileResult: compilationInterface, web3: Web3, with ...@@ -110,7 +110,7 @@ export function deployAll (compileResult: compilationInterface, web3: Web3, with
const params = '' // we suppose that the test contract does not have any param in the constructor const params = '' // we suppose that the test contract does not have any param in the constructor
execution.txFormat.encodeConstructorCallAndDeployLibraries(contractName, contract.raw, compileResult, params, funAbi, encodeDataFinalCallback, encodeDataStepCallback, encodeDataDeployLibraryCallback) execution.txFormat.encodeConstructorCallAndDeployLibraries(contractName, contract.raw, compileResult, params, funAbi, encodeDataFinalCallback, encodeDataStepCallback, encodeDataDeployLibraryCallback)
}, function (err) { }, function (err) {
if (err) next(err) if (err) return next(err)
next(null, contracts) next(null, contracts)
}) })
} }
......
...@@ -63,9 +63,16 @@ export function runTestFiles (filepath: string, isDirectory: boolean, web3: Web3 ...@@ -63,9 +63,16 @@ export function runTestFiles (filepath: string, isDirectory: boolean, web3: Web3
} }
deployAll(compilationResult, web3, false, (err, contracts) => { deployAll(compilationResult, web3, false, (err, contracts) => {
if (err) { if (err) {
next(err) // If contract deployment fails because of 'Out of Gas' error, try again with double gas
} // This is temporary, should be removed when remix-tests will have a dedicated UI to
next(null, compilationResult, contracts) // accept deployment params from UI
if (err.message.includes('The contract code couldn\'t be stored, please check your gas limit')) {
deployAll(compilationResult, web3, true, (error, contracts) => {
if (error) next([{ message: 'contract deployment failed after trying twice: ' + error.message, severity: 'error' }]) // IDE expects errors in array
else next(null, compilationResult, contracts)
})
} else { next([{ message: 'contract deployment failed: ' + err.message, severity: 'error' }]) } // IDE expects errors in array
} else { next(null, compilationResult, contracts) }
}) })
}, },
function determineTestContractsToRun (compilationResult: compilationInterface, contracts: any, next) { function determineTestContractsToRun (compilationResult: compilationInterface, contracts: any, next) {
......
...@@ -238,7 +238,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com ...@@ -238,7 +238,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
sender = opts.accounts[sender] sender = opts.accounts[sender]
} }
} }
let sendParams: Record<string, string> | null = null let sendParams: Record<string, any> | null = null
if (sender) sendParams = { from: sender } if (sender) sendParams = { from: sender }
if (func.inputs && func.inputs.length > 0) { return resultsCallback(new Error(`Method '${func.name}' can not have parameters inside a test contract`), { passingNum, failureNum, timePassed }) } if (func.inputs && func.inputs.length > 0) { return resultsCallback(new Error(`Method '${func.name}' can not have parameters inside a test contract`), { passingNum, failureNum, timePassed }) }
const method = testObject.methods[func.name].apply(testObject.methods[func.name], []) const method = testObject.methods[func.name].apply(testObject.methods[func.name], [])
...@@ -280,6 +280,8 @@ export function runTest (testName: string, testObject: any, contractDetails: Com ...@@ -280,6 +280,8 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
else sendParams = { value } else sendParams = { value }
} }
} }
if (!sendParams) sendParams = {}
sendParams.gas = 10000000 * 8
method.send(sendParams).on('receipt', (receipt) => { method.send(sendParams).on('receipt', (receipt) => {
try { try {
const time: number = (Date.now() - startTime) / 1000.0 const time: number = (Date.now() - startTime) / 1000.0
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
"bumpVersion:libs": "gulp & gulp syncLibVersions;", "bumpVersion:libs": "gulp & gulp syncLibVersions;",
"browsertest": "sleep 5 && npm run nightwatch_local", "browsertest": "sleep 5 && npm 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": "wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.8.4+commit.c7e474f2.js -O ./apps/remix-ide/src/assets/js/soljson.js", "downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.4+commit.c7e474f2.js -O ./apps/remix-ide/src/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",
"nightwatch_parallel": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", "nightwatch_parallel": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment