Unverified Commit 44b5f523 authored by bunsenstraat's avatar bunsenstraat Committed by GitHub

Merge branch 'master' into bunsenstraat-patch-4

parents 015059b8 af3f8c9f
......@@ -176,7 +176,6 @@ const stateCheck = {
}
}
*/
const ballotABI = `[
{
"inputs": [
......
// Merge custom command types with nightwatch types
import { NightwatchBrowser } from 'nightwatch'
/* eslint-disable no-use-before-define */
import { NightwatchBrowser } from 'nightwatch' // eslint-disable-line @typescript-eslint/no-unused-vars
declare module 'nightwatch' {
export interface NightwatchCustomCommands {
......
......@@ -76,7 +76,6 @@ export class ExecutionContext {
if (err) name = 'Unknown'
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md
else if (id === 1) name = 'Main'
else if (id === 2) name = 'Morden (deprecated)'
else if (id === 3) name = 'Ropsten'
else if (id === 4) name = 'Rinkeby'
else if (id === 5) name = 'Goerli'
......
......@@ -4,7 +4,8 @@
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-unused-vars": "off",
"dot-notation": "off"
"dot-notation": "off",
"no-use-before-define": "off"
},
"ignorePatterns": ["!**/*"]
}
......@@ -3,7 +3,8 @@
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/prefer-namespace-keyword": "off",
"no-unused-vars": "off"
"no-unused-vars": "off",
"no-use-before-define": "off"
},
"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.
* If no event for the current type, children are visited.
*/
// eslint-disable-next-line no-redeclare
export class AstWalker extends EventEmitter {
manageCallback (
node: AstNode,
......
......@@ -58,6 +58,7 @@ export function sourceLocationFromSrc (src: string): Location {
* Routines for retrieving solc AST object(s) using some criteria, usually
* includng "src' information.
*/
// eslint-disable-next-line no-redeclare
export class SourceMappings {
readonly source: string;
readonly lineBreaks: Array<number>;
......
......@@ -3,7 +3,8 @@
"rules": {
"standard/no-callback-literal": "off",
"no-unused-vars": "off",
"dot-notation": "off"
"dot-notation": "off",
"no-use-before-define": "off"
},
"env": {
"browser": true,
......
......@@ -115,8 +115,7 @@ describe('blocks', () => {
assert.deepEqual(numberTransactions, correctBlock.uncles.length)
})
})
/*
/*
describe('eth_getStorageAt', () => {
it('should get storage at position at given address', async () => {
const abi: any = [
......@@ -201,30 +200,29 @@ describe('blocks', () => {
}
]
// const code = '0x608060405234801561001057600080fd5b506040516020806102018339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600081905550506101a9806100586000396000f3fe60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480632a1afcd91461006157806360fe47b11461008c5780636d4ce63c146100c7578063ce01e1ec146100f2575b600080fd5b34801561006d57600080fd5b5061007661012d565b6040518082815260200191505060405180910390f35b34801561009857600080fd5b506100c5600480360360208110156100af57600080fd5b8101908080359060200190929190505050610133565b005b3480156100d357600080fd5b506100dc61013d565b6040518082815260200191505060405180910390f35b3480156100fe57600080fd5b5061012b6004803603602081101561011557600080fd5b8101908080359060200190929190505050610146565b005b60005481565b8060008190555050565b60008054905090565b80600081905550807f63a242a632efe33c0e210e04e4173612a17efa4f16aa4890bc7e46caece80de060405160405180910390a25056fea165627a7a7230582063160eb16dc361092a85ced1a773eed0b63738b83bea1e1c51cf066fa90e135d0029'
const code = '0x608060405234801561001057600080fd5b506040516020806102018339810180604052602081101561003057600080fd5b810190808051906020019092919050505080600081905550506101a9806100586000396000f3fe60806040526004361061005c576000357c0100000000000000000000000000000000000000000000000000000000900480632a1afcd91461006157806360fe47b11461008c5780636d4ce63c146100c7578063ce01e1ec146100f2575b600080fd5b34801561006d57600080fd5b5061007661012d565b6040518082815260200191505060405180910390f35b34801561009857600080fd5b506100c5600480360360208110156100af57600080fd5b8101908080359060200190929190505050610133565b005b3480156100d357600080fd5b506100dc61013d565b6040518082815260200191505060405180910390f35b3480156100fe57600080fd5b5061012b6004803603602081101561011557600080fd5b8101908080359060200190929190505050610146565b005b60005481565b8060008190555050565b60008054905090565b80600081905550807f63a242a632efe33c0e210e04e4173612a17efa4f16aa4890bc7e46caece80de060405160405180910390a25056fea165627a7a7230582063160eb16dc361092a85ced1a773eed0b63738b83bea1e1c51cf066fa90e135d0029'
// const contract = new web3.eth.Contract(abi)
// const accounts = await web3.eth.getAccounts()
const contract = new web3.eth.Contract(abi)
const accounts = await web3.eth.getAccounts()
// const contractInstance: any = await contract.deploy({ data: code, arguments: [100] }).send({ from: accounts[0], gas: 400000 })
// contractInstance.currentProvider = web3.eth.currentProvider
// contractInstance.givenProvider = web3.eth.currentProvider
const contractInstance: any = await contract.deploy({ data: code, arguments: [100] }).send({ from: accounts[0], gas: 400000 })
contractInstance.currentProvider = web3.eth.currentProvider
contractInstance.givenProvider = web3.eth.currentProvider
// await contractInstance.methods.set(100).send({ from: accounts[0].toLowerCase(), gas: 400000 })
// let storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
// assert.deepEqual(storage, '0x64')
await contractInstance.methods.set(100).send({ from: accounts[0].toLowerCase(), gas: 400000 })
let storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
assert.deepEqual(storage, '0x64')
// await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 })
// storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
// assert.deepEqual(storage, '0x64')
await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 })
storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
assert.deepEqual(storage, '0x64')
await contractInstance.methods.set(200).send({ from: accounts[0], gas: 400000 })
storage = await web3.eth.getStorageAt(contractInstance.options.address, 0)
assert.deepEqual(storage, '0xc8')
})
})
*/
*/
describe('eth_call', () => {
it('should get a value', async () => {
const abi: any = [
......
......@@ -2,7 +2,8 @@
"extends": "../../.eslintrc",
"rules": {
"dot-notation": "off",
"no-unused-vars": "off"
"no-unused-vars": "off",
"no-use-before-define": "off"
},
"env": {
"browser": true,
......
......@@ -2,7 +2,8 @@
"extends": "../../.eslintrc",
"rules": {
"dot-notation": "off",
"no-unused-vars": "off"
"no-unused-vars": "off",
"no-use-before-define": "off"
},
"env": {
"browser": true,
......
......@@ -6,7 +6,7 @@ module.exports = {
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
transformIgnorePatterns: ["/node_modules/", "\\.pnp\\.[^\\\/]+$"],
transformIgnorePatterns: ["/node_modules/", "/dist/", "\\.pnp\\.[^\\\/]+$"],
rootDir: "./",
testTimeout: 40000,
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'html', 'json'],
......
......@@ -58,13 +58,12 @@ export interface CompilerConfiguration {
usingWorker?: boolean,
runs: number
}
export interface CompilationErrors {
name: string,
errors: Array<Error>,
message: string
}
// eslint-disable-next-line no-redeclare
export class CompilationErrors extends Error {
constructor (errors: Array<any>) {
const mapError = errors.map((e) => { return e.formattedMessage || e.message })
......
import type { CompilationResult, CompilationSource } from '@remix-project/remix-solidity-ts' // eslint-disable-line
export interface DebuggerUIProps {
debuggerAPI: IDebuggerApi
}
export interface LineColumnLocation {
start: {
line: number, column: number
......@@ -68,3 +64,7 @@ export interface IDebuggerApi {
web3: () => any // returns an instance of web3.js
showMessage (title: string, message: string): void
}
export interface DebuggerUIProps {
debuggerAPI: IDebuggerApi
}
/* eslint-disable no-undef */
export interface ExtractData {
children?: Array<{key: number | string, value: ExtractData}>
self?: string | number,
......@@ -13,7 +15,7 @@ export interface ExtractData {
}
export type ExtractFunc = (json: any, parent?: any) => ExtractData
export type FormatSelfFunc = (key: string | number, data: ExtractData) => JSX.Element
export interface DropdownPanelProps {
dropdownName: string,
dropdownMessage?: string,
......@@ -32,5 +34,3 @@ export interface DropdownPanelProps {
headStyle?: React.CSSProperties,
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 } }
})
}
// eslint-disable-next-line no-undef
const modal = (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => {
setState(prevState => {
return {
......
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 */
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 MenuItems = action[]
export interface FileExplorerContextMenuProps {
actions: action[],
createNewFile: (folder?: string) => void,
......
......@@ -4,6 +4,7 @@ import { ModalDialogProps } from './types' // eslint-disable-line
import './remix-ui-modal-dialog.css'
declare global {
// eslint-disable-next-line no-unused-vars
interface Window { testmode: boolean; }
}
......
/* eslint-disable no-undef */
export interface ModalDialogProps {
id?: string
title?: string,
......
// 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 '../remix-ui-plugin-manager.css'
interface PluginCardProps {
......
/* eslint-disable @typescript-eslint/no-unused-vars */
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 ActivePluginCard from './ActivePluginCard'
import ModuleHeading from './moduleHeading'
......
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 '../remix-ui-plugin-manager.css'
interface PluginCardProps {
......
/* eslint-disable @typescript-eslint/no-unused-vars */
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 InactivePluginCard from './InactivePluginCard'
import ModuleHeading from './moduleHeading'
......
/* 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 { Toaster } from '@remix-ui/toaster'
import { IframePlugin, WebsocketPlugin } from '@remixproject/engine-web'
......
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-unused-vars,no-use-before-define */
import React from 'react'
interface ModuleHeadingProps {
......
/* 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 */
import { ModalDialog } from '@remix-ui/modal-dialog'
import useLocalStorage from '../custom-hooks/useLocalStorage'
......
/* 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 PermisssionsSettings from './permissionsSettings'
import { Profile } from '@remixproject/plugin-utils'
......
/* eslint-disable @typescript-eslint/no-unused-vars */
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 ActivePluginCardContainer from './components/ActivePluginCardContainer'
import InactivePluginCardContainer from './components/InactivePluginCardContainer'
......
......@@ -32,7 +32,7 @@ export class RemixAppManager extends PluginManager {
constructor()
event: EventEmitter
pluginsDirectory: string
pluginLoader: PluginLoader
pluginLoader: PluginLoader // eslint-disable-line no-use-before-define
permissionHandler: PermissionHandler
getAll(): import('@remixproject/plugin-utils').Profile<any>[]
getIds(): string[]
......@@ -70,11 +70,11 @@ export class PluginManagerComponent extends ViewPlugin extends Plugin implements
constructor(appManager: RemixAppManager, engine: Engine)
appManager: RemixAppManager
pluginSettings: PluginManagerSettings
app: PluginApi<any>
app: PluginApi<any> // eslint-disable-line no-undef
engine: Engine
htmlElement: HTMLDivElement
views: { root: null, items: {} }
localPlugin: LocalPlugin
localPlugin: LocalPlugin // eslint-disable-line no-use-before-define
pluginNames: string[]
inactivePlugins: Profile[]
activePlugins: Profile[]
......@@ -133,7 +133,7 @@ declare class LocalPlugin {
}
export interface PluginManagerContextProviderProps {
children: React.ReactNode
children: React.ReactNode // eslint-disable-line no-undef
pluginComponent: PluginManagerComponent
}
......@@ -153,7 +153,7 @@ declare class PluginLoader {
set(plugin: any, actives: any): void
get(): any
}
// eslint-disable-next-line no-redeclare
export type PluginManagerSettings = {
openDialog: () => void
onValidation: () => void
......@@ -197,6 +197,7 @@ export type PluginManagerProfile = Profile & {
type: 'iframe' | 'ws'
hash: string
}
// eslint-disable-next-line no-redeclare
export type LocalPlugin = {
create: () => Profile
updateName: (target: string) => void
......
......@@ -79,7 +79,7 @@ export const PublishToStorage = (props: RemixUiPublishToStorageProps) => {
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 => {
return {
...prevState,
......
......@@ -73,7 +73,7 @@ export const SolidityCompiler = (props: SolidityCompilerProps) => {
setCurrentVersion(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) => {
await setState(prevState => {
return {
......
......@@ -10,8 +10,8 @@ export interface CompilerContainerProps {
api: ICompilerApi,
compileTabLogic: CompileTabLogic,
isHardhatProject: boolean,
tooltip: (message: string | JSX.Element) => void,
modal: (title: string, message: string | JSX.Element, okLabel: string, okFn: () => void, cancelLabel?: string, cancelFn?: () => void) => 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, // eslint-disable-line no-undef
compiledFileName: string,
updateCurrentVersion: any,
configurationSettings: ConfigurationSettings
......@@ -21,6 +21,6 @@ export interface ContractSelectionProps {
contractMap: {
file: string
} | 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>
}
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 { util } from '@remix-project/remix-lib'
import _ from 'lodash'
......
/* eslint-disable no-undef */
export interface TreeViewProps {
children?: React.ReactNode,
id?: string
......
......@@ -292,7 +292,7 @@ export const Workspace = (props: WorkspaceProps) => {
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) => {
await setState(prevState => {
return {
......
This diff is collapsed.
......@@ -223,8 +223,8 @@
"@types/react-router-dom": "^5.3.0",
"@types/tape": "^4.13.0",
"@types/ws": "^7.2.4",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
"ace-mode-lexon": "^1.*.*",
"ace-mode-move": "0.0.1",
"ace-mode-solidity": "^0.1.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment