pull/4557/head
Dimitris Apostolou 9 months ago committed by Aniket
parent 51a2ff5daa
commit ec8ee514c4
  1. 2
      Dockerfile.dev
  2. 2
      apps/circuit-compiler/src/app/services/circomPluginClient.ts
  3. 2
      apps/circuit-compiler/src/snarkjs.min.js
  4. 8
      apps/remix-ide-e2e/src/commands/journalChildIncludes.ts
  5. 6
      apps/remix-ide-e2e/src/examples/example-contracts.ts
  6. 2
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  7. 2
      apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts
  8. 10
      apps/remix-ide-e2e/src/tests/compiler_api.test.ts
  9. 2
      apps/remix-ide-e2e/src/tests/publishContract.test.ts
  10. 2
      apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts
  11. 16
      apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
  12. 4
      apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts
  13. 2
      apps/remix-ide-e2e/src/tests/workspace.test.ts
  14. 4
      apps/remix-ide-e2e/src/tests/workspace_git.test.ts
  15. 2
      apps/remix-ide/Dockerfile.dev
  16. 4
      apps/remix-ide/ci/sauceDisconnect.js
  17. 2
      apps/remix-ide/contracts/foundry/out/Script.sol/Script.json
  18. 8
      apps/remix-ide/meetings.md
  19. 6
      apps/remix-ide/src/app/editor/editor.js
  20. 4
      apps/remix-ide/src/app/files/dgitProvider.ts
  21. 2
      apps/remix-ide/src/app/plugins/code-format.ts
  22. 2
      apps/remix-ide/src/app/plugins/compile-details.tsx
  23. 2
      apps/remix-ide/src/app/plugins/file-decorator.ts
  24. 2
      apps/remix-ide/src/app/plugins/parser/services/code-parser-compiler.ts
  25. 2
      apps/remix-ide/src/app/tabs/locales/en/permissionHandler.json
  26. 2
      apps/remix-ide/src/app/tabs/locales/en/publishToStorage.json
  27. 2
      apps/remix-ide/src/app/tabs/locales/en/search.json
  28. 4
      apps/remix-ide/src/app/tabs/locales/en/solidity.json
  29. 2
      apps/remix-ide/src/app/tabs/locales/en/terminal.json
  30. 4
      apps/remix-ide/src/app/tabs/locales/en/udapp.json
  31. 2
      apps/remix-ide/src/app/tabs/network-module.js
  32. 6
      apps/remix-ide/src/app/tabs/runTab/model/recorder.js
  33. 2
      apps/remix-ide/src/app/tabs/styles/settings-tab-styles.js
  34. 2
      apps/remix-ide/src/app/tabs/theme-module.js
  35. 6
      apps/remix-ide/src/assets/js/parser/antlr.js
  36. 2
      apps/remix-ide/src/assets/js/parser/antlr.js.map
  37. 4
      apps/remix-ide/src/blockchain/blockchain.tsx
  38. 2
      apps/remixdesktop/src/menus/darwin.ts
  39. 2
      apps/vyper/src/app/utils/remix-client.tsx
  40. 10
      libs/remix-analyzer/src/solidity-analyzer/modules/abstractAstView.ts
  41. 6
      libs/remix-analyzer/src/solidity-analyzer/modules/checksEffectsInteraction.ts
  42. 6
      libs/remix-analyzer/src/solidity-analyzer/modules/constantFunctions.ts
  43. 6
      libs/remix-analyzer/src/solidity-analyzer/modules/functionCallGraph.ts
  44. 4
      libs/remix-analyzer/src/solidity-analyzer/modules/noReturn.ts
  45. 4
      libs/remix-analyzer/src/solidity-analyzer/modules/similarVariableNames.ts
  46. 16
      libs/remix-analyzer/src/solidity-analyzer/modules/staticAnalysisCommon.ts
  47. 2
      libs/remix-analyzer/src/solidity-analyzer/modules/stringBytesLength.ts
  48. 2
      libs/remix-analyzer/src/types.ts
  49. 8
      libs/remix-analyzer/test/analysis/staticAnalysisCommon-test.ts
  50. 8
      libs/remix-core-plugin/src/lib/compiler-content-imports.ts
  51. 10
      libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts
  52. 16
      libs/remix-core-plugin/src/lib/offset-line-to-column-converter.ts
  53. 4
      libs/remix-debug/src/code/codeResolver.ts
  54. 4
      libs/remix-debug/src/solidity-decoder/decodeInfo.ts
  55. 2
      libs/remix-debug/src/solidity-decoder/solidityProxy.ts
  56. 16
      libs/remix-debug/src/source/offsetToLineColumnConverter.ts
  57. 2
      libs/remix-debug/src/storage/mappingPreimages.ts
  58. 4
      libs/remix-debug/src/storage/storageResolver.ts
  59. 2
      libs/remix-debug/src/trace/traceCache.ts
  60. 2
      libs/remix-debug/test.ts
  61. 4
      libs/remix-lib/src/execution/txExecution.ts
  62. 20
      libs/remix-lib/src/execution/txFormat.ts
  63. 2
      libs/remix-lib/src/execution/txListener.ts
  64. 2
      libs/remix-lib/src/execution/txRunnerWeb3.ts
  65. 2
      libs/remix-lib/src/hash.ts
  66. 4
      libs/remix-lib/src/helpers/uiHelper.ts
  67. 14
      libs/remix-lib/src/util.ts
  68. 10
      libs/remix-lib/test/eventManager.ts
  69. 10
      libs/remix-lib/test/util.ts
  70. 6
      libs/remix-tests/src/testRunner.ts
  71. 12
      libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts
  72. 6
      libs/remix-ui/editor/src/types/monaco.ts
  73. 4
      libs/remix-ui/home-tab/src/lib/components/types/carouselTypes.ts
  74. 8
      libs/remix-ui/plugin-manager/src/types.d.ts
  75. 2
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx
  76. 2
      libs/remix-ui/run-tab/src/lib/types/blockchain.d.ts
  77. 4
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  78. 2
      libs/remix-ui/solidity-compiler/src/lib/contract-selection.tsx
  79. 2
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
  80. 2
      libs/remix-ui/theme-module/types/theme-module.ts
  81. 14
      libs/remix-ui/workspace/src/lib/actions/index.ts
  82. 2
      libs/remix-ui/workspace/src/lib/actions/workspace.ts
  83. 2
      libs/remixd/src/scripts/installSlither.ts
  84. 2
      release-management.md
  85. 6
      team-best-practices.md

@ -1,4 +1,4 @@
# This dockerfile is to build each branch seperately (for dev purposes) # This dockerfile is to build each branch separately (for dev purposes)
FROM node:10 FROM node:10
# Create Remix user, don't use root! # Create Remix user, don't use root!
# RUN yes | adduser --disabled-password remix && mkdir /app # RUN yes | adduser --disabled-password remix && mkdir /app

@ -298,7 +298,7 @@ export class CircomPluginClient extends PluginClient {
} }
} else { } else {
if (depPath) { if (depPath) {
// resolves relative dependecies for .deps folder // resolves relative dependencies for .deps folder
path = pathModule.resolve(depPath.slice(0, depPath.lastIndexOf('/')), include) path = pathModule.resolve(depPath.slice(0, depPath.lastIndexOf('/')), include)
path = path.replace('https:/', 'https://') path = path.replace('https:/', 'https://')
if (path.indexOf('/') === 0) path = path.slice(1) if (path.indexOf('/') === 0) path = path.slice(1)

File diff suppressed because one or more lines are too long

@ -5,10 +5,10 @@ import EventEmitter from 'events'
Checks if any child elements of journal (console) contains a matching value. Checks if any child elements of journal (console) contains a matching value.
*/ */
class JournalChildIncludes extends EventEmitter { class JournalChildIncludes extends EventEmitter {
command (this: NightwatchBrowser, val: string, opts = { shouldHaveOnlyOneOccurence: false }): NightwatchBrowser { command (this: NightwatchBrowser, val: string, opts = { shouldHaveOnlyOneOccurrence: false }): NightwatchBrowser {
let isTextFound = false let isTextFound = false
const browser = this.api const browser = this.api
let occurence = 0 let occurrence = 0
this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => { this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => {
Array.isArray(res.value) && res.value.forEach(function (jsonWebElement) { Array.isArray(res.value) && res.value.forEach(function (jsonWebElement) {
const jsonWebElementId = jsonWebElement[ELEMENT_KEY] || jsonWebElement[Object.keys(jsonWebElement)[0]] const jsonWebElementId = jsonWebElement[ELEMENT_KEY] || jsonWebElement[Object.keys(jsonWebElement)[0]]
@ -18,14 +18,14 @@ class JournalChildIncludes extends EventEmitter {
if (typeof text === 'string' && text.indexOf(val) !== -1) { if (typeof text === 'string' && text.indexOf(val) !== -1) {
isTextFound = true isTextFound = true
occurence++ occurrence++
} }
}) })
}) })
}) })
browser.perform(() => { browser.perform(() => {
browser.assert.ok(isTextFound, isTextFound ? `<*[data-id="terminalJournal"]> contains ${val}.` : `${val} not found in <*[data-id="terminalJournal"]> div:last-child>`) browser.assert.ok(isTextFound, isTextFound ? `<*[data-id="terminalJournal"]> contains ${val}.` : `${val} not found in <*[data-id="terminalJournal"]> div:last-child>`)
if (opts.shouldHaveOnlyOneOccurence) browser.assert.ok(occurence === 1, `${occurence} occurence found of "${val}"`) if (opts.shouldHaveOnlyOneOccurrence) browser.assert.ok(occurrence === 1, `${occurrence} occurrence found of "${val}"`)
this.emit('complete') this.emit('complete')
}) })
return this return this

@ -4,7 +4,7 @@ const storage = `pragma solidity >=0.7.0 <0.9.0;
/** /**
* @title Storage * @title Storage
* @dev Store & retreive value in a variable * @dev Store & retrieve value in a variable
*/ */
contract Storage { contract Storage {
@ -22,7 +22,7 @@ contract Storage {
* @dev Return value * @dev Return value
* @return value of 'number' * @return value of 'number'
*/ */
function retreive() public view returns (uint256){ function retrieve() public view returns (uint256){
return number; return number;
} }
}` }`
@ -301,7 +301,7 @@ contract BallotTest {
Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name"); Assert.equal(ballotToTest.winnerName(), bytes32("candidate1"), "candidate1 should be the winner name");
} }
function checkWinninProposalWithReturnValue () public view returns (bool) { function checkWinningProposalWithReturnValue () public view returns (bool) {
return ballotToTest.winningProposal() == 0; return ballotToTest.winningProposal() == 0;
} }
} }

@ -75,7 +75,7 @@ module.exports = {
abortOnFailure: false, abortOnFailure: false,
suppressNotFoundErrors: true, suppressNotFoundErrors: true,
}) })
// we are not changing the visibility for not checksumed contracts // we are not changing the visibility for not checksummed contracts
// .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) // .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false)
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)

@ -71,7 +71,7 @@ module.exports = {
abortOnFailure: false, abortOnFailure: false,
suppressNotFoundErrors: true, suppressNotFoundErrors: true,
}) })
// we are not changing the visibility for not checksumed contracts // we are not changing the visibility for not checksummed contracts
// .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) // .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false)
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)

@ -18,7 +18,7 @@ module.exports = {
return sources return sources
}, },
'Should compile using "compileWithParamaters" API #group1': function (browser: NightwatchBrowser) { 'Should compile using "compileWithParameters" API #group1': function (browser: NightwatchBrowser) {
browser browser
.addFile('test_jsCompile.js', { content: jsCompile }) .addFile('test_jsCompile.js', { content: jsCompile })
.executeScriptInTerminal('remix.exeCurrent()') .executeScriptInTerminal('remix.exeCurrent()')
@ -26,7 +26,7 @@ module.exports = {
.click('*[data-id="terminalClearConsole"]') .click('*[data-id="terminalClearConsole"]')
}, },
'Should compile using "compileWithParamaters" API with optimization On #group2': function (browser: NightwatchBrowser) { 'Should compile using "compileWithParameters" API with optimization On #group2': function (browser: NightwatchBrowser) {
browser browser
.addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization }) .addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization })
.executeScriptInTerminal('remix.exeCurrent()') .executeScriptInTerminal('remix.exeCurrent()')
@ -34,7 +34,7 @@ module.exports = {
.click('*[data-id="terminalClearConsole"]') .click('*[data-id="terminalClearConsole"]')
}, },
'Should compile using "compileWithParamaters" API with optimization off check default runs #group3': function (browser: NightwatchBrowser) { 'Should compile using "compileWithParameters" API with optimization off check default runs #group3': function (browser: NightwatchBrowser) {
browser browser
.addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault }) .addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault })
.executeScriptInTerminal('remix.exeCurrent()') .executeScriptInTerminal('remix.exeCurrent()')
@ -65,7 +65,7 @@ const simpleContract = `pragma solidity >=0.4.22 <0.9.1;
/** /**
* @title Storage * @title Storage
* @dev Store & retreive value in a variable * @dev Store & retrieve value in a variable
*/ */
contract StorageTestUpdateConfiguration { contract StorageTestUpdateConfiguration {
@ -83,7 +83,7 @@ contract StorageTestUpdateConfiguration {
* @dev Return value * @dev Return value
* @return value of 'number' * @return value of 'number'
*/ */
function retreive() public view returns (uint256){ function retrieve() public view returns (uint256){
return number; return number;
} }
} }

@ -38,7 +38,7 @@ module.exports = {
.openFile('ipfs/QmXYUS1ueS22EqNVRaKuZa31EgHLjKZ8uTM8vWhQLxa3pw') .openFile('ipfs/QmXYUS1ueS22EqNVRaKuZa31EgHLjKZ8uTM8vWhQLxa3pw')
}, },
/* Disableing the test untill refactoring and the new swarm usage /* Disabling the test until refactoring and the new swarm usage
'Publish on Swarm': '' + function (browser: NightwatchBrowser) { 'Publish on Swarm': '' + function (browser: NightwatchBrowser) {
browser browser
.click('#publishOnSwarm') .click('#publishOnSwarm')

@ -202,7 +202,7 @@ module.exports = {
}, },
/* /*
* This test is using 3 differents services: * This test is using 3 different services:
* - Metamask for getting the transaction * - Metamask for getting the transaction
* - Source Verifier service for fetching the contract code * - Source Verifier service for fetching the contract code
* - Ropsten node for retrieving the trace and storage * - Ropsten node for retrieving the trace and storage

@ -42,7 +42,7 @@ module.exports = {
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.click('.udapp_contractActionsContainerSingle > div') .click('.udapp_contractActionsContainerSingle > div')
.clickInstance(0) .clickInstance(0)
.clickFunction('retunValues1 - transact (not payable)') .clickFunction('returnValues1 - transact (not payable)')
.testFunction('last', .testFunction('last',
{ {
status: '0x1 Transaction mined and execution succeed', status: '0x1 Transaction mined and execution succeed',
@ -53,7 +53,7 @@ module.exports = {
3: 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' 3: 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
} }
}) })
.clickFunction('retunValues2 - transact (not payable)') .clickFunction('returnValues2 - transact (not payable)')
.testFunction('last', .testFunction('last',
{ {
status: '0x1 Transaction mined and execution succeed', status: '0x1 Transaction mined and execution succeed',
@ -70,7 +70,7 @@ module.exports = {
9: 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000' 9: 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000'
} }
}).pause(500) }).pause(500)
.clickFunction('retunValues3 - transact (not payable)') .clickFunction('returnValues3 - transact (not payable)')
.testFunction('last', .testFunction('last',
{ {
status: '0x1 Transaction mined and execution succeed', status: '0x1 Transaction mined and execution succeed',
@ -312,10 +312,10 @@ const sources = [
contract TestContract { function f() public returns (uint) { return 8; } contract TestContract { function f() public returns (uint) { return 8; }
function g() public returns (uint, string memory, bool, uint) { function g() public returns (uint, string memory, bool, uint) {
uint payment = 345; uint payment = 345;
bool payed = true; bool paid = true;
string memory comment = "comment_comment_"; string memory comment = "comment_comment_";
uint month = 4; uint month = 4;
return (payment, comment, payed, month); } }` return (payment, comment, paid, month); } }`
} }
}, },
{ {
@ -323,14 +323,14 @@ const sources = [
content: ` content: `
contract testReturnValues { contract testReturnValues {
enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill }
function retunValues1 () public returns (bool _b, uint _u, int _i, address _a) { function returnValues1 () public returns (bool _b, uint _u, int _i, address _a) {
_b = true; _b = true;
_u = 345; _u = 345;
_i = -345; _i = -345;
_a = msg.sender; _a = msg.sender;
} }
function retunValues2 () public returns (bytes1 _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) { function returnValues2 () public returns (bytes1 _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) {
_b = 0x12; _b = 0x12;
_b2 = 0x1223; _b2 = 0x1223;
_b5 = hex"043245"; _b5 = hex"043245";
@ -342,7 +342,7 @@ const sources = [
_str = "this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string"; _str = "this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string";
} }
function retunValues3 () public returns (ActionChoices _en, int[5][] memory _a1) { function returnValues3 () public returns (ActionChoices _en, int[5][] memory _a1) {
_en = ActionChoices.GoStraight; _en = ActionChoices.GoStraight;
int[5][] memory a = new int[5][](3); int[5][] memory a = new int[5][](3);
a[0] = [int(1),-45,-78,56,60]; a[0] = [int(1),-45,-78,56,60];

@ -7,7 +7,7 @@ module.exports = {
init(browser, done, 'http://127.0.0.1:8080', false) init(browser, done, 'http://127.0.0.1:8080', false)
}, },
'Checks vertical icons panelcontex menu': function (browser: NightwatchBrowser) { 'Checks vertical icons panel context menu': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('*[data-id="verticalIconsKindpluginManager"]') .waitForElementVisible('*[data-id="verticalIconsKindpluginManager"]')
.click('*[data-id="verticalIconsKindpluginManager"]') .click('*[data-id="verticalIconsKindpluginManager"]')
@ -19,7 +19,7 @@ module.exports = {
.click('*[data-id="remixIdeIconPanel"]') .click('*[data-id="remixIdeIconPanel"]')
}, },
'Checks vertical icons panel contex menu deactivate': function (browser: NightwatchBrowser) { 'Checks vertical icons panel context menu deactivate': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('*[data-id="verticalIconsKinddebugger"]', 7000) .waitForElementVisible('*[data-id="verticalIconsKinddebugger"]', 7000)
.pause(5000) .pause(5000)

@ -501,7 +501,7 @@ module.exports = {
.pause(2000) .pause(2000)
}, },
'Should change the current workspace in localstorage to a non existant value, reload the page and see the workspace created #group2': function (browser: NightwatchBrowser) { 'Should change the current workspace in localstorage to a non existent value, reload the page and see the workspace created #group2': function (browser: NightwatchBrowser) {
browser browser
.execute(function () { .execute(function () {
localStorage.setItem('currentWorkspace', 'non_existing_workspace') localStorage.setItem('currentWorkspace', 'non_existing_workspace')

@ -209,7 +209,7 @@ module.exports = {
.expect.element('[data-id="workspaceGit-newLocalBranch"]').text.to.contain('✓ ') .expect.element('[data-id="workspaceGit-newLocalBranch"]').text.to.contain('✓ ')
}, },
'Should checkout to an exisiting local branch #group3': function (browser: NightwatchBrowser) { 'Should checkout to an existing local branch #group3': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('[data-id="custom-dropdown-menu"]') .waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementPresent('[data-id="workspaceGitInput"]') .waitForElementPresent('[data-id="workspaceGitInput"]')
@ -239,7 +239,7 @@ module.exports = {
.expect.element('[data-id="workspaceGit-main"]').text.to.contain('✓ ') .expect.element('[data-id="workspaceGit-main"]').text.to.contain('✓ ')
}, },
'Should force checkout to a branch with exisiting local changes #group3': function (browser: NightwatchBrowser) { 'Should force checkout to a branch with existing local changes #group3': function (browser: NightwatchBrowser) {
browser browser
.waitForElementVisible('[data-id="workspaceGit-dev"]') .waitForElementVisible('[data-id="workspaceGit-dev"]')
.click('[data-id="workspaceGit-dev"]') .click('[data-id="workspaceGit-dev"]')

@ -1,4 +1,4 @@
# This dockerfile is to build each branch seperately (for dev purpouses) # This dockerfile is to build each branch separately (for dev purpouses)
FROM node:10 FROM node:10
# Create Remix user, don't use root! # Create Remix user, don't use root!
# RUN yes | adduser --disabled-password remix && mkdir /app # RUN yes | adduser --disabled-password remix && mkdir /app

@ -18,7 +18,7 @@ function removeTunnel () {
retrieveTunnel(data[k], function (error, result) { retrieveTunnel(data[k], function (error, result) {
if (error) { if (error) {
console.log(error) console.log(error)
} else if (result.identtifier === tunnelName) { } else if (result.identifier === tunnelName) {
deleteTunnel(result.id, function () { deleteTunnel(result.id, function () {
console.log('tunnel deleted ' + data[k] + ' ' + tunnelName) console.log('tunnel deleted ' + data[k] + ' ' + tunnelName)
}) })
@ -35,7 +35,7 @@ function retrieveTunnel (tunnelid, callback) {
if (error) { if (error) {
callback(error) callback(error)
} else { } else {
callback(null, {'identtifier': JSON.parse(result).tunnel_identifier, 'id': tunnelid}) callback(null, {'identifier': JSON.parse(result).tunnel_identifier, 'id': tunnelid})
} }
}) })
} }

@ -3355,7 +3355,7 @@
"id": 1818, "id": 1818,
"nodeType": "StructuredDocumentation", "nodeType": "StructuredDocumentation",
"src": "361:227:1", "src": "361:227:1",
"text": "@dev Compute the address a contract will be deployed at for a given deployer address and nonce\n @notice adapated from Solmate implementation (https://github.com/transmissions11/solmate/blob/main/src/utils/LibRLP.sol)" "text": "@dev Compute the address a contract will be deployed at for a given deployer address and nonce\n @notice adapted from Solmate implementation (https://github.com/transmissions11/solmate/blob/main/src/utils/LibRLP.sol)"
}, },
"implemented": true, "implemented": true,
"kind": "function", "kind": "function",

@ -21,8 +21,8 @@ we move the documentation to the remix-ide repository
## medium post policy ## medium post policy
Any post that relates to Ethereum could be put in the remix plublication. Any post that relates to Ethereum could be put in the remix publication.
Although that is not mandatory and left up to the writter. Although that is not mandatory and left up to the writer.
## guided tour ## guided tour
@ -32,7 +32,7 @@ It will work as a native plugin, started by default.
Each other native plugin can request a guided tour with: Each other native plugin can request a guided tour with:
`this.call('guidedtour', 'start', 'debugger')` `this.call('guidedtour', 'start', 'debugger')`
Other type of plugin may be able to the native plugin guided tour but we won't push this if the integration is not working out of the box. Other type of plugin may be able to the native plugin guided tour but we won't push this if the integration is not working out of the box.
We rather update the remix-plugin doc saying that `guided tour framework name` is the prefferred one. We rather update the remix-plugin doc saying that `guided tour framework name` is the preferred one.
## web site ## web site
@ -49,7 +49,7 @@ it will be set of file:
- solidity contract - solidity contract
- test contract - test contract
we only support md for now and move to supporting other format if needded. we only support md for now and move to supporting other format if needed.
It requires the "test" native plugin to extend its API. It requires the "test" native plugin to extend its API.
@rob/@francois are managing that. @rob/@francois are managing that.

@ -360,7 +360,7 @@ class Editor extends Plugin {
/** /**
* Path of the currently editing file * Path of the currently editing file
* returns `undefined` if no session is being editer * returns `undefined` if no session is being edited
* @return {String} path of the current session * @return {String} path of the current session
*/ */
current () { current () {
@ -449,7 +449,7 @@ class Editor extends Plugin {
} }
/** /**
* Clears all the decorations for the given @arg filePath and @arg plugin, if none is given, the current sesssion is used. * Clears all the decorations for the given @arg filePath and @arg plugin, if none is given, the current session is used.
* An annotation has the following shape: * An annotation has the following shape:
column: -1 column: -1
row: -1 row: -1
@ -502,7 +502,7 @@ class Editor extends Plugin {
} }
/** /**
* Clears all the annotations for the given @arg filePath, the plugin name is retrieved from the context, if none is given, the current sesssion is used. * Clears all the annotations for the given @arg filePath, the plugin name is retrieved from the context, if none is given, the current session is used.
* An annotation has the following shape: * An annotation has the following shape:
column: -1 column: -1
row: -1 row: -1

@ -577,7 +577,7 @@ class DGitProvider extends Plugin {
dir dir
}) })
} catch (e) { } catch (e) {
this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occured! ${e}` }) this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occurred! ${e}` })
console.log(e) console.log(e)
} }
} }
@ -587,7 +587,7 @@ class DGitProvider extends Plugin {
}, 1000) }, 1000)
} }
} catch (e) { } catch (e) {
this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occured! ${e}` }) this.call('terminal', 'log', { type: 'error', value: `[Cloning]: Error occurred! ${e}` })
// do nothing // do nothing
} }
} }

@ -9,7 +9,7 @@ import { filePathFilter, AnyFilter } from '@jsdevtools/file-path-filter'
const profile = { const profile = {
name: 'codeFormatter', name: 'codeFormatter',
desciption: 'prettier plugin for Remix', description: 'prettier plugin for Remix',
methods: ['format'], methods: ['format'],
events: [''], events: [''],
version: '0.0.1' version: '0.0.1'

@ -45,7 +45,7 @@ export class CompilationDetailsPlugin extends ViewPlugin {
async showDetails(sentPayload: any) { async showDetails(sentPayload: any) {
await this.call('tabs', 'focus', 'compilationDetails') await this.call('tabs', 'focus', 'compilationDetails')
setTimeout(() => { setTimeout(() => {
// TODO: use the react API to render when the tab is focused and tbe plugin in the view. // TODO: use the react API to render when the tab is focused and the plugin in the view.
this.payload = sentPayload this.payload = sentPayload
this.renderComponent() this.renderComponent()
}, 2000) }, 2000)

@ -7,7 +7,7 @@ import { fileDecoration } from '@remix-ui/file-decorators'
const profile = { const profile = {
name: 'fileDecorator', name: 'fileDecorator',
desciption: 'Keeps decorators of the files', description: 'Keeps decorators of the files',
methods: ['setFileDecorators', 'clearFileDecorators', 'clearAllFileDecorators'], methods: ['setFileDecorators', 'clearFileDecorators', 'clearAllFileDecorators'],
events: ['fileDecoratorsChanged'], events: ['fileDecoratorsChanged'],
version: '0.0.1' version: '0.0.1'

@ -35,7 +35,7 @@ type errorMarker = {
} }
export default class CodeParserCompiler { export default class CodeParserCompiler {
plugin: CodeParser plugin: CodeParser
compiler: any // used to compile the current file seperately from the main compiler compiler: any // used to compile the current file separately from the main compiler
onAstFinished: (success: any, data: CompilationResult, source: CompilationSourceCode, input: any, version: any) => Promise<void>; onAstFinished: (success: any, data: CompilationResult, source: CompilationSourceCode, input: any, version: any) => Promise<void>;
errorState: boolean; errorState: boolean;
gastEstimateTimeOut: any gastEstimateTimeOut: any

@ -1,5 +1,5 @@
{ {
"permissionHandler.allPermissionsReset": "All permisssions have been reset.", "permissionHandler.allPermissionsReset": "All permissions have been reset.",
"permissionHandler.rememberText": "has changed and", "permissionHandler.rememberText": "has changed and",
"permissionHandler.permissionHandlerMessage": "\"{from}\" {rememberText} would like to access to \"{method}\" of \"{to}\"`", "permissionHandler.permissionHandlerMessage": "\"{from}\" {rememberText} would like to access to \"{method}\" of \"{to}\"`",
"permissionHandler.description": "Description", "permissionHandler.description": "Description",

@ -10,7 +10,7 @@
"publishToStorage.title4.message3": "Instead of that, 4 options are now available:", "publishToStorage.title4.message3": "Instead of that, 4 options are now available:",
"publishToStorage.title4.message4": "DEFAULT OPTION: Use the public INFURA node. This will not guarantee your data will persist.", "publishToStorage.title4.message4": "DEFAULT OPTION: Use the public INFURA node. This will not guarantee your data will persist.",
"publishToStorage.title4.message5": "Use your own INFURA IPFS node. This requires a subscription. <a>Learn more</a>", "publishToStorage.title4.message5": "Use your own INFURA IPFS node. This requires a subscription. <a>Learn more</a>",
"publishToStorage.title4.message6": "Use any external IPFS which doesn’t require any authentification.", "publishToStorage.title4.message6": "Use any external IPFS which doesn’t require any authentication.",
"publishToStorage.title4.message7": "Use your own local ipfs node (which usually runs under http://localhost:5001)", "publishToStorage.title4.message7": "Use your own local ipfs node (which usually runs under http://localhost:5001)",
"publishToStorage.title4.message8": "You can update your IPFS settings in the SETTINGS tab.", "publishToStorage.title4.message8": "You can update your IPFS settings in the SETTINGS tab.",
"publishToStorage.title4.message9": "Now the default option will be used.", "publishToStorage.title4.message9": "Now the default option will be used.",

@ -20,5 +20,5 @@
"search.no": "No", "search.no": "No",
"search.loading": "Loading", "search.loading": "Loading",
"search.text1": "showing {count} results in {fileCount} files", "search.text1": "showing {count} results in {fileCount} files",
"search.text2": "Too many resuls to display...{br}Please narrow down your search." "search.text2": "Too many results to display...{br}Please narrow down your search."
} }

@ -46,7 +46,7 @@
"solidity.compileIconAttribute": "compiler is loading, please wait a few moments.", "solidity.compileIconAttribute": "compiler is loading, please wait a few moments.",
"solidity.compilerLicense": "Compiler License", "solidity.compilerLicense": "Compiler License",
"solidity.compilerLicenseMsg1": "Compiler is loading. License will be displayed once compiler is loaded", "solidity.compilerLicenseMsg1": "Compiler is loading. License will be displayed once compiler is loaded",
"solidity.compilerLicenseMsg2": "Could not retreive license for selected compiler version", "solidity.compilerLicenseMsg2": "Could not retrieve license for selected compiler version",
"solidity.compilerLicenseMsg3": "License not available", "solidity.compilerLicenseMsg3": "License not available",
"solidity.seeCompilerLicense": "See compiler license", "solidity.seeCompilerLicense": "See compiler license",
@ -69,7 +69,7 @@
"solidity.Assembly": "Assembly opcodes describing the contract including corresponding solidity source code", "solidity.Assembly": "Assembly opcodes describing the contract including corresponding solidity source code",
"solidity.Opcodes": "Assembly opcodes describing the contract", "solidity.Opcodes": "Assembly opcodes describing the contract",
"solidity.name": "Name of the compiled contract", "solidity.name": "Name of the compiled contract",
"solidity.metadata": "Contains all informations related to the compilation", "solidity.metadata": "Contains all information related to the compilation",
"solidity.bytecode": "Bytecode being executed during contract creation", "solidity.bytecode": "Bytecode being executed during contract creation",
"solidity.abi": "ABI: describing all the functions (input/output params, scope, ...)", "solidity.abi": "ABI: describing all the functions (input/output params, scope, ...)",
"solidity.web3Deploy": "Copy/paste this code to any JavaScript/Web3 console to deploy this contract", "solidity.web3Deploy": "Copy/paste this code to any JavaScript/Web3 console to deploy this contract",

@ -15,7 +15,7 @@
"terminal.welcomeText8": "Right click on a JavaScript file in the file explorer and then click `Run`", "terminal.welcomeText8": "Right click on a JavaScript file in the file explorer and then click `Run`",
"terminal.welcomeText9": "The following libraries are accessible", "terminal.welcomeText9": "The following libraries are accessible",
"terminal.welcomeText10": "Type the library name to see available commands", "terminal.welcomeText10": "Type the library name to see available commands",
"terminal.text1": "This type of command has been deprecated and is not functionning anymore. Please run remix.help() to list available commands.", "terminal.text1": "This type of command has been deprecated and is not functioning anymore. Please run remix.help() to list available commands.",
"terminal.hideTerminal": "Hide Terminal", "terminal.hideTerminal": "Hide Terminal",
"terminal.showTerminal": "Show Terminal", "terminal.showTerminal": "Show Terminal",
"terminal.clearConsole": "Clear console", "terminal.clearConsole": "Clear console",

@ -26,7 +26,7 @@
"udapp.contractOptionsTitle2": "Select a compiled contract to deploy or to use with At Address.", "udapp.contractOptionsTitle2": "Select a compiled contract to deploy or to use with At Address.",
"udapp.contractOptionsTitle3": "Select and compile *.sol file to deploy or access a contract.", "udapp.contractOptionsTitle3": "Select and compile *.sol file to deploy or access a contract.",
"udapp.contractOptionsTitle4": "When there is a compiled .sol file, choose the contract to deploy or to use with At Address.", "udapp.contractOptionsTitle4": "When there is a compiled .sol file, choose the contract to deploy or to use with At Address.",
"udapp.checkSumWarning": "It seems you are not using a checksumed address.A checksummed address is an address that contains uppercase letters, as specified in {a}.Checksummed addresses are meant to help prevent users from sending transactions to the wrong address.", "udapp.checkSumWarning": "It seems you are not using a checksummed address. A checksummed address is an address that contains uppercase letters, as specified in {a}. Checksummed addresses are meant to help prevent users from sending transactions to the wrong address.",
"udapp.isOverSizePromptEip170": "Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fail if the current network has activated the eip 170. More info: {a}", "udapp.isOverSizePromptEip170": "Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fail if the current network has activated the eip 170. More info: {a}",
"udapp.isOverSizePromptEip3860": "Contract creation init code exceeds the allowed max code size of 49152 bytes. The deployment will likely fail if the current network has activated the eip 3860. More info: {a}", "udapp.isOverSizePromptEip3860": "Contract creation init code exceeds the allowed max code size of 49152 bytes. The deployment will likely fail if the current network has activated the eip 3860. More info: {a}",
"udapp.thisContractMayBeAbstract": "This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an inherited contract's constructor correctly.", "udapp.thisContractMayBeAbstract": "This contract may be abstract, it may not implement an abstract parent's methods completely or it may not invoke an inherited contract's constructor correctly.",
@ -123,7 +123,7 @@
"udapp.contractCreation": "Contract Creation", "udapp.contractCreation": "Contract Creation",
"udapp.transactionFee": "Transaction is invalid. Max fee should not be less than Base fee", "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.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.gasPrice": "Gas price",
"udapp.gweiText": "visit {a} for current gas price info.", "udapp.gweiText": "visit {a} for current gas price info.",
"udapp.maxTransactionFee": "Max transaction fee", "udapp.maxTransactionFee": "Max transaction fee",

@ -20,7 +20,7 @@ export class NetworkModule extends Plugin {
super(profile) super(profile)
this.blockchain = blockchain this.blockchain = blockchain
// TODO: See with remix-lib to make sementic coherent // TODO: See with remix-lib to make semantic coherent
this.blockchain.event.register('contextChanged', (provider) => { this.blockchain.event.register('contextChanged', (provider) => {
this.emit('providerChanged', provider) this.emit('providerChanged', provider)
}) })

@ -84,7 +84,7 @@ class Recorder extends Plugin {
const rawAddress = txResult.receipt.contractAddress const rawAddress = txResult.receipt.contractAddress
if (!rawAddress) return // not a contract creation if (!rawAddress) return // not a contract creation
const address = addressToString(rawAddress) const address = addressToString(rawAddress)
// save back created addresses for the conversion from tokens to real adresses // save back created addresses for the conversion from tokens to real addresses
this.data._createdContracts[address] = timestamp this.data._createdContracts[address] = timestamp
this.data._createdContractsReverse[timestamp] = address this.data._createdContractsReverse[timestamp] = address
}) })
@ -98,7 +98,7 @@ class Recorder extends Plugin {
} }
/** /**
* stop/start saving txs. If not listenning, is basically in replay mode * stop/start saving txs. If not listening, is basically in replay mode
* *
* @param {Bool} listen * @param {Bool} listen
*/ */
@ -279,7 +279,7 @@ class Recorder extends Plugin {
} }
if (rawAddress) { if (rawAddress) {
const address = addressToString(rawAddress) const address = addressToString(rawAddress)
// save back created addresses for the conversion from tokens to real adresses // save back created addresses for the conversion from tokens to real addresses
this.data._createdContracts[address] = tx.timestamp this.data._createdContracts[address] = tx.timestamp
this.data._createdContractsReverse[tx.timestamp] = address this.data._createdContractsReverse[tx.timestamp] = address
newContractFn(abi, address, record.contractName) newContractFn(abi, address, record.contractName)

@ -29,7 +29,7 @@ const css = csjs`
.heading { .heading {
margin-bottom: 0; margin-bottom: 0;
} }
.explaination { .explanation {
margin-top: 3px; margin-top: 3px;
margin-bottom: 3px; margin-bottom: 3px;
} }

@ -146,7 +146,7 @@ export class ThemeModule extends Plugin {
} }
/** /**
* fixes the invertion for images since this should be adjusted when we switch between dark/light qualified themes * fixes the inversion for images since this should be adjusted when we switch between dark/light qualified themes
* @param {element} [image] - the dom element which invert should be fixed to increase visibility * @param {element} [image] - the dom element which invert should be fixed to increase visibility
*/ */
fixInvert(image) { fixInvert(image) {

@ -21298,9 +21298,9 @@ var SolidityParser = (() => {
Dependents2[Dependents2["ANCESTORS"] = 3] = "ANCESTORS"; Dependents2[Dependents2["ANCESTORS"] = 3] = "ANCESTORS";
Dependents2[Dependents2["DESCENDANTS"] = 4] = "DESCENDANTS"; Dependents2[Dependents2["DESCENDANTS"] = 4] = "DESCENDANTS";
Dependents2[Dependents2["SIBLINGS"] = 5] = "SIBLINGS"; Dependents2[Dependents2["SIBLINGS"] = 5] = "SIBLINGS";
Dependents2[Dependents2["PRECEEDING_SIBLINGS"] = 6] = "PRECEEDING_SIBLINGS"; Dependents2[Dependents2["PRECEDING_SIBLINGS"] = 6] = "PRECEDING_SIBLINGS";
Dependents2[Dependents2["FOLLOWING_SIBLINGS"] = 7] = "FOLLOWING_SIBLINGS"; Dependents2[Dependents2["FOLLOWING_SIBLINGS"] = 7] = "FOLLOWING_SIBLINGS";
Dependents2[Dependents2["PRECEEDING"] = 8] = "PRECEEDING"; Dependents2[Dependents2["PRECEDING"] = 8] = "PRECEDING";
Dependents2[Dependents2["FOLLOWING"] = 9] = "FOLLOWING"; Dependents2[Dependents2["FOLLOWING"] = 9] = "FOLLOWING";
})(Dependents = exports.Dependents || (exports.Dependents = {})); })(Dependents = exports.Dependents || (exports.Dependents = {}));
} }
@ -33949,7 +33949,7 @@ var SolidityParser = (() => {
_toText(ctx) { _toText(ctx) {
const text = ctx.text; const text = ctx.text;
if (text === void 0) { if (text === void 0) {
throw new Error("Assertion error: text should never be undefiend"); throw new Error("Assertion error: text should never be undefined");
} }
return text; return text;
} }

File diff suppressed because one or more lines are too long

@ -526,7 +526,7 @@ export class Blockchain extends Plugin {
} }
/** /**
* return the fork name applied to the current envionment * return the fork name applied to the current environment
* @return {String} - fork name * @return {String} - fork name
*/ */
getCurrentFork() { getCurrentFork() {
@ -619,7 +619,7 @@ export class Blockchain extends Plugin {
return this.executionContext.isVM() ? 'memory' : 'blockchain' return this.executionContext.isVM() ? 'memory' : 'blockchain'
} }
// NOTE: the config is only needed because exectuionContext.init does // NOTE: the config is only needed because executionContext.init does
async resetAndInit(config: Config, transactionContextAPI: TransactionContextAPI) { async resetAndInit(config: Config, transactionContextAPI: TransactionContextAPI) {
this.transactionContextAPI = transactionContextAPI this.transactionContextAPI = transactionContextAPI
this.executionContext.init(config) this.executionContext.init(config)

@ -1,4 +1,4 @@
// This menu label is overrided by OSX to be the appName // This menu label is overridden by OSX to be the appName
// The label is set to appName here so it matches actual behavior // The label is set to appName here so it matches actual behavior
import {app, BrowserWindow, MenuItemConstructorOptions} from 'electron'; import {app, BrowserWindow, MenuItemConstructorOptions} from 'electron';

@ -114,7 +114,7 @@ export class RemixClient extends PluginClient {
await this.client.call('editor', 'addAnnotation', annotation, name) await this.client.call('editor', 'addAnnotation', annotation, name)
} }
/** Remove current Hightlight */ /** Remove current Highlight */
async discardHighlight() { async discardHighlight() {
await this.client.call('editor', 'discardHighlight') await this.client.call('editor', 'discardHighlight')
await this.client.call('editor', 'clearAnnotations') await this.client.call('editor', 'clearAnnotations')

@ -22,7 +22,7 @@ export default class abstractAstView {
file2: import "file1" as x; contract c{} file2: import "file1" as x; contract c{}
therefore we have two contracts with the same name c. At the moment this is not handled because alias name "x" is not therefore we have two contracts with the same name c. At the moment this is not handled because alias name "x" is not
available in the current AST implementation thus can not be resolved. available in the current AST implementation thus can not be resolved.
Additionally the fullQuallified function names e.g. [contractName].[functionName](param1Type, param2Type, ... ) must be prefixed to Additionally the fullQualified function names e.g. [contractName].[functionName](param1Type, param2Type, ... ) must be prefixed to
fully support this and when inheritance is resolved it must include alias resolving e.g x.c = file1.c fully support this and when inheritance is resolved it must include alias resolving e.g x.c = file1.c
*/ */
multipleContractsWithSameName = false multipleContractsWithSameName = false
@ -36,14 +36,14 @@ export default class abstractAstView {
* "functions": [ * "functions": [
* { * {
* "node": {}, // actual AST Node of the function * "node": {}, // actual AST Node of the function
* "relevantNodes": [], // AST nodes in the function that are relevant for the anlysis of this function * "relevantNodes": [], // AST nodes in the function that are relevant for the analysis of this function
* "modifierInvocations": [], // Modifier invocation AST nodes that are applied on this function * "modifierInvocations": [], // Modifier invocation AST nodes that are applied on this function
* "localVariables": [], // Local variable declaration nodes * "localVariables": [], // Local variable declaration nodes
* "parameters": [] // Parameter types of the function in order of definition * "parameters": [] // Parameter types of the function in order of definition
* "returns": [] // list of return vars as { type: ... , name: ... } * "returns": [] // list of return vars as { type: ... , name: ... }
* } * }
* ], * ],
* "modifiers": [], // Modifiers definded by the contract, format similar to functions * "modifiers": [], // Modifiers defined by the contract, format similar to functions
* "inheritsFrom": [], // Names of contract this one inherits from in order of definition * "inheritsFrom": [], // Names of contract this one inherits from in order of definition
* "stateVariables": [] // AST nodes of all State variables * "stateVariables": [] // AST nodes of all State variables
* } * }
@ -130,7 +130,7 @@ export default class abstractAstView {
if (inheritsFrom) { if (inheritsFrom) {
currentContract.stateVariables = currentContract.stateVariables.concat(inheritsFrom.stateVariables) currentContract.stateVariables = currentContract.stateVariables.concat(inheritsFrom.stateVariables)
} else { } else {
console.log('abstractAstView.js: could not find contract defintion inherited from ' + inheritsFromName) console.log('abstractAstView.js: could not find contract definition inherited from ' + inheritsFromName)
} }
}) })
} }
@ -138,7 +138,7 @@ export default class abstractAstView {
private setCurrentContract (contract: ContractHLAst): void { private setCurrentContract (contract: ContractHLAst): void {
const name: string = getContractName(contract.node) const name: string = getContractName(contract.node)
if (this.contracts.map((c: ContractHLAst) => getContractName(c.node)).filter((n) => n === name).length > 0) { if (this.contracts.map((c: ContractHLAst) => getContractName(c.node)).filter((n) => n === name).length > 0) {
console.log('abstractAstView.js: two or more contracts with the same name dectected, import aliases not supported at the moment') console.log('abstractAstView.js: two or more contracts with the same name detected, import aliases not supported at the moment')
this.multipleContractsWithSameName = true this.multipleContractsWithSameName = true
} }
this.currentContractIndex = (this.contracts.push(contract) - 1) this.currentContractIndex = (this.contracts.push(contract) - 1)

@ -1,6 +1,6 @@
import category from './categories' import category from './categories'
import { import {
isInteraction, isEffect, isLocalCallGraphRelevantNode, getFullQuallyfiedFuncDefinitionIdent, isInteraction, isEffect, isLocalCallGraphRelevantNode, getFullQualifiedFuncDefinitionIdent,
isWriteOnStateVariable, isStorageVariableDeclaration, getFullQualifiedFunctionCallIdent, getCompilerVersion isWriteOnStateVariable, isStorageVariableDeclaration, getFullQualifiedFunctionCallIdent, getCompilerVersion
} from './staticAnalysisCommon' } from './staticAnalysisCommon'
import algorithm from './algorithmCategories' import algorithm from './algorithmCategories'
@ -36,7 +36,7 @@ export default class checksEffectsInteraction implements AnalyzerModule {
contracts.forEach((contract) => { contracts.forEach((contract) => {
contract.functions.forEach((func) => { contract.functions.forEach((func) => {
func['changesState'] = this.checkIfChangesState( func['changesState'] = this.checkIfChangesState(
getFullQuallyfiedFuncDefinitionIdent( getFullQualifiedFuncDefinitionIdent(
contract.node, contract.node,
func.node, func.node,
func.parameters func.parameters
@ -49,7 +49,7 @@ export default class checksEffectsInteraction implements AnalyzerModule {
}) })
contract.functions.forEach((func: FunctionHLAst) => { contract.functions.forEach((func: FunctionHLAst) => {
if (this.isPotentialVulnerableFunction(func, this.getContext(callGraph, contract, func))) { if (this.isPotentialVulnerableFunction(func, this.getContext(callGraph, contract, func))) {
const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters)
let comments: string = (hasModifiers) ? 'Note: Modifiers are currently not considered by this static analysis.' : '' let comments: string = (hasModifiers) ? 'Note: Modifiers are currently not considered by this static analysis.' : ''
comments += (multipleContractsWithSameName) ? 'Note: Import aliases are currently not supported by this static analysis.' : '' comments += (multipleContractsWithSameName) ? 'Note: Import aliases are currently not supported by this static analysis.' : ''
warnings.push({ warnings.push({

@ -1,7 +1,7 @@
import category from './categories' import category from './categories'
import { import {
isLowLevelCall, isTransfer, isExternalDirectCall, isEffect, isLocalCallGraphRelevantNode, isSelfdestructCall, isLowLevelCall, isTransfer, isExternalDirectCall, isEffect, isLocalCallGraphRelevantNode, isSelfdestructCall,
isDeleteUnaryOperation, isPayableFunction, isConstructor, getFullQuallyfiedFuncDefinitionIdent, hasFunctionBody, isDeleteUnaryOperation, isPayableFunction, isConstructor, getFullQualifiedFuncDefinitionIdent, hasFunctionBody,
isConstantFunction, isWriteOnStateVariable, isStorageVariableDeclaration, isCallToNonConstLocalFunction, isConstantFunction, isWriteOnStateVariable, isStorageVariableDeclaration, isCallToNonConstLocalFunction,
getFullQualifiedFunctionCallIdent getFullQualifiedFunctionCallIdent
} from './staticAnalysisCommon' } from './staticAnalysisCommon'
@ -50,7 +50,7 @@ export default class constantFunctions implements AnalyzerModule {
func['potentiallyshouldBeConst'] = false func['potentiallyshouldBeConst'] = false
} else { } else {
func['potentiallyshouldBeConst'] = this.checkIfShouldBeConstant( func['potentiallyshouldBeConst'] = this.checkIfShouldBeConstant(
getFullQuallyfiedFuncDefinitionIdent( getFullQualifiedFuncDefinitionIdent(
contract.node, contract.node,
func.node, func.node,
func.parameters func.parameters
@ -65,7 +65,7 @@ export default class constantFunctions implements AnalyzerModule {
}) })
contract.functions.filter((func: FunctionHLAst) => hasFunctionBody(func.node)).forEach((func: FunctionHLAst) => { contract.functions.filter((func: FunctionHLAst) => hasFunctionBody(func.node)).forEach((func: FunctionHLAst) => {
if (isConstantFunction(func.node) !== func['potentiallyshouldBeConst']) { if (isConstantFunction(func.node) !== func['potentiallyshouldBeConst']) {
const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters)
let comments: string = (hasModifiers) ? 'Note: Modifiers are currently not considered by this static analysis.' : '' let comments: string = (hasModifiers) ? 'Note: Modifiers are currently not considered by this static analysis.' : ''
comments += (multipleContractsWithSameName) ? 'Note: Import aliases are currently not supported by this static analysis.' : '' comments += (multipleContractsWithSameName) ? 'Note: Import aliases are currently not supported by this static analysis.' : ''
if (func['potentiallyshouldBeConst']) { if (func['potentiallyshouldBeConst']) {

@ -3,7 +3,7 @@
import { FunctionHLAst, ContractHLAst, FunctionCallGraph, ContractCallGraph, Context, FunctionCallAstNode } from '../../types' import { FunctionHLAst, ContractHLAst, FunctionCallGraph, ContractCallGraph, Context, FunctionCallAstNode } from '../../types'
import { import {
isLocalCallGraphRelevantNode, isExternalDirectCall, getFullQualifiedFunctionCallIdent, isLocalCallGraphRelevantNode, isExternalDirectCall, getFullQualifiedFunctionCallIdent,
getFullQuallyfiedFuncDefinitionIdent, getContractName getFullQualifiedFuncDefinitionIdent as getFullQualifiedFuncDefinitionIdent, getContractName
} from './staticAnalysisCommon' } from './staticAnalysisCommon'
type filterNodesFunction = (node: FunctionCallAstNode) => boolean type filterNodesFunction = (node: FunctionCallAstNode) => boolean
@ -39,7 +39,7 @@ function buildLocalFuncCallGraphInternal (functions: FunctionHLAst[], nodeFilter
* } * }
* }, * },
* "foo": { * "foo": {
* "contract": {...}, // Contract node as definded in abstractAstView.js * "contract": {...}, // Contract node as defined in abstractAstView.js
* "functions": {} // map from full qualified function name to func node * "functions": {} // map from full qualified function name to func node
* } * }
* } * }
@ -52,7 +52,7 @@ export function buildGlobalFuncCallGraph (contracts: ContractHLAst[]): Record<st
contracts.forEach((contract: ContractHLAst) => { contracts.forEach((contract: ContractHLAst) => {
const filterNodes: filterNodesFunction = (node: FunctionCallAstNode) => { return isLocalCallGraphRelevantNode(node) || isExternalDirectCall(node) } const filterNodes: filterNodesFunction = (node: FunctionCallAstNode) => { return isLocalCallGraphRelevantNode(node) || isExternalDirectCall(node) }
const getNodeIdent: NodeIdentFunction = (node: FunctionCallAstNode) => { return getFullQualifiedFunctionCallIdent(contract.node, node) } const getNodeIdent: NodeIdentFunction = (node: FunctionCallAstNode) => { return getFullQualifiedFunctionCallIdent(contract.node, node) }
const getFunDefIdent: FunDefIdentFunction = (funcDef: FunctionHLAst) => { return getFullQuallyfiedFuncDefinitionIdent(contract.node, funcDef.node, funcDef.parameters) } const getFunDefIdent: FunDefIdentFunction = (funcDef: FunctionHLAst) => { return getFullQualifiedFuncDefinitionIdent(contract.node, funcDef.node, funcDef.parameters) }
callGraph[getContractName(contract.node)] = { contract: contract, functions: buildLocalFuncCallGraphInternal(contract.functions, filterNodes, getNodeIdent, getFunDefIdent) } callGraph[getContractName(contract.node)] = { contract: contract, functions: buildLocalFuncCallGraphInternal(contract.functions, filterNodes, getNodeIdent, getFunDefIdent) }
}) })

@ -1,5 +1,5 @@
import category from './categories' import category from './categories'
import { hasFunctionBody, getFullQuallyfiedFuncDefinitionIdent, getEffectedVariableName } from './staticAnalysisCommon' import { hasFunctionBody, getFullQualifiedFuncDefinitionIdent, getEffectedVariableName } from './staticAnalysisCommon'
import algorithm from './algorithmCategories' import algorithm from './algorithmCategories'
import AbstractAst from './abstractAstView' import AbstractAst from './abstractAstView'
import { import {
@ -28,7 +28,7 @@ export default class noReturn implements AnalyzerModule {
contracts.forEach((contract: ContractHLAst) => { contracts.forEach((contract: ContractHLAst) => {
contract.functions.filter((func: FunctionHLAst) => hasFunctionBody(func.node)).forEach((func: FunctionHLAst) => { contract.functions.filter((func: FunctionHLAst) => hasFunctionBody(func.node)).forEach((func: FunctionHLAst) => {
const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters)
if (this.hasNamedAndUnnamedReturns(func)) { if (this.hasNamedAndUnnamedReturns(func)) {
warnings.push({ warnings.push({
warning: `${funcName}: Mixing of named and unnamed return parameters is not advised.`, warning: `${funcName}: Mixing of named and unnamed return parameters is not advised.`,

@ -1,5 +1,5 @@
import category from './categories' import category from './categories'
import { getDeclaredVariableName, getFullQuallyfiedFuncDefinitionIdent } from './staticAnalysisCommon' import { getDeclaredVariableName, getFullQualifiedFuncDefinitionIdent } from './staticAnalysisCommon'
import algorithm from './algorithmCategories' import algorithm from './algorithmCategories'
import AbstractAst from './abstractAstView' import AbstractAst from './abstractAstView'
import { get } from 'fast-levenshtein' import { get } from 'fast-levenshtein'
@ -35,7 +35,7 @@ export default class similarVariableNames implements AnalyzerModule {
contracts.forEach((contract) => { contracts.forEach((contract) => {
contract.functions.forEach((func) => { contract.functions.forEach((func) => {
const funcName: string = getFullQuallyfiedFuncDefinitionIdent(contract.node, func.node, func.parameters) const funcName: string = getFullQualifiedFuncDefinitionIdent(contract.node, func.node, func.parameters)
let hasModifiersComments = '' let hasModifiersComments = ''
if (hasModifiers) { if (hasModifiers) {
hasModifiersComments = 'Note: Modifiers are currently not considered by this static analysis.' hasModifiersComments = 'Note: Modifiers are currently not considered by this static analysis.'

@ -181,7 +181,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. Trows if not a effect node or is inlineassmbly.
* Example: x = 10; => x * Example: x = 10; => x
* @effectNode {ASTNode} Assignmnet node * @effectNode {ASTNode} Assignment node
* @return {string} variable name written to * @return {string} variable name written to
*/ */
function getEffectedVariableName (effectNode: AssignmentAstNode | UnaryOperationAstNode): string { function getEffectedVariableName (effectNode: AssignmentAstNode | UnaryOperationAstNode): string {
@ -439,8 +439,8 @@ function getFullQualifiedFunctionCallIdent (contract: ContractDefinitionAstNode,
else throw new Error('staticAnalysisCommon.js: Can not get function name from non function call node') else throw new Error('staticAnalysisCommon.js: Can not get function name from non function call node')
} }
function getFullQuallyfiedFuncDefinitionIdent (contract: ContractDefinitionAstNode, func: FunctionDefinitionAstNode, paramTypes: any[]): string { function getFullQualifiedFuncDefinitionIdent (contract: ContractDefinitionAstNode, func: FunctionDefinitionAstNode, paramTypes: any[]): string {
return getContractName(contract) + '.' + getFunctionDefinitionName(func) + '(' + util.concatWithSeperator(paramTypes, ',') + ')' return getContractName(contract) + '.' + getFunctionDefinitionName(func) + '(' + util.concatWithSeparator(paramTypes, ',') + ')'
} }
function getUnAssignedTopLevelBinOps (subScope: BlockAstNode | IfStatementAstNode | WhileStatementAstNode | ForStatementAstNode): ExpressionStatementAstNode[] { function getUnAssignedTopLevelBinOps (subScope: BlockAstNode | IfStatementAstNode | WhileStatementAstNode | ForStatementAstNode): ExpressionStatementAstNode[] {
@ -630,7 +630,7 @@ function isStateVariable (name: string, stateVariables: VariableDeclarationAstNo
} }
/** /**
* True if is function definition that is flaged as constant * True if is function definition that is flagged as constant
* @node {ASTNode} some AstNode * @node {ASTNode} some AstNode
* @return {bool} * @return {bool}
*/ */
@ -639,7 +639,7 @@ function isConstantFunction (node: FunctionDefinitionAstNode): boolean {
} }
/** /**
* True if variable decalaration is converted into a getter method * True if variable declaration is converted into a getter method
* @node {ASTNode} variable declaration AstNode * @node {ASTNode} variable declaration AstNode
* @return {bool} * @return {bool}
*/ */
@ -1059,11 +1059,11 @@ function findFirstSubNodeLTR (node: any, type: string): any {
*/ */
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
function buildFunctionSignature (paramTypes: any[], returnTypes: any[], isPayable: boolean, additionalMods?: any): string { function buildFunctionSignature (paramTypes: any[], returnTypes: any[], isPayable: boolean, additionalMods?: any): string {
return 'function (' + util.concatWithSeperator(paramTypes, ',') + ')' + ((isPayable) ? ' payable' : '') + ((additionalMods) ? ' ' + additionalMods : '') + ((returnTypes.length) ? ' returns (' + util.concatWithSeperator(returnTypes, ',') + ')' : '') return 'function (' + util.concatWithSeparator(paramTypes, ',') + ')' + ((isPayable) ? ' payable' : '') + ((additionalMods) ? ' ' + additionalMods : '') + ((returnTypes.length) ? ' returns (' + util.concatWithSeparator(returnTypes, ',') + ')' : '')
} }
function buildAbiSignature (funName: string, paramTypes: any[]): string { function buildAbiSignature (funName: string, paramTypes: any[]): string {
return funName + '(' + util.concatWithSeperator(paramTypes, ',') + ')' return funName + '(' + util.concatWithSeparator(paramTypes, ',') + ')'
} }
// To create the method signature similar to contract.evm.gasEstimates.external object // To create the method signature similar to contract.evm.gasEstimates.external object
@ -1157,7 +1157,7 @@ export {
getLibraryCallContractName, getLibraryCallContractName,
getLibraryCallMemberName, getLibraryCallMemberName,
getFullQualifiedFunctionCallIdent, getFullQualifiedFunctionCallIdent,
getFullQuallyfiedFuncDefinitionIdent, getFullQualifiedFuncDefinitionIdent as getFullQualifiedFuncDefinitionIdent,
getStateVariableDeclarationsFromContractNode, getStateVariableDeclarationsFromContractNode,
getFunctionOrModifierDefinitionParameterPart, getFunctionOrModifierDefinitionParameterPart,
getFunctionDefinitionReturnParameterPart, getFunctionDefinitionReturnParameterPart,

@ -25,7 +25,7 @@ export default class stringBytesLength implements AnalyzerModule {
const version = getCompilerVersion(compilationResults.contracts) const version = getCompilerVersion(compilationResults.contracts)
if (this.stringToBytesConversions.length > 0 && this.bytesLengthChecks.length > 0) { if (this.stringToBytesConversions.length > 0 && this.bytesLengthChecks.length > 0) {
return [{ return [{
warning: '"bytes" and "string" lengths are not the same since strings are assumed to be UTF-8 encoded (according to the ABI defintion) therefore one character is not nessesarily encoded in one byte of data.', warning: '"bytes" and "string" lengths are not the same since strings are assumed to be UTF-8 encoded (according to the ABI definition) therefore one character is not necessarily encoded in one byte of data.',
location: this.bytesLengthChecks[0].src, location: this.bytesLengthChecks[0].src,
more: `https://solidity.readthedocs.io/en/${version}/abi-spec.html#argument-encoding` more: `https://solidity.readthedocs.io/en/${version}/abi-spec.html#argument-encoding`
}] }]

@ -122,7 +122,7 @@ export interface ContractCallGraph {
} }
/// ////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////
/// ////////// Specfic AST Nodes ///////////////////////////// /// ////////// Specific AST Nodes ////////////////////////////
/// ////////////////////////////////////////////////////////// /// //////////////////////////////////////////////////////////
interface TypeDescription { interface TypeDescription {

@ -286,11 +286,11 @@ test('staticAnalysisCommon.getFullQualifiedFunctionCallIdent', function (t) {
t.throws(() => common.getFullQualifiedFunctionCallIdent(contractDefinition, assignment), new RegExp('staticAnalysisCommon.js: Can not get function name from non function call node'), 'throws on wrong type') t.throws(() => common.getFullQualifiedFunctionCallIdent(contractDefinition, assignment), new RegExp('staticAnalysisCommon.js: Can not get function name from non function call node'), 'throws on wrong type')
}) })
test('staticAnalysisCommon.getFullQuallyfiedFuncDefinitionIdent', function (t) { test('staticAnalysisCommon.getFullQualifiedFuncDefinitionIdent', function (t) {
t.plan(3) t.plan(3)
t.ok(common.getFullQuallyfiedFuncDefinitionIdent(contractDefinition, functionDefinition, ['uint256', 'bool']) === 'C.f(uint256,bool)', 'creates right signature') t.ok(common.getFullQualifiedFuncDefinitionIdent(contractDefinition, functionDefinition, ['uint256', 'bool']) === 'C.f(uint256,bool)', 'creates right signature')
t.throws(() => common.getFullQuallyfiedFuncDefinitionIdent(contractDefinition, parameterFunctionCall, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a FunctionDefinition Node'), 'throws on wrong nodes') t.throws(() => common.getFullQualifiedFuncDefinitionIdent(contractDefinition, parameterFunctionCall, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a FunctionDefinition Node'), 'throws on wrong nodes')
t.throws(() => common.getFullQuallyfiedFuncDefinitionIdent(parameterFunctionCall, functionDefinition, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a ContractDefinition Node'), 'throws on wrong nodes') t.throws(() => common.getFullQualifiedFuncDefinitionIdent(parameterFunctionCall, functionDefinition, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a ContractDefinition Node'), 'throws on wrong nodes')
}) })
test('staticAnalysisCommon.getSplittedTypeDesc', function (t) { test('staticAnalysisCommon.getSplittedTypeDesc', function (t) {

@ -142,7 +142,7 @@ export class CompilerImports extends Plugin {
/** /**
* import the content of @arg url. * import the content of @arg url.
* first look in the browser localstorage (browser explorer) or locahost explorer. if the url start with `browser/*` or `localhost/*` * first look in the browser localstorage (browser explorer) or localhost explorer. if the url start with `browser/*` or `localhost/*`
* then check if the @arg url is located in the localhost, in the node_modules or installed_contracts folder * then check if the @arg url is located in the localhost, in the node_modules or installed_contracts folder
* then check if the @arg url match any external url * then check if the @arg url match any external url
* *
@ -185,14 +185,14 @@ export class CompilerImports extends Plugin {
} else { } else {
const localhostProvider = await this.call('fileManager', 'getProviderByName', 'localhost') const localhostProvider = await this.call('fileManager', 'getProviderByName', 'localhost')
if (localhostProvider.isConnected()) { if (localhostProvider.isConnected()) {
const splitted = /([^/]+)\/(.*)$/g.exec(url) const split = /([^/]+)\/(.*)$/g.exec(url)
const possiblePaths = ['localhost/installed_contracts/' + url] const possiblePaths = ['localhost/installed_contracts/' + url]
// pick remix-tests library contracts from '.deps' // pick remix-tests library contracts from '.deps'
if (url.startsWith('remix_')) possiblePaths.push('localhost/.deps/remix-tests/' + url) if (url.startsWith('remix_')) possiblePaths.push('localhost/.deps/remix-tests/' + url)
if (splitted) possiblePaths.push('localhost/installed_contracts/' + splitted[1] + '/contracts/' + splitted[2]) if (split) possiblePaths.push('localhost/installed_contracts/' + split[1] + '/contracts/' + split[2])
possiblePaths.push('localhost/node_modules/' + url) possiblePaths.push('localhost/node_modules/' + url)
if (splitted) possiblePaths.push('localhost/node_modules/' + splitted[1] + '/contracts/' + splitted[2]) if (split) possiblePaths.push('localhost/node_modules/' + split[1] + '/contracts/' + split[2])
for (const path of possiblePaths) { for (const path of possiblePaths) {
try { try {

@ -30,12 +30,12 @@ export class FetchAndCompile extends Plugin {
} }
/** /**
* Fetch compiliation metadata from source-Verify from a given @arg contractAddress - https://github.com/ethereum/source-verify * Fetch compilation metadata from source-Verify from a given @arg contractAddress - https://github.com/ethereum/source-verify
* Put the artifacts in the file explorer * Put the artifacts in the file explorer
* Compile the code using Solidity compiler * Compile the code using Solidity compiler
* Returns compilation data * Returns compilation data
* *
* @param {string} contractAddress - Address of the contrac to resolve * @param {string} contractAddress - Address of the contract to resolve
* @param {string} deployedBytecode - deployedBytecode of the contract * @param {string} deployedBytecode - deployedBytecode of the contract
* @param {string} targetPath - Folder where to save the compilation arfefacts * @param {string} targetPath - Folder where to save the compilation arfefacts
* @return {CompilerAbstract} - compilation data targeting the given @arg contractAddress * @return {CompilerAbstract} - compilation data targeting the given @arg contractAddress
@ -72,7 +72,7 @@ export class FetchAndCompile extends Plugin {
compilationTargets, compilationTargets,
settings, settings,
async (url, cb) => { async (url, cb) => {
// we first try to resolve the content from the compilation target using a more appropiate path // we first try to resolve the content from the compilation target using a more appropriate path
const path = `${targetPath}/${url}` const path = `${targetPath}/${url}`
if (compilationTargets[path] && compilationTargets[path].content) { if (compilationTargets[path] && compilationTargets[path].content) {
return cb(null, compilationTargets[path].content) return cb(null, compilationTargets[path].content)
@ -100,7 +100,7 @@ export class FetchAndCompile extends Plugin {
compilationTargets, compilationTargets,
settings, settings,
async (url, cb) => { async (url, cb) => {
// we first try to resolve the content from the compilation target using a more appropiate path // we first try to resolve the content from the compilation target using a more appropriate path
const path = `${targetPath}/${url}` const path = `${targetPath}/${url}`
if (compilationTargets[path] && compilationTargets[path].content) { if (compilationTargets[path] && compilationTargets[path].content) {
return cb(null, compilationTargets[path].content) return cb(null, compilationTargets[path].content)
@ -183,7 +183,7 @@ export class FetchAndCompile extends Plugin {
compilationTargets, compilationTargets,
settings, settings,
async (url, cb) => { async (url, cb) => {
// we first try to resolve the content from the compilation target using a more appropiate path // we first try to resolve the content from the compilation target using a more appropriate path
const path = `${targetPath}/${url}` const path = `${targetPath}/${url}`
if (compilationTargets[path] && compilationTargets[path].content) { if (compilationTargets[path] && compilationTargets[path].content) {
return cb(null, compilationTargets[path].content) return cb(null, compilationTargets[path].content)

@ -13,11 +13,11 @@ const profile = {
export class OffsetToLineColumnConverter extends Plugin { export class OffsetToLineColumnConverter extends Plugin {
lineBreakPositionsByContent: Record<number, Array<number>> lineBreakPositionsByContent: Record<number, Array<number>>
sourceMappingDecoder: any sourceMappingDecoder: any
offsetConvertion: any offsetConversion: any
constructor () { constructor () {
super(profile) super(profile)
this.lineBreakPositionsByContent = {} this.lineBreakPositionsByContent = {}
this.offsetConvertion = {} this.offsetConversion = {}
this.sourceMappingDecoder = sourceMappingDecoder this.sourceMappingDecoder = sourceMappingDecoder
} }
@ -49,12 +49,12 @@ export class OffsetToLineColumnConverter extends Plugin {
} }
const token = `${rawLocation.start}:${rawLocation.length}:${file}` const token = `${rawLocation.start}:${rawLocation.length}:${file}`
if (this.offsetConvertion[token]) { if (this.offsetConversion[token]) {
return this.offsetConvertion[token] return this.offsetConversion[token]
} else { } else {
const convertion = this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) const conversion = this.sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
this.offsetConvertion[token] = convertion this.offsetConversion[token] = conversion
return convertion return conversion
} }
} }
@ -74,7 +74,7 @@ export class OffsetToLineColumnConverter extends Plugin {
*/ */
clear () { clear () {
this.lineBreakPositionsByContent = {} this.lineBreakPositionsByContent = {}
this.offsetConvertion = {} this.offsetConversion = {}
} }
/** /**

@ -10,8 +10,8 @@ export class CodeResolver {
constructor ({ getCode, fork }) { constructor ({ getCode, fork }) {
this.getCode = getCode this.getCode = getCode
this.bytecodeByAddress = {} // bytes code by contract addesses this.bytecodeByAddress = {} // bytes code by contract addresses
this.instructionsByAddress = {} // assembly items instructions list by contract addesses this.instructionsByAddress = {} // assembly items instructions list by contract addresses
this.instructionsIndexByBytesOffset = {} // mapping between bytes offset and instructions index. this.instructionsIndexByBytesOffset = {} // mapping between bytes offset and instructions index.
this.fork = fork this.fork = fork
} }

@ -229,7 +229,7 @@ function getEnum (type, stateDefinitions, contractName) {
} }
/** /**
* retrieve memebers declared in the given @arg tye * retrieve members declared in the given @arg tye
* *
* @param {String} typeName - name of the struct type (e.g struct <name>) * @param {String} typeName - name of the struct type (e.g struct <name>)
* @param {Object} stateDefinitions - all state definition given by the AST (including struct and enum type declaration) for all contracts * @param {Object} stateDefinitions - all state definition given by the AST (including struct and enum type declaration) for all contracts
@ -264,7 +264,7 @@ function getStructMembers (type, stateDefinitions, contractName, location) {
* parse the full type * parse the full type
* *
* @param {String} fullType - type given by the AST (ex: uint[2] storage ref[2]) * @param {String} fullType - type given by the AST (ex: uint[2] storage ref[2])
* @return {String} returns the token type (used to instanciate the right decoder) (uint[2] storage ref[2] will return 'array', uint256 will return uintX) * @return {String} returns the token type (used to instantiate the right decoder) (uint[2] storage ref[2] will return 'array', uint256 will return uintX)
*/ */
function typeClass (fullType) { function typeClass (fullType) {
fullType = removeLocation(fullType) fullType = removeLocation(fullType)

@ -122,7 +122,7 @@ export class SolidityProxy {
} }
/** /**
* get the filename refering to the index from the compilation result * get the filename referring to the index from the compilation result
* *
* @param {Int} index - index of the filename * @param {Int} index - index of the filename
* @param {Object} compilationResult - current compilation result * @param {Object} compilationResult - current compilation result

@ -4,11 +4,11 @@ import { getLinebreakPositions, convertOffsetToLineColumn } from './sourceMappin
export class OffsetToColumnConverter { export class OffsetToColumnConverter {
lineBreakPositionsByContent lineBreakPositionsByContent
sourceMappingDecoder sourceMappingDecoder
offsetConvertion offsetConversion
constructor (compilerEvent) { constructor (compilerEvent) {
this.lineBreakPositionsByContent = {} this.lineBreakPositionsByContent = {}
this.offsetConvertion = {} this.offsetConversion = {}
if (compilerEvent) { if (compilerEvent) {
compilerEvent.register('compilationFinished', (success, data, source, input, version) => { compilerEvent.register('compilationFinished', (success, data, source, input, version) => {
this.clear() this.clear()
@ -29,17 +29,17 @@ export class OffsetToColumnConverter {
} }
} }
const token = `${rawLocation.start}:${rawLocation.length}:${file}` const token = `${rawLocation.start}:${rawLocation.length}:${file}`
if (this.offsetConvertion[token]) { if (this.offsetConversion[token]) {
return this.offsetConvertion[token] return this.offsetConversion[token]
} else { } else {
const convertion = convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file]) const conversion = convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
this.offsetConvertion[token] = convertion this.offsetConversion[token] = conversion
return convertion return conversion
} }
} }
clear () { clear () {
this.lineBreakPositionsByContent = {} this.lineBreakPositionsByContent = {}
this.offsetConvertion = {} this.offsetConversion = {}
} }
} }

@ -5,7 +5,7 @@ import { sub } from '../solidity-decoder/types/util'
* like { "<mapping_slot>" : { "<mapping-key1>": preimageOf1 }, { "<mapping-key2>": preimageOf2 }, ... } * like { "<mapping_slot>" : { "<mapping-key1>": preimageOf1 }, { "<mapping-key2>": preimageOf2 }, ... }
* *
* @param {Object} storage - storage given by storage Viewer (basically a mapping hashedkey : {key, value}) * @param {Object} storage - storage given by storage Viewer (basically a mapping hashedkey : {key, value})
* @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping). * @param {Array} corrections - used in case the calculated sha3 has been modified before SSTORE (notably used for struct in mapping).
* @param {Function} callback - callback * @param {Function} callback - callback
* @return {Map} - solidity mapping location (e.g { "<mapping_slot>" : { "<mapping-key1>": preimageOf1 }, { "<mapping-key2>": preimageOf2 }, ... }) * @return {Map} - solidity mapping location (e.g { "<mapping_slot>" : { "<mapping-key1>": preimageOf1 }, { "<mapping-key2>": preimageOf2 }, ... })
*/ */

@ -35,13 +35,13 @@ export class StorageResolver {
} }
/** /**
* compute the mappgings type locations for the current address (cached for a debugging session) * compute the mappings type locations for the current address (cached for a debugging session)
* note: that only retrieve the first 100 items. * note: that only retrieve the first 100 items.
* *
* @param {Object} tx * @param {Object} tx
* @param {Int} stepIndex * @param {Int} stepIndex
* @param {Object} address - storage * @param {Object} address - storage
* @param {Array} corrections - used in case the calculated sha3 has been modifyed before SSTORE (notably used for struct in mapping). * @param {Array} corrections - used in case the calculated sha3 has been modified before SSTORE (notably used for struct in mapping).
* @return {Function} - callback * @return {Function} - callback
*/ */
async initialPreimagesMappings (tx, stepIndex, address, corrections) { async initialPreimagesMappings (tx, stepIndex, address, corrections) {

@ -40,7 +40,7 @@ export class TraceCache {
this.memoryChanges = [] this.memoryChanges = []
this.formattedMemory = {} this.formattedMemory = {}
this.storageChanges = [] this.storageChanges = []
this.sstore = {} // all sstore occurence in the trace this.sstore = {} // all sstore occurrences in the trace
} }
pushSteps (index, currentCallIndex) { pushSteps (index, currentCallIndex) {

@ -1,4 +1,4 @@
// TODO: this file shoudl be removed at some point // TODO: this file should be removed at some point
const CmdLine = require('./src/cmdline/index') const CmdLine = require('./src/cmdline/index')
// var compilation = require('./compilation.json') // var compilation = require('./compilation.json')

@ -80,7 +80,7 @@ export function checkError (execResult, compiledContracts) {
return ret return ret
} }
const exceptionError = execResult.errorMessage || '' const exceptionError = execResult.errorMessage || ''
const error = `Error occured: ${execResult.errorMessage}.\n` const error = `Error occurred: ${execResult.errorMessage}.\n`
let msg = '' let msg = ''
if (exceptionError.includes(errorCode.INVALID_OPCODE)) { if (exceptionError.includes(errorCode.INVALID_OPCODE)) {
msg = '\t\n\tThe execution might have thrown OR the EVM version used by the selected environment is not compatible with the compiler EVM version.\n' msg = '\t\n\tThe execution might have thrown OR the EVM version used by the selected environment is not compatible with the compiler EVM version.\n'
@ -113,7 +113,7 @@ export function checkError (execResult, compiledContracts) {
const decodedCustomErrorInputs = fn.decodeFunctionData(functionDesc, returnData) const decodedCustomErrorInputs = fn.decodeFunctionData(functionDesc, returnData)
decodedCustomErrorInputsClean = {} decodedCustomErrorInputsClean = {}
let devdoc = {} let devdoc = {}
// "contract" reprensents the compilation result containing the NATSPEC documentation // "contract" represents the compilation result containing the NATSPEC documentation
if (contract && fn.functions && Object.keys(fn.functions).length) { if (contract && fn.functions && Object.keys(fn.functions).length) {
const functionSignature = Object.keys(fn.functions)[0] const functionSignature = Object.keys(fn.functions)[0]
// we check in the 'devdoc' if there's a developer documentation for this error // we check in the 'devdoc' if there's a developer documentation for this error

@ -32,7 +32,7 @@ export function encodeData (funABI, values, contractbyteCode) {
/** /**
* encode function / constructor parameters * encode function / constructor parameters
* *
* @param {Object} params - input paramater of the function to call * @param {Object} params - input parameter of the function to call
* @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor.
* @param {Function} callback - callback * @param {Function} callback - callback
*/ */
@ -94,7 +94,7 @@ export function encodeParams (params, funAbi, callback?) {
/** /**
* encode function call (function id + encoded parameters) * encode function call (function id + encoded parameters)
* *
* @param {Object} params - input paramater of the function to call * @param {Object} params - input parameter of the function to call
* @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor.
* @param {Function} callback - callback * @param {Function} callback - callback
*/ */
@ -108,8 +108,8 @@ export function encodeFunctionCall (params, funAbi, callback) {
/** /**
* encode constructor creation and link with provided libraries if needed * encode constructor creation and link with provided libraries if needed
* *
* @param {Object} contract - input paramater of the function to call * @param {Object} contract - input parameter of the function to call
* @param {Object} params - input paramater of the function to call * @param {Object} params - input parameter of the function to call
* @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor.
* @param {Object} linkLibraries - contains {linkReferences} object which list all the addresses to be linked * @param {Object} linkLibraries - contains {linkReferences} object which list all the addresses to be linked
* @param {Object} linkReferences - given by the compiler, contains the proper linkReferences * @param {Object} linkReferences - given by the compiler, contains the proper linkReferences
@ -127,7 +127,7 @@ export function encodeConstructorCallAndLinkLibraries (contract, params, funAbi,
/** /**
* link with provided libraries if needed * link with provided libraries if needed
* *
* @param {Object} contract - input paramater of the function to call * @param {Object} contract - input parameter of the function to call
* @param {Object} linkLibraries - contains {linkReferences} object which list all the addresses to be linked * @param {Object} linkLibraries - contains {linkReferences} object which list all the addresses to be linked
* @param {Object} linkReferences - given by the compiler, contains the proper linkReferences * @param {Object} linkReferences - given by the compiler, contains the proper linkReferences
* @param {Function} callback - callback * @param {Function} callback - callback
@ -152,12 +152,12 @@ export function linkLibraries (contract, linkLibraries, linkReferences, callback
} }
/** /**
* encode constructor creation and deploy librairies if needed * encode constructor creation and deploy libraries if needed
* *
* @param {String} contractName - current contract name * @param {String} contractName - current contract name
* @param {Object} contract - input paramater of the function to call * @param {Object} contract - input parameter of the function to call
* @param {Object} contracts - map of all compiled contracts. * @param {Object} contracts - map of all compiled contracts.
* @param {Object} params - input paramater of the function to call * @param {Object} params - input parameter of the function to call
* @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor.
* @param {Function} callback - callback * @param {Function} callback - callback
* @param {Function} callbackStep - callbackStep * @param {Function} callbackStep - callbackStep
@ -195,7 +195,7 @@ export function encodeConstructorCallAndDeployLibraries (contractName, contract,
* @param {Object} contracts - map of all compiled contracts. * @param {Object} contracts - map of all compiled contracts.
* @param {Bool} isConstructor - isConstructor. * @param {Bool} isConstructor - isConstructor.
* @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor. * @param {Object} funAbi - abi definition of the function to call. null if building data for the ctor.
* @param {Object} params - input paramater of the function to call * @param {Object} params - input parameter of the function to call
* @param {Function} callback - callback * @param {Function} callback - callback
* @param {Function} callbackStep - callbackStep * @param {Function} callbackStep - callbackStep
* @param {Function} callbackDeployLibrary - callbackDeployLibrary * @param {Function} callbackDeployLibrary - callbackDeployLibrary
@ -399,7 +399,7 @@ export function decodeResponse (response, fnabi) {
const type = fnabi.outputs[i].type const type = fnabi.outputs[i].type
outputTypes.push(type.indexOf('tuple') === 0 ? makeFullTypeDefinition(fnabi.outputs[i]) : type) outputTypes.push(type.indexOf('tuple') === 0 ? makeFullTypeDefinition(fnabi.outputs[i]) : type)
} }
if (!response || !response.length) response = new Uint8Array(32 * fnabi.outputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data if (!response || !response.length) response = new Uint8Array(32 * fnabi.outputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not enough data
// decode data // decode data
const abiCoder = new ethers.utils.AbiCoder() const abiCoder = new ethers.utils.AbiCoder()
const decodedObj = abiCoder.decode(outputTypes, response) const decodedObj = abiCoder.decode(outputTypes, response)

@ -375,7 +375,7 @@ export class TxListener {
_decodeInputParams (data, abi) { _decodeInputParams (data, abi) {
data = toBuffer(addHexPrefix(data)) data = toBuffer(addHexPrefix(data))
if (!data.length) data = new Uint8Array(32 * abi.inputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not engouh data if (!data.length) data = new Uint8Array(32 * abi.inputs.length) // ensuring the data is at least filled by 0 cause `AbiCoder` throws if there's not enough data
const inputTypes = [] const inputTypes = []
for (let i = 0; i < abi.inputs.length; i++) { for (let i = 0; i < abi.inputs.length; i++) {

@ -181,7 +181,7 @@ async function tryTillReceiptAvailable (txhash: string, web3: Web3) {
if (receipt) { if (receipt) {
if (!receipt.to && !receipt.contractAddress) { if (!receipt.to && !receipt.contractAddress) {
// this is a contract creation and the receipt doesn't contain a contract address. we have to keep polling... // this is a contract creation and the receipt doesn't contain a contract address. we have to keep polling...
console.log('this is a contract creation and the receipt does nott contain a contract address. we have to keep polling...') console.log('this is a contract creation and the receipt does not contain a contract address. we have to keep polling...')
} else } else
return receipt return receipt
} }

@ -24,7 +24,7 @@ export const keccak = function(a: Buffer, bits: number = 256): Buffer {
return toBuffer(keccak512(a)) return toBuffer(keccak512(a))
} }
default: { default: {
throw new Error(`Invald algorithm: keccak${bits}`) throw new Error(`Invalid algorithm: keccak${bits}`)
} }
} }
} }

@ -40,8 +40,8 @@ export function tryConvertAsciiFormat (memorySlot) {
* @param {Object} css3 - css inline declaration * @param {Object} css3 - css inline declaration
* @param {Object} ... * @param {Object} ...
* @return {String} css inline style * @return {String} css inline style
* if the key start with * the value is direcly appended to the inline style (which should be already inline style formatted) * if the key start with * the value is directly appended to the inline style (which should be already inline style formatted)
* used if multiple occurences of the same key is needed * used if multiple occurrences of the same key is needed
*/ */
export function formatCss (css1, css2) { export function formatCss (css1, css2) {
let ret = '' let ret = ''

@ -4,7 +4,7 @@ import { bufferToHex, setLengthLeft, toBuffer, addHexPrefix } from '@ethereumjs/
import stringSimilarity from 'string-similarity' import stringSimilarity from 'string-similarity'
/* /*
contains misc util: @TODO should be splitted contains misc util: @TODO should be split
- hex conversion - hex conversion
- binary search - binary search
- CALL related look up - CALL related look up
@ -233,7 +233,7 @@ export function getinputParameters (value) {
* Compare bytecode. return true if the code is equal (handle swarm hash and library references) * Compare bytecode. return true if the code is equal (handle swarm hash and library references)
* @param {String} code1 - the bytecode that is actually deployed (contains resolved library reference and a potentially different swarmhash) * @param {String} code1 - the bytecode that is actually deployed (contains resolved library reference and a potentially different swarmhash)
* @param {String} code2 - the bytecode generated by the compiler (contains unresolved library reference and a potentially different swarmhash) * @param {String} code2 - the bytecode generated by the compiler (contains unresolved library reference and a potentially different swarmhash)
this will return false if the generated bytecode is empty (asbtract contract cannot be deployed) this will return false if the generated bytecode is empty (abstract contract cannot be deployed)
* *
* @return {bool} * @return {bool}
*/ */
@ -286,8 +286,8 @@ export function groupBy (arr, key) {
}, {}) }, {})
} }
export function concatWithSeperator (list, seperator) { export function concatWithSeparator (list, separator) {
return list.reduce((sum, item) => sum + item + seperator, '').slice(0, -seperator.length) return list.reduce((sum, item) => sum + item + separator, '').slice(0, -separator.length)
} }
export function escapeRegExp (str) { export function escapeRegExp (str) {
@ -305,10 +305,10 @@ function removeByIndex (code, index, length, emptyRef) {
function removeImmutableReference (code1, code2) { function removeImmutableReference (code1, code2) {
try { try {
const refOccurence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g) const refOccurrence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g)
if (!refOccurence) return code1 if (!refOccurrence) return code1
let offset = 0 let offset = 0
refOccurence.map((value) => { refOccurrence.map((value) => {
offset = code2.indexOf(value, offset) offset = code2.indexOf(value, offset)
code1 = removeByIndex(code1, offset, value.length, '7f0000000000000000000000000000000000000000000000000000000000000000') code1 = removeByIndex(code1, offset, value.length, '7f0000000000000000000000000000000000000000000000000000000000000000')
offset = offset + 1 offset = offset + 1

@ -4,26 +4,26 @@ import { EventManager } from '../src/eventManager'
tape('eventManager', function (t) { tape('eventManager', function (t) {
t.test('eventManager', function (st) { t.test('eventManager', function (st) {
const events = new EventManager() const events = new EventManager()
const listenner = {} const listener = {}
let trace = '' let trace = ''
listenner['listen'] = function (data1) { listener['listen'] = function (data1) {
trace += data1 trace += data1
} }
const registeredFunction = function (data) { const registeredFunction = function (data) {
trace += data trace += data
} }
events.register('event1', listenner, listenner['listen']) events.register('event1', listener, listener['listen'])
events.register('event2', registeredFunction, null) events.register('event2', registeredFunction, null)
events.trigger('event1', ['event1']) events.trigger('event1', ['event1'])
events.trigger('event2', ['event2']) events.trigger('event2', ['event2'])
st.equal(trace, 'event1event2') st.equal(trace, 'event1event2')
events.unregister('event1', listenner['listen'], null) events.unregister('event1', listener['listen'], null)
st.equal(events.registered['event1'].length, 1) st.equal(events.registered['event1'].length, 1)
st.equal(events.registered['event2'].length, 1) st.equal(events.registered['event2'].length, 1)
events.unregister('event1', listenner, listenner['listen']) events.unregister('event1', listener, listener['listen'])
st.equal(events.registered['event1'].length, 0) st.equal(events.registered['event1'].length, 0)
st.equal(events.registered['event2'].length, 1) st.equal(events.registered['event2'].length, 1)

@ -55,12 +55,12 @@ tape('util.groupBy on valid input', function (t) {
t.deepEqual(result, expectedResult) t.deepEqual(result, expectedResult)
}) })
tape('util.concatWithSeperator valid output', function (t) { tape('util.concatWithSeparator valid output', function (t) {
t.plan(4) t.plan(4)
t.notEqual(util.concatWithSeperator(['a', 'b', 'c'], ','), 'a, b, c', 'Concat with comma should not produce spaces') t.notEqual(util.concatWithSeparator(['a', 'b', 'c'], ','), 'a, b, c', 'Concat with comma should not produce spaces')
t.equal(util.concatWithSeperator(['a', 'b', 'c'], ','), 'a,b,c', 'Concat with comma should not produce spaces') t.equal(util.concatWithSeparator(['a', 'b', 'c'], ','), 'a,b,c', 'Concat with comma should not produce spaces')
t.equal(util.concatWithSeperator(['a', 'b', 'c'], ', '), 'a, b, c', 'Concat with comma space should not produce trailing comma') t.equal(util.concatWithSeparator(['a', 'b', 'c'], ', '), 'a, b, c', 'Concat with comma space should not produce trailing comma')
t.equal(util.concatWithSeperator(['a', 'b', 'c'], '+'), 'a+b+c', 'Concat with plus') t.equal(util.concatWithSeparator(['a', 'b', 'c'], '+'), 'a+b+c', 'Concat with plus')
}) })
tape('util.escapeRegExp', function (t) { tape('util.escapeRegExp', function (t) {

@ -71,13 +71,13 @@ function isNodeTypeIn (node: AstNode, typesList: string[]): boolean {
} }
/** /**
* @dev Get overrided sender provided using natspec * @dev Get overridden sender provided using natspec
* @param userdoc method user documentation * @param userdoc method user documentation
* @param signature signature * @param signature signature
* @param methodIdentifiers Object containing all methods identifier * @param methodIdentifiers Object containing all methods identifier
*/ */
function getOverridedSender (userdoc: UserDocumentation, signature: string, methodIdentifiers: Record <string, string>): string | null { function getOverriddenSender (userdoc: UserDocumentation, signature: string, methodIdentifiers: Record <string, string>): string | null {
const fullName: string | null = getFunctionFullName(signature, methodIdentifiers) const fullName: string | null = getFunctionFullName(signature, methodIdentifiers)
const senderRegex = /#sender: account-+(\d)/g const senderRegex = /#sender: account-+(\d)/g
const accountIndex: RegExpExecArray | null = fullName && userdoc.methods[fullName] ? senderRegex.exec(userdoc.methods[fullName].notice) : null const accountIndex: RegExpExecArray | null = fullName && userdoc.methods[fullName] ? senderRegex.exec(userdoc.methods[fullName].notice) : null
@ -236,7 +236,7 @@ export function runTest (testName: string, testObject: any, contractDetails: Com
let sender: string | null = null let sender: string | null = null
let hhLogs let hhLogs
if (func.signature) { if (func.signature) {
sender = getOverridedSender(contractDetails.userdoc, func.signature, contractDetails.evm.methodIdentifiers) sender = getOverriddenSender(contractDetails.userdoc, func.signature, contractDetails.evm.methodIdentifiers)
if (opts.accounts && sender) { if (opts.accounts && sender) {
sender = opts.accounts[sender] sender = opts.accounts[sender]
} }

@ -58,7 +58,7 @@ export function getBlockCompletionItems(range: monacoTypes.IRange, monaco): mona
range, range,
}, },
{ {
detail: '(bytes32): DEPRICATED In 0.4.22 use blockhash(uint) instead. Hash of the given block - only works for 256 most recent blocks excluding current', detail: '(bytes32): DEPRECATED In 0.4.22 use blockhash(uint) instead. Hash of the given block - only works for 256 most recent blocks excluding current',
insertText: 'blockhash(${1:blockNumber});', insertText: 'blockhash(${1:blockNumber});',
kind: monaco.languages.CompletionItemKind.Method, kind: monaco.languages.CompletionItemKind.Method,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
@ -257,8 +257,8 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco
{ {
label: 'erc173', label: 'erc173',
kind: monaco.languages.CompletionItemKind.Snippet, kind: monaco.languages.CompletionItemKind.Snippet,
insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control whitch\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}', insertText: '\/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control which\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}',
documentation: 'Draft: EIP-173: Implementation example, Contract Ownership Standard, A standard interface for ownership of contracts.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control whitch\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}', documentation: 'Draft: EIP-173: Implementation example, Contract Ownership Standard, A standard interface for ownership of contracts.\n\n \/\/ https:\/\/eips.ethereum.org\/EIPS\/eip-173\r\n\/\/ https:\/\/github.com\/0xcert\/ethereum-erc721\/blob\/master\/src\/contracts\/ownership\/ownable.sol (this example)\r\n\/\/ https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/master\/contracts\/access\/Ownable.sol\r\n\/\/ https:\/\/github.com\/FriendlyUser\/solidity-smart-contracts\/\/blob\/v0.2.0\/contracts\/other\/CredVert\/Ownable.sol\r\n\/\/ SPDX-License-Identifier: MIT\r\npragma solidity >=0.5.0 <0.9.0;\r\n\r\n\/**\r\n * @dev The contract has an owner address, and provides basic authorization control which\r\n * simplifies the implementation of user permissions. This contract is based on the source code at:\r\n * https:\/\/github.com\/OpenZeppelin\/openzeppelin-solidity\/blob\/master\/contracts\/ownership\/Ownable.sol\r\n *\/\r\ncontract Ownable\r\n{\r\n\r\n \/**\r\n * @dev Error constants.\r\n *\/\r\n string public constant NOT_CURRENT_OWNER = \"018001\";\r\n string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = \"018002\";\r\n\r\n \/**\r\n * @dev Current owner address.\r\n *\/\r\n address public owner;\r\n\r\n \/**\r\n * @dev An event which is triggered when the owner is changed.\r\n * @param previousOwner The address of the previous owner.\r\n * @param newOwner The address of the new owner.\r\n *\/\r\n event OwnershipTransferred(\r\n address indexed previousOwner,\r\n address indexed newOwner\r\n );\r\n\r\n \/**\r\n * @dev The constructor sets the original `owner` of the contract to the sender account.\r\n *\/\r\n constructor()\r\n public\r\n {\r\n owner = msg.sender;\r\n }\r\n\r\n \/**\r\n * @dev Throws if called by any account other than the owner.\r\n *\/\r\n modifier onlyOwner()\r\n {\r\n require(msg.sender == owner, NOT_CURRENT_OWNER);\r\n _;\r\n }\r\n\r\n \/**\r\n * @dev Allows the current owner to transfer control of the contract to a newOwner.\r\n * @param _newOwner The address to transfer ownership to.\r\n *\/\r\n function transferOwnership(\r\n address _newOwner\r\n )\r\n public\r\n onlyOwner\r\n {\r\n require(_newOwner != address(0), CANNOT_TRANSFER_TO_ZERO_ADDRESS);\r\n emit OwnershipTransferred(owner, _newOwner);\r\n owner = _newOwner;\r\n }\r\n\r\n}',
detail: 'generate ERC173-draft', detail: 'generate ERC173-draft',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range range
@ -359,7 +359,7 @@ export function getMsgCompletionItems(range: monacoTypes.IRange, monaco): monaco
range range
}, },
{ {
detail: '(uint): remaining gas DEPRICATED in 0.4.21 use gasleft()', detail: '(uint): remaining gas DEPRECATED in 0.4.21 use gasleft()',
kind: monaco.languages.CompletionItemKind.Property, kind: monaco.languages.CompletionItemKind.Property,
insertText: 'gas', insertText: 'gas',
label: 'gas', label: 'gas',
@ -392,7 +392,7 @@ export function getMsgCompletionItems(range: monacoTypes.IRange, monaco): monaco
export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] {
return [ return [
{ {
detail: 'encode(..) returs (bytes): ABI-encodes the given arguments', detail: 'encode(..) returns (bytes): ABI-encodes the given arguments',
insertText: 'encode(${1:arg});', insertText: 'encode(${1:arg});',
kind: monaco.languages.CompletionItemKind.Method, kind: monaco.languages.CompletionItemKind.Method,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
@ -408,7 +408,7 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco
range range
}, },
{ {
detail: 'encodePacked(..) returns (bytes): Performes packed encoding of the given arguments', detail: 'encodePacked(..) returns (bytes): Performs packed encoding of the given arguments',
insertText: 'encodePacked(${1:arg});', insertText: 'encodePacked(${1:arg});',
kind: monaco.languages.CompletionItemKind.Method, kind: monaco.languages.CompletionItemKind.Method,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet, insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,

@ -9828,7 +9828,7 @@ declare namespace monaco.languages.typescript {
*/ */
getFormattingEditsAfterKeystroke( getFormattingEditsAfterKeystroke(
fileName: string, fileName: string,
postion: number, position: number,
ch: string, ch: string,
options: any options: any
): Promise<any[]> ): Promise<any[]>
@ -9838,7 +9838,7 @@ declare namespace monaco.languages.typescript {
*/ */
findRenameLocations( findRenameLocations(
fileName: string, fileName: string,
positon: number, position: number,
findInStrings: boolean, findInStrings: boolean,
findInComments: boolean, findInComments: boolean,
providePrefixAndSuffixTextForRename: boolean providePrefixAndSuffixTextForRename: boolean
@ -9848,7 +9848,7 @@ declare namespace monaco.languages.typescript {
* @param options `typescript.RenameInfoOptions` * @param options `typescript.RenameInfoOptions`
* @returns `Promise<typescript.RenameInfo>` * @returns `Promise<typescript.RenameInfo>`
*/ */
getRenameInfo(fileName: string, positon: number, options: any): Promise<any> getRenameInfo(fileName: string, position: number, options: any): Promise<any>
/** /**
* Get transpiled output for the given file. * Get transpiled output for the given file.
* @returns `typescript.EmitOutput` * @returns `typescript.EmitOutput`

@ -30,8 +30,8 @@ export interface CarouselProps {
customButtonGroup?: React.ReactElement<any> | null; customButtonGroup?: React.ReactElement<any> | null;
infinite?: boolean; infinite?: boolean;
minimumTouchDrag?: number; // default 50px. The amount of distance to drag / swipe in order to move to the next slide. minimumTouchDrag?: number; // default 50px. The amount of distance to drag / swipe in order to move to the next slide.
afterChange?: (previousSlide: number, state: StateCallBack) => void; // Change callback after sliding everytime. `(previousSlide, currentState) => ...` afterChange?: (previousSlide: number, state: StateCallBack) => void; // Change callback after sliding every time. `(previousSlide, currentState) => ...`
beforeChange?: (nextSlide: number, state: StateCallBack) => void; // Change callback before sliding everytime. `(previousSlide, currentState) => ...` beforeChange?: (nextSlide: number, state: StateCallBack) => void; // Change callback before sliding every time. `(previousSlide, currentState) => ...`
sliderClass?: string; // Use this to style your own track list. sliderClass?: string; // Use this to style your own track list.
itemClass?: string; // Use this to style your own Carousel item. For example add padding-left and padding-right itemClass?: string; // Use this to style your own Carousel item. For example add padding-left and padding-right
itemAriaLabel?: string; // Use this to add your own Carousel item aria-label.if it is not defined the child aria label will be applied if the child dont have one than a default empty string will be applied itemAriaLabel?: string; // Use this to add your own Carousel item aria-label.if it is not defined the child aria label will be applied if the child dont have one than a default empty string will be applied

@ -1,4 +1,4 @@
import { PermissionHandler } from './app/ui/persmission-handler' import { PermissionHandler } from './app/ui/permission-handler'
import { PluginManager } from '@remixproject/engine/lib/manager' import { PluginManager } from '@remixproject/engine/lib/manager'
import { EventEmitter } from 'events' import { EventEmitter } from 'events'
import { Engine } from '@remixproject/engine/lib/engine' import { Engine } from '@remixproject/engine/lib/engine'
@ -50,9 +50,9 @@ export class PluginManagerSettings {
currentSetting: any currentSetting: any
onValidation(): void onValidation(): void
/** Clear one permission from a plugin */ /** Clear one permission from a plugin */
clearPersmission(from: string, to: string, method: string): void clearPermission(from: string, to: string, method: string): void
/** Clear all persmissions from a plugin */ /** Clear all permissions from a plugin */
clearAllPersmission(to: string): void clearAllPermission(to: string): void
settings(): any settings(): any
render(): any render(): any
} }

@ -49,7 +49,7 @@ export function ContractGUI(props: ContractGUIProps) {
setTitle(props.funcABI.type === 'receive' ? '(receive)' : '(fallback)') setTitle(props.funcABI.type === 'receive' ? '(receive)' : '(fallback)')
} }
setBasicInput('') setBasicInput('')
// we have the reset the fields before reseting the previous references. // we have the reset the fields before resetting the previous references.
basicInputRef.current.value = '' basicInputRef.current.value = ''
multiFields.current.filter((el) => el !== null && el !== undefined).forEach((el) => (el.value = '')) multiFields.current.filter((el) => el !== null && el !== undefined).forEach((el) => (el.value = ''))
multiFields.current = [] multiFields.current = []

@ -43,7 +43,7 @@ export class Blockchain extends Plugin<any, any> {
getProvider(): any; getProvider(): any;
getInjectedWeb3Address(): any; getInjectedWeb3Address(): any;
/** /**
* return the fork name applied to the current envionment * return the fork name applied to the current environment
* @return {String} - fork name * @return {String} - fork name
*/ */
getCurrentFork(): string; getCurrentFork(): string;

@ -411,8 +411,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
const isSolFileSelected = (currentFile = '') => { const isSolFileSelected = (currentFile = '') => {
if (!currentFile) currentFile = api.currentFile if (!currentFile) currentFile = api.currentFile
if (!currentFile) return false if (!currentFile) return false
const extention = currentFile.substr(currentFile.length - 3, currentFile.length) const extension = currentFile.substr(currentFile.length - 3, currentFile.length)
return extention.toLowerCase() === 'sol' || extention.toLowerCase() === 'yul' return extension.toLowerCase() === 'sol' || extension.toLowerCase() === 'yul'
} }
const sessionSwitched = () => { const sessionSwitched = () => {

@ -176,7 +176,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
'compilerInput': 'Input to the Solidity compiler', 'compilerInput': 'Input to the Solidity compiler',
'functionHashes': 'List of declared function and their corresponding hash', 'functionHashes': 'List of declared function and their corresponding hash',
'gasEstimates': 'Gas estimation for each function call', 'gasEstimates': 'Gas estimation for each function call',
'metadata': 'Contains all informations related to the compilation', 'metadata': 'Contains all information related to the compilation',
'metadataHash': 'Hash representing all metadata information', 'metadataHash': 'Hash representing all metadata information',
'abi': 'ABI: describing all the functions (input/output params, scope, ...)', 'abi': 'ABI: describing all the functions (input/output params, scope, ...)',
'name': 'Name of the compiled contract', 'name': 'Name of the compiled contract',

@ -88,7 +88,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
const messagesEndRef = useRef(null) const messagesEndRef = useRef(null)
const typeWriterIndexes = useRef([]) const typeWriterIndexes = useRef([])
// terminal dragable // terminal draggable
const panelRef = useRef(null) const panelRef = useRef(null)
const terminalMenu = useRef(null) const terminalMenu = useRef(null)

@ -36,7 +36,7 @@ export interface ThemeModule extends Plugin<any, any> {
*/ */
switchTheme(themeName?: string): void; switchTheme(themeName?: string): void;
/** /**
* fixes the invertion for images since this should be adjusted when we switch between dark/light qualified themes * fixes the inversion for images since this should be adjusted when we switch between dark/light qualified themes
* @param {element} [image] - the dom element which invert should be fixed to increase visibility * @param {element} [image] - the dom element which invert should be fixed to increase visibility
*/ */
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any

@ -369,7 +369,7 @@ export const downloadPath = async (path: string) => {
try { try {
await fileManager.download(path) await fileManager.download(path)
} catch (error) { } catch (error) {
dispatch(displayPopUp('Oops! An error ocurred while downloading.' + error)) dispatch(displayPopUp('Oops! An error occurred while downloading.' + error))
} }
} }
@ -379,7 +379,7 @@ export const copyFile = async (src: string, dest: string) => {
try { try {
await fileManager.copyFile(src, dest) await fileManager.copyFile(src, dest)
} catch (error) { } catch (error) {
dispatch(displayPopUp('Oops! An error ocurred while performing copyFile operation.' + error)) dispatch(displayPopUp('Oops! An error occurred while performing copyFile operation.' + error))
} }
} }
@ -406,7 +406,7 @@ export const copyShareURL = async (path: string) => {
const shareUrl = `${window.location.origin}/#shareCode=${hash}` const shareUrl = `${window.location.origin}/#shareCode=${hash}`
navigator.clipboard.writeText(shareUrl) navigator.clipboard.writeText(shareUrl)
} catch (error) { } catch (error) {
dispatch(displayPopUp('Oops! An error ocurred while performing copyShareURL operation.' + error)) dispatch(displayPopUp('Oops! An error occurred while performing copyShareURL operation.' + error))
} }
} }
@ -416,7 +416,7 @@ export const copyFolder = async (src: string, dest: string) => {
try { try {
await fileManager.copyDir(src, dest) await fileManager.copyDir(src, dest)
} catch (error) { } catch (error) {
dispatch(displayPopUp('Oops! An error ocurred while performing copyDir operation.' + error)) dispatch(displayPopUp('Oops! An error occurred while performing copyDir operation.' + error))
} }
} }
@ -508,7 +508,7 @@ const packageGistFiles = async (directory) => {
if (isFile) { if (isFile) {
try { try {
workspaceProvider.get(directory, (error, content) => { workspaceProvider.get(directory, (error, content) => {
if (error) throw new Error('An error ocurred while getting file content. ' + directory) if (error) throw new Error('An error occurred while getting file content. ' + directory)
if (/^\s+$/.test(content) || !content.length) { if (/^\s+$/.test(content) || !content.length) {
content = '// this line is added to create a gist. Empty file is not allowed.' content = '// this line is added to create a gist. Empty file is not allowed.'
} }
@ -596,7 +596,7 @@ export const moveFile = async (src: string, dest: string) => {
try { try {
await fileManager.moveFile(src, dest) await fileManager.moveFile(src, dest)
} catch (error) { } catch (error) {
dispatch(displayPopUp('Oops! An error ocurred while performing moveFile operation.' + error)) dispatch(displayPopUp('Oops! An error occurred while performing moveFile operation.' + error))
} }
} }
@ -606,7 +606,7 @@ export const moveFolder = async (src: string, dest: string) => {
try { try {
await fileManager.moveDir(src, dest) await fileManager.moveDir(src, dest)
} catch (error) { } catch (error) {
dispatch(displayPopUp('Oops! An error ocurred while performing moveDir operation.' + error)) dispatch(displayPopUp('Oops! An error occurred while performing moveDir operation.' + error))
} }
} }

@ -702,7 +702,7 @@ export const cloneRepository = async (url: string) => {
plugin.call('notification', 'modal', cloneModal) plugin.call('notification', 'modal', cloneModal)
}) })
} catch (e) { } catch (e) {
dispatch(displayPopUp('An error occured: ' + e)) dispatch(displayPopUp('An error occurred: ' + e))
} }
} }
} }

@ -21,5 +21,5 @@ try {
console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc setting installation output: ${solcUseOP.toString()}`) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc setting installation output: ${solcUseOP.toString()}`)
console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: Slither is ready to use!`) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: Slither is ready to use!`)
} catch (err) { } catch (err) {
console.log('\x1b[31m%s\x1b[0m', `[Slither Installation]: Error occured: ${err}`) console.log('\x1b[31m%s\x1b[0m', `[Slither Installation]: Error occurred: ${err}`)
} }

@ -25,7 +25,7 @@ After the release planning each one of us has to specify the effort need for eac
This meeting happens a few days after the release planning meeting. This meeting happens a few days after the release planning meeting.
We check all the issues and associated effort and identify critical issues. We check all the issues and associated effort and identify critical issues.
e.g: e.g:
- issues that'll need to be splitted. - issues that'll need to be split.
- issues that miss important information. - issues that miss important information.
- issues that are dependent each others. - issues that are dependent each others.
- issued that require different skills or that the team member is less available during this release. - issued that require different skills or that the team member is less available during this release.

@ -104,7 +104,7 @@ Before starting coding, we should ensure all devs / contributors are aware of:
Your feedback will often be better received if you pose it in the form of a question. Your feedback will often be better received if you pose it in the form of a question.
- Pull request should be reviewed to comply to coding best practices. - Pull request should be reviewed to comply to coding best practices.
- You should take the responsability of the PR you are reviewing. - You should take the responsibility of the PR you are reviewing.
- You should make sure the app is viable after the PR is being merged. - You should make sure the app is viable after the PR is being merged.
- You should make sure the PR is correctly tested (e2e tests, unit tests) - You should make sure the PR is correctly tested (e2e tests, unit tests)
- Ideally You should have enough knowledge to be able to fix related bugs. - Ideally You should have enough knowledge to be able to fix related bugs.
@ -136,7 +136,7 @@ Before starting coding, we should ensure all devs / contributors are aware of:
- agree on a release date (which can be earlier 1 week after the meeting and not later than 4 weeks after the meeting. - agree on a release date (which can be earlier 1 week after the meeting and not later than 4 weeks after the meeting.
- add issues that are eligible to get in the release. - add issues that are eligible to get in the release.
- remove issues that aren't doable in time or represent a risk. - remove issues that aren't doable in time or represent a risk.
- plan for asking feedback about new features (in social medias). - plan for asking feedback about new features (in social media).
--- ---
@ -177,7 +177,7 @@ Before starting coding, we should ensure all devs / contributors are aware of:
### 3) Documentation: ### 3) Documentation:
- The documentation is done / updated just after the feature / release in a team effort. - The documentation is done / updated just after the feature / release in a team effort.
- Documentation work is filable as a github issue. - Documentation work is fileable as a github issue.
- It is encouraged to find and link associated doc produced by the community (blog posts, videos, tutorials, ...) - It is encouraged to find and link associated doc produced by the community (blog posts, videos, tutorials, ...)
--- ---

Loading…
Cancel
Save