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
# Create Remix user, don't use root!
# RUN yes | adduser --disabled-password remix && mkdir /app

@ -298,7 +298,7 @@ export class CircomPluginClient extends PluginClient {
}
} else {
if (depPath) {
// resolves relative dependecies for .deps folder
// resolves relative dependencies for .deps folder
path = pathModule.resolve(depPath.slice(0, depPath.lastIndexOf('/')), include)
path = path.replace('https:/', 'https://')
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.
*/
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
const browser = this.api
let occurence = 0
let occurrence = 0
this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => {
Array.isArray(res.value) && res.value.forEach(function (jsonWebElement) {
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) {
isTextFound = true
occurence++
occurrence++
}
})
})
})
browser.perform(() => {
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')
})
return this

@ -4,7 +4,7 @@ const storage = `pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retreive value in a variable
* @dev Store & retrieve value in a variable
*/
contract Storage {
@ -22,7 +22,7 @@ contract Storage {
* @dev Return value
* @return value of 'number'
*/
function retreive() public view returns (uint256){
function retrieve() public view returns (uint256){
return number;
}
}`
@ -301,7 +301,7 @@ contract BallotTest {
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;
}
}

@ -75,7 +75,7 @@ module.exports = {
abortOnFailure: false,
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)
.clickLaunchIcon('filePanel')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)

@ -71,7 +71,7 @@ module.exports = {
abortOnFailure: false,
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)
.clickLaunchIcon('filePanel')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)

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

@ -38,7 +38,7 @@ module.exports = {
.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) {
browser
.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
* - Source Verifier service for fetching the contract code
* - Ropsten node for retrieving the trace and storage

@ -42,7 +42,7 @@ module.exports = {
.clickLaunchIcon('udapp')
.click('.udapp_contractActionsContainerSingle > div')
.clickInstance(0)
.clickFunction('retunValues1 - transact (not payable)')
.clickFunction('returnValues1 - transact (not payable)')
.testFunction('last',
{
status: '0x1 Transaction mined and execution succeed',
@ -53,7 +53,7 @@ module.exports = {
3: 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
}
})
.clickFunction('retunValues2 - transact (not payable)')
.clickFunction('returnValues2 - transact (not payable)')
.testFunction('last',
{
status: '0x1 Transaction mined and execution succeed',
@ -70,7 +70,7 @@ module.exports = {
9: 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000'
}
}).pause(500)
.clickFunction('retunValues3 - transact (not payable)')
.clickFunction('returnValues3 - transact (not payable)')
.testFunction('last',
{
status: '0x1 Transaction mined and execution succeed',
@ -312,10 +312,10 @@ const sources = [
contract TestContract { function f() public returns (uint) { return 8; }
function g() public returns (uint, string memory, bool, uint) {
uint payment = 345;
bool payed = true;
bool paid = true;
string memory comment = "comment_comment_";
uint month = 4;
return (payment, comment, payed, month); } }`
return (payment, comment, paid, month); } }`
}
},
{
@ -323,14 +323,14 @@ const sources = [
content: `
contract testReturnValues {
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;
_u = 345;
_i = -345;
_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;
_b2 = 0x1223;
_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";
}
function retunValues3 () public returns (ActionChoices _en, int[5][] memory _a1) {
function returnValues3 () public returns (ActionChoices _en, int[5][] memory _a1) {
_en = ActionChoices.GoStraight;
int[5][] memory a = new int[5][](3);
a[0] = [int(1),-45,-78,56,60];

@ -7,7 +7,7 @@ module.exports = {
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)
.waitForElementVisible('*[data-id="verticalIconsKindpluginManager"]')
.click('*[data-id="verticalIconsKindpluginManager"]')
@ -19,7 +19,7 @@ module.exports = {
.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)
.waitForElementVisible('*[data-id="verticalIconsKinddebugger"]', 7000)
.pause(5000)

@ -501,7 +501,7 @@ module.exports = {
.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
.execute(function () {
localStorage.setItem('currentWorkspace', 'non_existing_workspace')

@ -209,7 +209,7 @@ module.exports = {
.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
.waitForElementVisible('[data-id="custom-dropdown-menu"]')
.waitForElementPresent('[data-id="workspaceGitInput"]')
@ -239,7 +239,7 @@ module.exports = {
.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
.waitForElementVisible('[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
# Create Remix user, don't use root!
# RUN yes | adduser --disabled-password remix && mkdir /app

@ -18,7 +18,7 @@ function removeTunnel () {
retrieveTunnel(data[k], function (error, result) {
if (error) {
console.log(error)
} else if (result.identtifier === tunnelName) {
} else if (result.identifier === tunnelName) {
deleteTunnel(result.id, function () {
console.log('tunnel deleted ' + data[k] + ' ' + tunnelName)
})
@ -35,7 +35,7 @@ function retrieveTunnel (tunnelid, callback) {
if (error) {
callback(error)
} 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,
"nodeType": "StructuredDocumentation",
"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,
"kind": "function",

@ -21,8 +21,8 @@ we move the documentation to the remix-ide repository
## medium post policy
Any post that relates to Ethereum could be put in the remix plublication.
Although that is not mandatory and left up to the writter.
Any post that relates to Ethereum could be put in the remix publication.
Although that is not mandatory and left up to the writer.
## 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:
`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.
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
@ -49,7 +49,7 @@ it will be set of file:
- solidity 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.
@rob/@francois are managing that.

@ -360,7 +360,7 @@ class Editor extends Plugin {
/**
* 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
*/
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:
column: -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:
column: -1
row: -1

@ -577,7 +577,7 @@ class DGitProvider extends Plugin {
dir
})
} 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)
}
}
@ -587,7 +587,7 @@ class DGitProvider extends Plugin {
}, 1000)
}
} 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
}
}

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

@ -45,7 +45,7 @@ export class CompilationDetailsPlugin extends ViewPlugin {
async showDetails(sentPayload: any) {
await this.call('tabs', 'focus', 'compilationDetails')
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.renderComponent()
}, 2000)

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

@ -35,7 +35,7 @@ type errorMarker = {
}
export default class CodeParserCompiler {
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>;
errorState: boolean;
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.permissionHandlerMessage": "\"{from}\" {rememberText} would like to access to \"{method}\" of \"{to}\"`",
"permissionHandler.description": "Description",

@ -10,7 +10,7 @@
"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.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.message8": "You can update your IPFS settings in the SETTINGS tab.",
"publishToStorage.title4.message9": "Now the default option will be used.",

@ -20,5 +20,5 @@
"search.no": "No",
"search.loading": "Loading",
"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.compilerLicense": "Compiler License",
"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.seeCompilerLicense": "See compiler license",
@ -69,7 +69,7 @@
"solidity.Assembly": "Assembly opcodes describing the contract including corresponding solidity source code",
"solidity.Opcodes": "Assembly opcodes describing the 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.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",

@ -15,7 +15,7 @@
"terminal.welcomeText8": "Right click on a JavaScript file in the file explorer and then click `Run`",
"terminal.welcomeText9": "The following libraries are accessible",
"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.showTerminal": "Show Terminal",
"terminal.clearConsole": "Clear console",

@ -26,7 +26,7 @@
"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.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.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.",
@ -123,7 +123,7 @@
"udapp.contractCreation": "Contract Creation",
"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.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.gweiText": "visit {a} for current gas price info.",
"udapp.maxTransactionFee": "Max transaction fee",

@ -20,7 +20,7 @@ export class NetworkModule extends Plugin {
super(profile)
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.emit('providerChanged', provider)
})

