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

pull/1342/head
davidzagi93@gmail.com 3 years ago
commit 5d44b80c50
  1. 1
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  2. 4
      apps/remix-ide-e2e/src/types/index.d.ts
  3. 3
      libs/remix-analyzer/.eslintrc
  4. 3
      libs/remix-astwalker/.eslintrc
  5. 1
      libs/remix-astwalker/src/astWalker.ts
  6. 1
      libs/remix-astwalker/src/sourceMappings.ts
  7. 3
      libs/remix-lib/.eslintrc
  8. 30
      libs/remix-simulator/test/blocks.ts
  9. 3
      libs/remix-solidity/.eslintrc
  10. 3
      libs/remix-tests/.eslintrc
  11. 2
      libs/remix-tests/jest.config.js
  12. 3
      libs/remix-tests/src/types.ts
  13. 8
      libs/remix-ui/debugger-ui/src/lib/idebugger-api.ts
  14. 6
      libs/remix-ui/debugger-ui/src/types/index.ts
  15. 2
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
  16. 2
      libs/remix-ui/file-explorer/src/lib/types/index.ts
  17. 1
      libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.tsx
  18. 1
      libs/remix-ui/modal-dialog/src/lib/types/index.ts
  19. 2
      libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCard.tsx
  20. 2
      libs/remix-ui/plugin-manager/src/lib/components/ActivePluginCardContainer.tsx
  21. 2
      libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCard.tsx
  22. 2
      libs/remix-ui/plugin-manager/src/lib/components/InactivePluginCardContainer.tsx
  23. 2
      libs/remix-ui/plugin-manager/src/lib/components/LocalPluginForm.tsx
  24. 2
      libs/remix-ui/plugin-manager/src/lib/components/moduleHeading.tsx
  25. 2
      libs/remix-ui/plugin-manager/src/lib/components/permissionsSettings.tsx
  26. 2
      libs/remix-ui/plugin-manager/src/lib/components/rootView.tsx
  27. 2
      libs/remix-ui/plugin-manager/src/lib/remix-ui-plugin-manager.tsx
  28. 11
      libs/remix-ui/plugin-manager/src/types.d.ts
  29. 2
      libs/remix-ui/publish-to-storage/src/lib/publish-to-storage.tsx
  30. 2
      libs/remix-ui/solidity-compiler/src/lib/solidity-compiler.tsx
  31. 6
      libs/remix-ui/solidity-compiler/src/lib/types/index.ts
  32. 2
      libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx
  33. 1
      libs/remix-ui/tree-view/src/types/index.ts
  34. 2
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
  35. 179
      package-lock.json
  36. 4
      package.json

@ -184,7 +184,6 @@ const stateCheck = {
} }
} }
*/ */
const ballotABI = `[ const ballotABI = `[
{ {
"inputs": [ "inputs": [

@ -1,6 +1,6 @@
// Merge custom command types with nightwatch types // Merge custom command types with nightwatch types
/* eslint-disable no-use-before-define */
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch' // eslint-disable-line @typescript-eslint/no-unused-vars
declare module 'nightwatch' { declare module 'nightwatch' {
export interface NightwatchCustomCommands { export interface NightwatchCustomCommands {

@ -4,7 +4,8 @@
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-unused-vars": "off",
"no-unused-vars": "off", "no-unused-vars": "off",
"dot-notation": "off" "dot-notation": "off",
"no-use-before-define": "off"
}, },
"ignorePatterns": ["!**/*"] "ignorePatterns": ["!**/*"]
} }

@ -3,7 +3,8 @@
"rules": { "rules": {
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-namespace-keyword": "off", "@typescript-eslint/prefer-namespace-keyword": "off",
"no-unused-vars": "off" "no-unused-vars": "off",
"no-use-before-define": "off"
}, },
"ignorePatterns": ["!**/*"] "ignorePatterns": ["!**/*"]
} }

@ -39,6 +39,7 @@ export function isYulAstNode (node: Record<string, unknown>): boolean {
* in each case, if the event emits false it does not descend into children. * in each case, if the event emits false it does not descend into children.
* If no event for the current type, children are visited. * If no event for the current type, children are visited.
*/ */
// eslint-disable-next-line no-redeclare
export class AstWalker extends EventEmitter { export class AstWalker extends EventEmitter {
manageCallback ( manageCallback (
node: AstNode, node: AstNode,

@ -58,6 +58,7 @@ export function sourceLocationFromSrc (src: string): Location {
* Routines for retrieving solc AST object(s) using some criteria, usually * Routines for retrieving solc AST object(s) using some criteria, usually
* includng "src' information. * includng "src' information.
*/ */
// eslint-disable-next-line no-redeclare
export class SourceMappings { export class SourceMappings {
readonly source: string; readonly source: string;
readonly lineBreaks: Array<number>; readonly lineBreaks: Array<number>;

@ -3,7 +3,8 @@
"rules": { "rules": {
"standard/no-callback-literal": "off", "standard/no-callback-literal": "off",
"no-unused-vars": "off", "no-unused-vars": "off",
"dot-notation": "off" "dot-notation": "off",
"no-use-before-define": "off"
}, },
"env": { "env": {
"browser": true, "browser": true,

@ -115,8 +115,7 @@ describe('blocks', () => {
assert.deepEqual(numberTransactions, correctBlock.uncles.length) assert.deepEqual(numberTransactions, correctBlock.uncles.length)
}) })
}) })
/*
/*
describe('eth_getStorageAt', () => { describe('eth_getStorageAt', () => {
it('should get storage at position at given address', async () => { it('should get storage at position at given address', async () => {
const abi: any = [ const abi: any = [
@ -201,30 +200,29 @@ describe('blocks', () => {
} }
] ]
// const code = '0x608060405234801561001057600080fd5b506040516020806102018339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600081905550506101a9806100586000396000f3fe60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480632a1afcd91461006157806360fe47b11461008c5780636d4ce63c146100c7578063ce01e1ec146100f2575b600080fd5b34801561006d57600080fd5b5061007661012d565b6040518082815260200191505060405180910390f35b34801561009857600080fd5b506100c5600480360360208110156100af57600080fd5b8101908080359060200190929190505050610133565b005b3480156100d357600080fd5b506100dc61013d565b6040518082815260200191505060405180910390f35b3480156100fe57600080fd5b5061012b6004803603602081101561011557600080fd5b8101908080359060200190929190505050610146565b005b60005481565b8060008190555050565b60008054905090565b80600081905550807f63a242a632efe33c0e210e04e4173612a17efa4f16aa4890bc7e46caece80de060405160405180910390a25056fea165627a7a7230582063160eb16dc361092a85ced1a773eed0b63738b83bea1e1c51cf066fa90e135d0029' const code = '0x608060405234801561001057600080fd5b506040516020806102018339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600081905550506101a9806100586000396000f3fe60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480632a1afcd91461006157806360fe47b11461008c5780636d4ce63c146100c7578063ce01e1ec146100f2575b600080fd5b34801561006d57600080fd5b5061007661012d565b6040518082815260200191505060405180910390f35b34801561009857600080fd5b506100c5600480360360208110156100af57600080fd5b8101908080359060200190929190505050610133565b005b3480156100d357600080fd5b506100dc61013d565b6040518082815260200191505060405180910390f35b3480156100fe57600080fd5b5061012b6004803603602081101561011557600080fd5b8101908080359060200190929190505050610146565b005b60005481565b8060008190555050565b60008054905090565b80600081905550807f63a242a632efe33c0e210e04e4173612a17efa4f16aa4890bc7e46caece80de060405160405180910390a25056fea165627a7a7230582063160eb16dc361092a85ced1a773eed0b63738b83bea1e1c51cf066fa90e135d0029'
// const contract = new web3.eth.Contract(abi) const contract = new web3.eth.Contract(abi)
// const accounts = await web3.eth.getAccounts() const accounts = await web3.eth.getAccounts()
// const contractInstance: any = await contract.deploy({ data: code, arguments: [100] }).send({ from: accounts[0], gas: 400000 }) const contractInstance: any = await contract.deploy({ data: code, arguments: [100] }).send({ from: accounts[0], gas: 400000 })
// contractInstance.currentProvider = web3.eth.currentProvider contractInstance.currentProvider = web3.eth.currentProvider
// contractInstance.givenProvider = web3.eth.currentProvider contractInstance.givenProvider = web3.eth.currentProvider
// await contractInstance.methods.set(100).send({ from: accounts[0].toLowerCase(), gas: 400000 }) await contractInstance.methods.set(100).send({ from: accounts[0].toLowerCase(), gas: 400000 })
// let storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) let storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
// assert.deepEqual(storage, '0x64') assert.deepEqual(storage, '0x64')
// await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 }) await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 })
// storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
// assert.deepEqual(storage, '0x64') assert.deepEqual(storage, '0x64')
await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 }) await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 })
storage = await web3.eth.getStorageAt(contractInstance.options.address, 0) storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
assert.deepEqual(storage, '0xc8') assert.deepEqual(storage, '0xc8')
}) })
}) })
*/ */
describe('eth_call', () => { describe('eth_call', () => {
it('should get a value', async () => { it('should get a value', async () => {
const abi: any = [ const abi: any = [

@ -2,7 +2,8 @@
"extends": "../../.eslintrc", "extends": "../../.eslintrc",
"rules": { "rules": {
"dot-notation": "off", "dot-notation": "off",
"no-unused-vars": "off" "no-unused-vars": "off",
"no-use-before-define": "off"
}, },
"env": { "env": {
"browser": true, "browser": true,

@ -2,7 +2,8 @@
"extends": "../../.eslintrc", "extends": "../../.eslintrc",
"rules": { "rules": {
"dot-notation": "off", "dot-notation": "off",
"no-unused-vars": "off" "no-unused-vars": "off",
"no-use-before-define": "off"
}, },
"env": { "env": {
"browser": true, "browser": true,

@ -6,7 +6,7 @@ module.exports = {
transform: { transform: {
'^.+\\.[tj]sx?$': 'ts-jest', '^.+\\.[tj]sx?$': 'ts-jest',
}, },
transformIgnorePatterns: ["/node_modules/", "\\.pnp\\.[^\\\/]+$"], transformIgnorePatterns: ["/node_modules/", "/dist/", "\\.pnp\\.[^\\\/]+$"],
rootDir: "./", rootDir: "./",
testTimeout: 40000, testTimeout: 40000,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'],

@ -58,13 +58,12 @@ export interface CompilerConfiguration {
usingWorker?: boolean, usingWorker?: boolean,
runs: number runs: number
} }
export interface CompilationErrors { export interface CompilationErrors {
name: string, name: string,
errors: Array<Error>, errors: Array<Error>,
message: string message: string
} }
// eslint-disable-next-line no-redeclare
export class CompilationErrors extends Error { export class CompilationErrors extends Error {
constructor (errors: Array<any>) { constructor (errors: Array<any>) {
const mapError = errors.map((e) => { return e.formattedMessage || e.message }) const mapError = errors.map((e) => { return e.formattedMessage || e.message })

@ -1,10 +1,6 @@
import type { CompilationResult, CompilationSource } from '@remix-project/remix-solidity-ts' // eslint-disable-line import type { CompilationResult, CompilationSource } from '@remix-project/remix-solidity-ts' // eslint-disable-line
export interface DebuggerUIProps {
debuggerAPI: IDebuggerApi
}
export interface LineColumnLocation { export interface LineColumnLocation {
start: { start: {
line: number, column: number line: number, column: number
@ -68,3 +64,7 @@ export interface IDebuggerApi {
web3: () => any // returns an instance of web3.js web3: () => any // returns an instance of web3.js
showMessage (title: string, message: string): void showMessage (title: string, message: string): void
} }
export interface DebuggerUIProps {
debuggerAPI: IDebuggerApi
}

@ -1,3 +1,5 @@
/* eslint-disable no-undef */
export interface ExtractData { export interface ExtractData {
children?: Array<{key: number | string, value: ExtractData}> children?: Array<{key: number | string, value: ExtractData}>
self?: string | number, self?: string | number,
@ -13,7 +15,7 @@ export interface ExtractData {
} }
export type ExtractFunc = (json: any, parent?: any) => ExtractData export type ExtractFunc = (json: any, parent?: any) => ExtractData
export type FormatSelfFunc = (key: string | number, data: ExtractData) => JSX.Element
export interface DropdownPanelProps { export interface DropdownPanelProps {
dropdownName: string, dropdownName: string,
dropdownMessage?: string, dropdownMessage?: string,
@ -32,5 +34,3 @@ export interface DropdownPanelProps {
headStyle?: React.CSSProperties, headStyle?: React.CSSProperties,
hexHighlight?: boolean // highlight non zero value of hex value hexHighlight?: boolean // highlight non zero value of hex value
} }
export type FormatSelfFunc = (key: string | number, data: ExtractData) => JSX.Element

@ -636,7 +636,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
return { ...prevState, focusModal: { ...state.focusModal, hide: true } } return { ...prevState, focusModal: { ...state.focusModal, hide: true } }
}) })
} }
// eslint-disable-next-line no-undef
const modal = (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => { const modal = (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => {
setState(prevState => { setState(prevState => {
return { return {

@ -1,4 +1,5 @@
import { customAction } from '@remixproject/plugin-api/lib/file-system/file-panel' import { customAction } from '@remixproject/plugin-api/lib/file-system/file-panel'
export type MenuItems = action[] // eslint-disable-line no-use-before-define
/* eslint-disable-next-line */ /* eslint-disable-next-line */
export interface FileExplorerProps { export interface FileExplorerProps {
@ -34,7 +35,6 @@ export interface FileExplorerMenuProps {
export type action = { name: string, type: string[], path: string[], extension: string[], pattern: string[], id: string, multiselect: boolean, label: string } export type action = { name: string, type: string[], path: string[], extension: string[], pattern: string[], id: string, multiselect: boolean, label: string }
export type MenuItems = action[]
export interface FileExplorerContextMenuProps { export interface FileExplorerContextMenuProps {
actions: action[], actions: action[],
createNewFile: (folder?: string) => void, createNewFile: (folder?: string) => void,

@ -4,6 +4,7 @@ import { ModalDialogProps } from './types' // eslint-disable-line
import './remix-ui-modal-dialog.css' import './remix-ui-modal-dialog.css'
declare global { declare global {
// eslint-disable-next-line no-unused-vars
interface Window { testmode: boolean; } interface Window { testmode: boolean; }
} }

@ -1,3 +1,4 @@
/* eslint-disable no-undef */
export interface ModalDialogProps { export interface ModalDialogProps {
id?: string id?: string
title?: string, title?: string,

@ -1,4 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-use-before-define
import React from 'react' import React from 'react'
import '../remix-ui-plugin-manager.css' import '../remix-ui-plugin-manager.css'
interface PluginCardProps { interface PluginCardProps {

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import { Profile } from '@remixproject/plugin-utils' import { Profile } from '@remixproject/plugin-utils'
import React from 'react' import React from 'react' // eslint-disable-line no-use-before-define
import { PluginManagerComponent } from '../../types' import { PluginManagerComponent } from '../../types'
import ActivePluginCard from './ActivePluginCard' import ActivePluginCard from './ActivePluginCard'
import ModuleHeading from './moduleHeading' import ModuleHeading from './moduleHeading'

@ -1,5 +1,5 @@
import { Profile } from '@remixproject/plugin-utils' import { Profile } from '@remixproject/plugin-utils'
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-use-before-define
import React from 'react' import React from 'react'
import '../remix-ui-plugin-manager.css' import '../remix-ui-plugin-manager.css'
interface PluginCardProps { interface PluginCardProps {

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import { Profile } from '@remixproject/plugin-utils' import { Profile } from '@remixproject/plugin-utils'
import React from 'react' import React from 'react' // eslint-disable-line no-use-before-define
import { PluginManagerComponent, PluginManagerProfile } from '../../types' import { PluginManagerComponent, PluginManagerProfile } from '../../types'
import InactivePluginCard from './InactivePluginCard' import InactivePluginCard from './InactivePluginCard'
import ModuleHeading from './moduleHeading' import ModuleHeading from './moduleHeading'

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import React, { useEffect, useReducer, useState } from 'react' import React, { useEffect, useReducer, useState } from 'react' // eslint-disable-line no-use-before-define
import { ModalDialog } from '@remix-ui/modal-dialog' import { ModalDialog } from '@remix-ui/modal-dialog'
import { Toaster } from '@remix-ui/toaster' import { Toaster } from '@remix-ui/toaster'
import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web' import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web'

@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars,no-use-before-define */
import React from 'react' import React from 'react'
interface ModuleHeadingProps { interface ModuleHeadingProps {

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import React, { Fragment, useState } from 'react' import React, { Fragment, useState } from 'react' // eslint-disable-line no-use-before-define
/* eslint-disable-line */ /* eslint-disable-line */
import { ModalDialog } from '@remix-ui/modal-dialog' import { ModalDialog } from '@remix-ui/modal-dialog'
import useLocalStorage from '../custom-hooks/useLocalStorage' import useLocalStorage from '../custom-hooks/useLocalStorage'

@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import React, { Fragment, ReactNode, useEffect, useState } from 'react' import React, { Fragment, ReactNode, useEffect, useState } from 'react' // eslint-disable-line no-use-before-define
import { PluginManagerComponent, PluginManagerSettings } from '../../types' import { PluginManagerComponent, PluginManagerSettings } from '../../types'
import PermisssionsSettings from './permissionsSettings' import PermisssionsSettings from './permissionsSettings'
import { Profile } from '@remixproject/plugin-utils' import { Profile } from '@remixproject/plugin-utils'

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
import { Profile } from '@remixproject/plugin-utils' import { Profile } from '@remixproject/plugin-utils'
import React, { useState } from 'react' import React, { useState } from 'react' // eslint-disable-line no-use-before-define
import { RemixUiPluginManagerProps } from '../types' import { RemixUiPluginManagerProps } from '../types'
import ActivePluginCardContainer from './components/ActivePluginCardContainer' import ActivePluginCardContainer from './components/ActivePluginCardContainer'
import InactivePluginCardContainer from './components/InactivePluginCardContainer' import InactivePluginCardContainer from './components/InactivePluginCardContainer'

@ -32,7 +32,7 @@ export class RemixAppManager extends PluginManager {
constructor() constructor()
event: EventEmitter event: EventEmitter
pluginsDirectory: string pluginsDirectory: string
pluginLoader: PluginLoader pluginLoader: PluginLoader // eslint-disable-line no-use-before-define
permissionHandler: PermissionHandler permissionHandler: PermissionHandler
getAll(): import('@remixproject/plugin-utils').Profile<any>[] getAll(): import('@remixproject/plugin-utils').Profile<any>[]
getIds(): string[] getIds(): string[]
@ -70,11 +70,11 @@ export class PluginManagerComponent extends ViewPlugin extends Plugin implements
constructor(appManager: RemixAppManager, engine: Engine) constructor(appManager: RemixAppManager, engine: Engine)
appManager: RemixAppManager appManager: RemixAppManager
pluginSettings: PluginManagerSettings pluginSettings: PluginManagerSettings
app: PluginApi<any> app: PluginApi<any> // eslint-disable-line no-undef
engine: Engine engine: Engine
htmlElement: HTMLDivElement htmlElement: HTMLDivElement
views: { root: null, items: {} } views: { root: null, items: {} }
localPlugin: LocalPlugin localPlugin: LocalPlugin // eslint-disable-line no-use-before-define
pluginNames: string[] pluginNames: string[]
inactivePlugins: Profile[] inactivePlugins: Profile[]
activePlugins: Profile[] activePlugins: Profile[]
@ -133,7 +133,7 @@ declare class LocalPlugin {
} }
export interface PluginManagerContextProviderProps { export interface PluginManagerContextProviderProps {
children: React.ReactNode children: React.ReactNode // eslint-disable-line no-undef
pluginComponent: PluginManagerComponent pluginComponent: PluginManagerComponent
} }
@ -153,7 +153,7 @@ declare class PluginLoader {
set(plugin: any, actives: any): void set(plugin: any, actives: any): void
get(): any get(): any
} }
// eslint-disable-next-line no-redeclare
export type PluginManagerSettings = { export type PluginManagerSettings = {
openDialog: () => void openDialog: () => void
onValidation: () => void onValidation: () => void
@ -197,6 +197,7 @@ export type PluginManagerProfile = Profile & {
type: 'iframe' | 'ws' type: 'iframe' | 'ws'
hash: string hash: string
} }
// eslint-disable-next-line no-redeclare
export type LocalPlugin = { export type LocalPlugin = {
create: () => Profile create: () => Profile
updateName: (target: string) => void updateName: (target: string) => void

@ -79,7 +79,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
resetStorage() resetStorage()
} }
const modal = async (title: string, message: string | JSX.Element) => { const modal = async (title: string, message: string | JSX.Element) => { // eslint-disable-line no-undef
await setState(prevState => { await setState(prevState => {
return { return {
...prevState, ...prevState,

@ -73,7 +73,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => {
setCurrentVersion(value) setCurrentVersion(value)
api.setCompilerParameters({ version: value }) api.setCompilerParameters({ version: value })
} }
// eslint-disable-next-line no-undef
const modal = async (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => { const modal = async (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => {
await setState(prevState => { await setState(prevState => {
return { return {

@ -10,8 +10,8 @@ export interface CompilerContainerProps {
api: ICompilerApi, api: ICompilerApi,
compileTabLogic: CompileTabLogic, compileTabLogic: CompileTabLogic,
isHardhatProject: boolean, isHardhatProject: boolean,
tooltip: (message: string | JSX.Element) => void, tooltip: (message: string | JSX.Element) => void, // eslint-disable-line no-undef
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, // eslint-disable-line no-undef
compiledFileName: string, compiledFileName: string,
updateCurrentVersion: any, updateCurrentVersion: any,
configurationSettings: ConfigurationSettings configurationSettings: ConfigurationSettings
@ -21,6 +21,6 @@ export interface ContractSelectionProps {
contractMap: { contractMap: {
file: string file: string
} | Record<string, any>, } | Record<string, any>,
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => void, // eslint-disable-line no-undef
contractsDetails: Record<string, any> contractsDetails: Record<string, any>
} }

@ -1,4 +1,4 @@
import React, { useEffect, useState, useReducer } from 'react' import React, { useEffect, useState, useReducer } from 'react' // eslint-disable-line
import Button from './Button/StaticAnalyserButton' // eslint-disable-line import Button from './Button/StaticAnalyserButton' // eslint-disable-line
import { util } from '@remix-project/remix-lib' import { util } from '@remix-project/remix-lib'
import _ from 'lodash' import _ from 'lodash'

@ -1,3 +1,4 @@
/* eslint-disable no-undef */
export interface TreeViewProps { export interface TreeViewProps {
children?: React.ReactNode, children?: React.ReactNode,
id?: string id?: string

@ -292,7 +292,7 @@ export const Workspace = (props: WorkspaceProps) => {
return { ...prevState, modal: { ...state.modal, hide: true, message: null } } return { ...prevState, modal: { ...state.modal, hide: true, message: null } }
}) })
} }
// eslint-disable-next-line no-undef
const modal = async (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel: string, cancelFn: () => void) => { const modal = async (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel: string, cancelFn: () => void) => {
await setState(prevState => { await setState(prevState => {
return { return {

179
package-lock.json generated

@ -10488,12 +10488,6 @@
"integrity": "sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ==", "integrity": "sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ==",
"dev": true "dev": true
}, },
"@types/eslint-visitor-keys": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
"integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==",
"dev": true
},
"@types/estree": { "@types/estree": {
"version": "0.0.39", "version": "0.0.39",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
@ -11022,61 +11016,74 @@
"dev": true "dev": true
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.32.0.tgz",
"integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", "integrity": "sha512-+OWTuWRSbWI1KDK8iEyG/6uK2rTm3kpS38wuVifGUTDB6kjEuNrzBI1MUtxnkneuWG/23QehABe2zHHrj+4yuA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/experimental-utils": "3.10.1", "@typescript-eslint/experimental-utils": "4.32.0",
"debug": "^4.1.1", "@typescript-eslint/scope-manager": "4.32.0",
"debug": "^4.3.1",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0", "ignore": "^5.1.8",
"semver": "^7.3.2", "regexpp": "^3.1.0",
"tsutils": "^3.17.1" "semver": "^7.3.5",
"tsutils": "^3.21.0"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/experimental-utils": { "@typescript-eslint/experimental-utils": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.32.0.tgz",
"integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", "integrity": "sha512-WLoXcc+cQufxRYjTWr4kFt0DyEv6hDgSaFqYhIzQZ05cF+kXfqXdUh+//kgquPJVUBbL3oQGKQxwPbLxHRqm6A==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.7",
"@typescript-eslint/scope-manager": "4.32.0",
"@typescript-eslint/types": "4.32.0",
"@typescript-eslint/typescript-estree": "4.32.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
}
},
"@typescript-eslint/scope-manager": {
"version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz",
"integrity": "sha512-DK+fMSHdM216C0OM/KR1lHXjP1CNtVIhJ54kQxfOE6x8UGFAjha8cXgDMBEIYS2XCYjjCtvTkjQYwL3uvGOo0w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.3", "@typescript-eslint/types": "4.32.0",
"@typescript-eslint/types": "3.10.1", "@typescript-eslint/visitor-keys": "4.32.0"
"@typescript-eslint/typescript-estree": "3.10.1",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.32.0.tgz",
"integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", "integrity": "sha512-LE7Z7BAv0E2UvqzogssGf1x7GPpUalgG07nGCBYb1oK4mFsOiFC/VrSMKbZQzFJdN2JL5XYmsx7C7FX9p9ns0w==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.32.0.tgz",
"integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", "integrity": "sha512-tRYCgJ3g1UjMw1cGG8Yn1KzOzNlQ6u1h9AmEtPhb5V5a1TmiHWcRyF/Ic+91M4f43QeChyYlVTcf3DvDTZR9vw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "3.10.1", "@typescript-eslint/types": "4.32.0",
"@typescript-eslint/visitor-keys": "3.10.1", "@typescript-eslint/visitor-keys": "4.32.0",
"debug": "^4.1.1", "debug": "^4.3.1",
"glob": "^7.1.6", "globby": "^11.0.3",
"is-glob": "^4.0.1", "is-glob": "^4.0.1",
"lodash": "^4.17.15", "semver": "^7.3.5",
"semver": "^7.3.2", "tsutils": "^3.21.0"
"tsutils": "^3.17.1"
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.32.0.tgz",
"integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", "integrity": "sha512-e7NE0qz8W+atzv3Cy9qaQ7BTLwWsm084Z0c4nIO2l3Bp6u9WIgdqCgyPyV5oSPDMIW3b20H59OOCmVk3jw3Ptw==",
"dev": true, "dev": true,
"requires": { "requires": {
"eslint-visitor-keys": "^1.1.0" "@typescript-eslint/types": "4.32.0",
"eslint-visitor-keys": "^2.0.0"
} }
}, },
"debug": { "debug": {
@ -11088,21 +11095,6 @@
"ms": "2.1.2" "ms": "2.1.2"
} }
}, },
"eslint-utils": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
},
"eslint-visitor-keys": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
"dev": true
},
"lru-cache": { "lru-cache": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
@ -11150,60 +11142,56 @@
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/parser": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.32.0.tgz",
"integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", "integrity": "sha512-lhtYqQ2iEPV5JqV7K+uOVlPePjClj4dOw7K4/Z1F2yvjIUvyr13yJnDzkK6uon4BjHYuHy3EG0c2Z9jEhFk56w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/eslint-visitor-keys": "^1.0.0", "@typescript-eslint/scope-manager": "4.32.0",
"@typescript-eslint/experimental-utils": "3.10.1", "@typescript-eslint/types": "4.32.0",
"@typescript-eslint/types": "3.10.1", "@typescript-eslint/typescript-estree": "4.32.0",
"@typescript-eslint/typescript-estree": "3.10.1", "debug": "^4.3.1"
"eslint-visitor-keys": "^1.1.0"
}, },
"dependencies": { "dependencies": {
"@typescript-eslint/experimental-utils": { "@typescript-eslint/scope-manager": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.32.0.tgz",
"integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", "integrity": "sha512-DK+fMSHdM216C0OM/KR1lHXjP1CNtVIhJ54kQxfOE6x8UGFAjha8cXgDMBEIYS2XCYjjCtvTkjQYwL3uvGOo0w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.3", "@typescript-eslint/types": "4.32.0",
"@typescript-eslint/types": "3.10.1", "@typescript-eslint/visitor-keys": "4.32.0"
"@typescript-eslint/typescript-estree": "3.10.1",
"eslint-scope": "^5.0.0",
"eslint-utils": "^2.0.0"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.32.0.tgz",
"integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", "integrity": "sha512-LE7Z7BAv0E2UvqzogssGf1x7GPpUalgG07nGCBYb1oK4mFsOiFC/VrSMKbZQzFJdN2JL5XYmsx7C7FX9p9ns0w==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.32.0.tgz",
"integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", "integrity": "sha512-tRYCgJ3g1UjMw1cGG8Yn1KzOzNlQ6u1h9AmEtPhb5V5a1TmiHWcRyF/Ic+91M4f43QeChyYlVTcf3DvDTZR9vw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "3.10.1", "@typescript-eslint/types": "4.32.0",
"@typescript-eslint/visitor-keys": "3.10.1", "@typescript-eslint/visitor-keys": "4.32.0",
"debug": "^4.1.1", "debug": "^4.3.1",
"glob": "^7.1.6", "globby": "^11.0.3",
"is-glob": "^4.0.1", "is-glob": "^4.0.1",
"lodash": "^4.17.15", "semver": "^7.3.5",
"semver": "^7.3.2", "tsutils": "^3.21.0"
"tsutils": "^3.17.1"
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "3.10.1", "version": "4.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.32.0.tgz",
"integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", "integrity": "sha512-e7NE0qz8W+atzv3Cy9qaQ7BTLwWsm084Z0c4nIO2l3Bp6u9WIgdqCgyPyV5oSPDMIW3b20H59OOCmVk3jw3Ptw==",
"dev": true, "dev": true,
"requires": { "requires": {
"eslint-visitor-keys": "^1.1.0" "@typescript-eslint/types": "4.32.0",
"eslint-visitor-keys": "^2.0.0"
} }
}, },
"debug": { "debug": {
@ -11215,21 +11203,6 @@
"ms": "2.1.2" "ms": "2.1.2"
} }
}, },
"eslint-utils": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
},
"eslint-visitor-keys": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
"dev": true
},
"lru-cache": { "lru-cache": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",

@ -224,8 +224,8 @@
"@types/react-router-dom": "^5.3.0", "@types/react-router-dom": "^5.3.0",
"@types/tape": "^4.13.0", "@types/tape": "^4.13.0",
"@types/ws": "^7.2.4", "@types/ws": "^7.2.4",
"@typescript-eslint/eslint-plugin": "^3.3.0", "@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^3.3.0", "@typescript-eslint/parser": "^4.32.0",
"ace-mode-lexon": "^1.*.*", "ace-mode-lexon": "^1.*.*",
"ace-mode-move": "0.0.1", "ace-mode-move": "0.0.1",
"ace-mode-solidity": "^0.1.0", "ace-mode-solidity": "^0.1.0",

Loading…
Cancel
Save