@ -84,7 +84,7 @@ class Recorder extends Plugin {
const rawAddress = txResult.receipt.contractAddress
if (!rawAddress) return // not a contract creation
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._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
*/
@ -279,7 +279,7 @@ class Recorder extends Plugin {
}
if (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._createdContractsReverse[tx.timestamp] = address
newContractFn(abi, address, record.contractName)

@ -29,7 +29,7 @@ const css = csjs`
.heading {
margin-bottom: 0;
}
.explaination {
.explanation {
margin-top: 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
*/
fixInvert(image) {

@ -21298,9 +21298,9 @@ var SolidityParser = (() => {
Dependents2[Dependents2["ANCESTORS"] = 3] = "ANCESTORS";
Dependents2[Dependents2["DESCENDANTS"] = 4] = "DESCENDANTS";
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["PRECEEDING"] = 8] = "PRECEEDING";
Dependents2[Dependents2["PRECEDING"] = 8] = "PRECEDING";
Dependents2[Dependents2["FOLLOWING"] = 9] = "FOLLOWING";
})(Dependents = exports.Dependents || (exports.Dependents = {}));
}
@ -33949,7 +33949,7 @@ var SolidityParser = (() => {
_toText(ctx) {
const text = ctx.text;
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;
}

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
*/
getCurrentFork() {
@ -619,7 +619,7 @@ export class Blockchain extends Plugin {
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) {
this.transactionContextAPI = transactionContextAPI
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
import {app, BrowserWindow, MenuItemConstructorOptions} from 'electron';

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

@ -22,7 +22,7 @@ export default class abstractAstView {
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
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
*/
multipleContractsWithSameName = false
@ -36,14 +36,14 @@ export default class abstractAstView {
* "functions": [
* {
* "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
* "localVariables": [], // Local variable declaration nodes
* "parameters": [] // Parameter types of the function in order of definition
* "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
* "stateVariables": [] // AST nodes of all State variables
* }
@ -130,7 +130,7 @@ export default class abstractAstView {
if (inheritsFrom) {
currentContract.stateVariables = currentContract.stateVariables.concat(inheritsFrom.stateVariables)
} 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 {
const name: string = getContractName(contract.node)
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.currentContractIndex = (this.contracts.push(contract) - 1)

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

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

@ -3,7 +3,7 @@
import { FunctionHLAst, ContractHLAst, FunctionCallGraph, ContractCallGraph, Context, FunctionCallAstNode } from '../../types'
import {
isLocalCallGraphRelevantNode, isExternalDirectCall, getFullQualifiedFunctionCallIdent,
getFullQuallyfiedFuncDefinitionIdent, getContractName
getFullQualifiedFuncDefinitionIdent as getFullQualifiedFuncDefinitionIdent, getContractName
} from './staticAnalysisCommon'
type filterNodesFunction = (node: FunctionCallAstNode) => boolean
@ -39,7 +39,7 @@ function buildLocalFuncCallGraphInternal (functions: FunctionHLAst[], nodeFilter
* }
* },
* "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
* }
* }
@ -52,7 +52,7 @@ export function buildGlobalFuncCallGraph (contracts: ContractHLAst[]): Record<st
contracts.forEach((contract: ContractHLAst) => {
const filterNodes: filterNodesFunction = (node: FunctionCallAstNode) => { return isLocalCallGraphRelevantNode(node) || isExternalDirectCall(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) }
})

@ -1,5 +1,5 @@
import category from './categories'
import { hasFunctionBody, getFullQuallyfiedFuncDefinitionIdent, getEffectedVariableName } from './staticAnalysisCommon'
import { hasFunctionBody, getFullQualifiedFuncDefinitionIdent, getEffectedVariableName } from './staticAnalysisCommon'
import algorithm from './algorithmCategories'
import AbstractAst from './abstractAstView'
import {
@ -28,7 +28,7 @@ export default class noReturn implements AnalyzerModule {
contracts.forEach((contract: ContractHLAst) => {
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)) {
warnings.push({
warning: `${funcName}: Mixing of named and unnamed return parameters is not advised.`,

@ -1,5 +1,5 @@
import category from './categories'
import { getDeclaredVariableName, getFullQuallyfiedFuncDefinitionIdent } from './staticAnalysisCommon'
import { getDeclaredVariableName, getFullQualifiedFuncDefinitionIdent } from './staticAnalysisCommon'
import algorithm from './algorithmCategories'
import AbstractAst from './abstractAstView'
import { get } from 'fast-levenshtein'
@ -35,7 +35,7 @@ export default class similarVariableNames implements AnalyzerModule {
contracts.forEach((contract) => {
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 = ''
if (hasModifiers) {
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.
* Example: x = 10; => x
* @effectNode {ASTNode} Assignmnet node
* @effectNode {ASTNode} Assignment node
* @return {string} variable name written to
*/
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')
}
function getFullQuallyfiedFuncDefinitionIdent (contract: ContractDefinitionAstNode, func: FunctionDefinitionAstNode, paramTypes: any[]): string {
return getContractName(contract) + '.' + getFunctionDefinitionName(func) + '(' + util.concatWithSeperator(paramTypes, ',') + ')'
function getFullQualifiedFuncDefinitionIdent (contract: ContractDefinitionAstNode, func: FunctionDefinitionAstNode, paramTypes: any[]): string {
return getContractName(contract) + '.' + getFunctionDefinitionName(func) + '(' + util.concatWithSeparator(paramTypes, ',') + ')'
}
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
* @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
* @return {bool}
*/
@ -1059,11 +1059,11 @@ function findFirstSubNodeLTR (node: any, type: string): any {
*/
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
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 {
return funName + '(' + util.concatWithSeperator(paramTypes, ',') + ')'
return funName + '(' + util.concatWithSeparator(paramTypes, ',') + ')'
}
// To create the method signature similar to contract.evm.gasEstimates.external object
@ -1157,7 +1157,7 @@ export {
getLibraryCallContractName,
getLibraryCallMemberName,
getFullQualifiedFunctionCallIdent,
getFullQuallyfiedFuncDefinitionIdent,
getFullQualifiedFuncDefinitionIdent as getFullQualifiedFuncDefinitionIdent,
getStateVariableDeclarationsFromContractNode,
getFunctionOrModifierDefinitionParameterPart,
getFunctionDefinitionReturnParameterPart,

@ -25,7 +25,7 @@ export default class stringBytesLength implements AnalyzerModule {
const version = getCompilerVersion(compilationResults.contracts)
if (this.stringToBytesConversions.length > 0 && this.bytesLengthChecks.length > 0) {
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,
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 {

@ -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')
})
test('staticAnalysisCommon.getFullQuallyfiedFuncDefinitionIdent', function (t) {
test('staticAnalysisCommon.getFullQualifiedFuncDefinitionIdent', function (t) {
t.plan(3)
t.ok(common.getFullQuallyfiedFuncDefinitionIdent(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.getFullQuallyfiedFuncDefinitionIdent(parameterFunctionCall, functionDefinition, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a ContractDefinition Node'), 'throws on wrong nodes')
t.ok(common.getFullQualifiedFuncDefinitionIdent(contractDefinition, functionDefinition, ['uint256', 'bool']) === 'C.f(uint256,bool)', 'creates right signature')
t.throws(() => common.getFullQualifiedFuncDefinitionIdent(contractDefinition, parameterFunctionCall, ['uint256', 'bool']), new RegExp('staticAnalysisCommon.js: not a FunctionDefinition 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) {

@ -142,7 +142,7 @@ export class CompilerImports extends Plugin {
/**
* 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 match any external url
*
@ -185,14 +185,14 @@ export class CompilerImports extends Plugin {
} else {
const localhostProvider = await this.call('fileManager', 'getProviderByName', 'localhost')
if (localhostProvider.isConnected()) {
const splitted = /([^/]+)\/(.*)$/g.exec(url)
const split = /([^/]+)\/(.*)$/g.exec(url)
const possiblePaths = ['localhost/installed_contracts/' + url]
// pick remix-tests library contracts from '.deps'
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)
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) {
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
* Compile the code using Solidity compiler
* 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} targetPath - Folder where to save the compilation arfefacts
* @return {CompilerAbstract} - compilation data targeting the given @arg contractAddress
@ -72,7 +72,7 @@ export class FetchAndCompile extends Plugin {
compilationTargets,
settings,
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}`
if (compilationTargets[path] && compilationTargets[path].content) {
return cb(null, compilationTargets[path].content)
@ -100,7 +100,7 @@ export class FetchAndCompile extends Plugin {
compilationTargets,
settings,
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}`
if (compilationTargets[path] && compilationTargets[path].content) {
return cb(null, compilationTargets[path].content)
@ -183,7 +183,7 @@ export class FetchAndCompile extends Plugin {
compilationTargets,
settings,
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}`
if (compilationTargets[path] && compilationTargets[path].content) {
return cb(null, compilationTargets[path].content)

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

@ -10,8 +10,8 @@ export class CodeResolver {
constructor ({ getCode, fork }) {
this.getCode = getCode
this.bytecodeByAddress = {} // bytes code by contract addesses
this.instructionsByAddress = {} // assembly items instructions list by contract addesses
this.bytecodeByAddress = {} // bytes code by contract addresses
this.instructionsByAddress = {} // assembly items instructions list by contract addresses
this.instructionsIndexByBytesOffset = {} // mapping between bytes offset and instructions index.
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 {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
*
* @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) {
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 {Object} compilationResult - current compilation result

@ -4,11 +4,11 @@ import { getLinebreakPositions, convertOffsetToLineColumn } from './sourceMappin
export class OffsetToColumnConverter {
lineBreakPositionsByContent
sourceMappingDecoder
offsetConvertion
offsetConversion
constructor (compilerEvent) {
this.lineBreakPositionsByContent = {}
this.offsetConvertion = {}
this.offsetConversion = {}
if (compilerEvent) {
compilerEvent.register('compilationFinished', (success, data, source, input, version) => {
this.clear()
@ -29,17 +29,17 @@ export class OffsetToColumnConverter {
}
}
const token = `${rawLocation.start}:${rawLocation.length}:${file}`
if (this.offsetConvertion[token]) {
return this.offsetConvertion[token]
if (this.offsetConversion[token]) {
return this.offsetConversion[token]
} else {
const convertion = convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
this.offsetConvertion[token] = convertion
return convertion
const conversion = convertOffsetToLineColumn(rawLocation, this.lineBreakPositionsByContent[file])
this.offsetConversion[token] = conversion
return conversion
}
}
clear () {
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 }, ... }
*
* @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
* @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.
*
* @param {Object} tx
* @param {Int} stepIndex
* @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
*/
async initialPreimagesMappings (tx, stepIndex, address, corrections) {

@ -40,7 +40,7 @@ export class TraceCache {
this.memoryChanges = []
this.formattedMemory = {}
this.storageChanges = []
this.sstore = {} // all sstore occurence in the trace
this.sstore = {} // all sstore occurrences in the trace
}
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')
// var compilation = require('./compilation.json')

@ -80,7 +80,7 @@ export function checkError (execResult, compiledContracts) {
return ret
}
const exceptionError = execResult.errorMessage || ''
const error = `Error occured: ${execResult.errorMessage}.\n`
const error = `Error occurred: ${execResult.errorMessage}.\n`
let msg = ''
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'
@ -113,7 +113,7 @@ export function checkError (execResult, compiledContracts) {
const decodedCustomErrorInputs = fn.decodeFunctionData(functionDesc, returnData)
decodedCustomErrorInputsClean = {}
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) {
const functionSignature = Object.keys(fn.functions)[0]
// 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
*
* @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 {Function} callback - callback
*/
@ -94,7 +94,7 @@ export function encodeParams (params, funAbi, callback?) {
/**
* 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 {Function} callback - callback
*/
@ -108,8 +108,8 @@ export function encodeFunctionCall (params, funAbi, callback) {
/**
* encode constructor creation and link with provided libraries if needed
*
* @param {Object} contract - input paramater of the function to call
* @param {Object} params - input paramater of the function to call
* @param {Object} contract - input parameter 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} linkLibraries - contains {linkReferences} object which list all the addresses to be linked
* @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
*
* @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} linkReferences - given by the compiler, contains the proper linkReferences
* @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 {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} 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 {Function} callback - callback
* @param {Function} callbackStep - callbackStep
@ -195,7 +195,7 @@ export function encodeConstructorCallAndDeployLibraries (contractName, contract,
* @param {Object} contracts - map of all compiled contracts.
* @param {Bool} isConstructor - isConstructor.
* @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} callbackStep - callbackStep
* @param {Function} callbackDeployLibrary - callbackDeployLibrary
@ -399,7 +399,7 @@ export function decodeResponse (response, fnabi) {
const type = 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
const abiCoder = new ethers.utils.AbiCoder()
const decodedObj = abiCoder.decode(outputTypes, response)

@ -375,7 +375,7 @@ export class TxListener {
_decodeInputParams (data, abi) {
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 = []
for (let i = 0; i < abi.inputs.length; i++) {

@ -181,7 +181,7 @@ async function tryTillReceiptAvailable (txhash: string, web3: Web3) {
if (receipt) {
if (!receipt.to && !receipt.contractAddress) {
// 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
return receipt
}

@ -24,7 +24,7 @@ export const keccak = function(a: Buffer, bits: number = 256): Buffer {
return toBuffer(keccak512(a))
}
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} ...
* @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)
* used if multiple occurences of the same key is needed
* if the key start with * the value is directly appended to the inline style (which should be already inline style formatted)
* used if multiple occurrences of the same key is needed
*/
export function formatCss (css1, css2) {
let ret = ''

@ -4,7 +4,7 @@ import { bufferToHex, setLengthLeft, toBuffer, addHexPrefix } from '@ethereumjs/
import stringSimilarity from 'string-similarity'
/*
contains misc util: @TODO should be splitted
contains misc util: @TODO should be split
- hex conversion
- binary search
- 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)
* @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)
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}
*/
@ -286,8 +286,8 @@ export function groupBy (arr, key) {
}, {})
}
export function concatWithSeperator (list, seperator) {
return list.reduce((sum, item) => sum + item + seperator, '').slice(0, -seperator.length)
export function concatWithSeparator (list, separator) {
return list.reduce((sum, item) => sum + item + separator, '').slice(0, -separator.length)
}
export function escapeRegExp (str) {
@ -305,10 +305,10 @@ function removeByIndex (code, index, length, emptyRef) {
function removeImmutableReference (code1, code2) {
try {
const refOccurence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g)
if (!refOccurence) return code1
const refOccurrence = code2.match(/7f0000000000000000000000000000000000000000000000000000000000000000/g)
if (!refOccurrence) return code1
let offset = 0
refOccurence.map((value) => {
refOccurrence.map((value) => {
offset = code2.indexOf(value, offset)
code1 = removeByIndex(code1, offset, value.length, '7f0000000000000000000000000000000000000000000000000000000000000000')
offset = offset + 1

@ -4,26 +4,26 @@ import { EventManager } from '../src/eventManager'
tape('eventManager', function (t) {
t.test('eventManager', function (st) {
const events = new EventManager()
const listenner = {}
const listener = {}
let trace = ''
listenner['listen'] = function (data1) {
listener['listen'] = function (data1) {
trace += data1
}
const registeredFunction = function (data) {
trace += data
}
events.register('event1', listenner, listenner['listen'])
events.register('event1', listener, listener['listen'])
events.register('event2', registeredFunction, null)
events.trigger('event1', ['event1'])
events.trigger('event2', ['event2'])
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['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['event2'].length, 1)

@ -55,12 +55,12 @@ tape('util.groupBy on valid input', function (t) {
t.deepEqual(result, expectedResult)
})
tape('util.concatWithSeperator valid output', function (t) {
tape('util.concatWithSeparator valid output', function (t) {
t.plan(4)
t.notEqual(util.concatWithSeperator(['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.concatWithSeperator(['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.notEqual(util.concatWithSeparator(['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.concatWithSeparator(['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 plus')
})
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 signature signature
* @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 senderRegex = /#sender: account-+(\d)/g
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 hhLogs
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) {
sender = opts.accounts[sender]
}

@ -58,7 +58,7 @@ export function getBlockCompletionItems(range: monacoTypes.IRange, monaco): mona
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});',
kind: monaco.languages.CompletionItemKind.Method,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
@ -257,8 +257,8 @@ export function getCompletionSnippets(range: monacoTypes.IRange, monaco): monaco
{
label: 'erc173',
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}',
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}',
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 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',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
@ -359,7 +359,7 @@ export function getMsgCompletionItems(range: monacoTypes.IRange, monaco): monaco
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,
insertText: '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[] {
return [
{
detail: 'encode(..) returs (bytes): ABI-encodes the given arguments',
detail: 'encode(..) returns (bytes): ABI-encodes the given arguments',
insertText: 'encode(${1:arg});',
kind: monaco.languages.CompletionItemKind.Method,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
@ -408,7 +408,7 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco
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});',
kind: monaco.languages.CompletionItemKind.Method,
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,

@ -9828,7 +9828,7 @@ declare namespace monaco.languages.typescript {
*/
getFormattingEditsAfterKeystroke(
fileName: string,
postion: number,
position: number,
ch: string,
options: any
): Promise<any[]>
@ -9838,7 +9838,7 @@ declare namespace monaco.languages.typescript {
*/
findRenameLocations(
fileName: string,
positon: number,
position: number,
findInStrings: boolean,
findInComments: boolean,
providePrefixAndSuffixTextForRename: boolean
@ -9848,7 +9848,7 @@ declare namespace monaco.languages.typescript {
* @param options `typescript.RenameInfoOptions`
* @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.
* @returns `typescript.EmitOutput`

@ -30,8 +30,8 @@ export interface CarouselProps {
customButtonGroup?: React.ReactElement<any> | null;
infinite?: boolean;
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) => ...`
beforeChange?: (nextSlide: number, state: StateCallBack) => void; // Change callback before 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 every time. `(previousSlide, currentState) => ...`
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
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 { EventEmitter } from 'events'
import { Engine } from '@remixproject/engine/lib/engine'
@ -50,9 +50,9 @@ export class PluginManagerSettings {
currentSetting: any
onValidation(): void
/** Clear one permission from a plugin */
clearPersmission(from: string, to: string, method: string): void
/** Clear all persmissions from a plugin */
clearAllPersmission(to: string): void
clearPermission(from: string, to: string, method: string): void
/** Clear all permissions from a plugin */
clearAllPermission(to: string): void
settings(): any
render(): any
}

@ -49,7 +49,7 @@ export function ContractGUI(props: ContractGUIProps) {
setTitle(props.funcABI.type === 'receive' ? '(receive)' : '(fallback)')
}
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 = ''
multiFields.current.filter((el) => el !== null && el !== undefined).forEach((el) => (el.value = ''))
multiFields.current = []

@ -43,7 +43,7 @@ export class Blockchain extends Plugin<any, any> {
getProvider(): 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
*/
getCurrentFork(): string;

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

@ -176,7 +176,7 @@ export const ContractSelection = (props: ContractSelectionProps) => {
'compilerInput': 'Input to the Solidity compiler',
'functionHashes': 'List of declared function and their corresponding hash',
'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',
'abi': 'ABI: describing all the functions (input/output params, scope, ...)',
'name': 'Name of the compiled contract',

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

@ -36,7 +36,7 @@ export interface ThemeModule extends Plugin<any, any> {
*/
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
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@ -369,7 +369,7 @@ export const downloadPath = async (path: string) => {
try {
await fileManager.download(path)
} 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 {
await fileManager.copyFile(src, dest)
} 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}`
navigator.clipboard.writeText(shareUrl)
} 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 {
await fileManager.copyDir(src, dest)
} 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) {
try {
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) {
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 {
await fileManager.moveFile(src, dest)
} 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 {
await fileManager.moveDir(src, dest)
} 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)
})
} 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]: Slither is ready to use!`)
} 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.
We check all the issues and associated effort and identify critical issues.
e.g:
- issues that'll need to be splitted.
- issues that'll need to be split.
- issues that miss important information.
- issues that are dependent each others.
- 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.
- 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 PR is correctly tested (e2e tests, unit tests)
- 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.
- add issues that are eligible to get in the release.
- 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:
- 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, ...)
---

Loading…
Cancel
Save