Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update web3.js import #5160

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/etherscan/src/app/views/VerifyView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from 'react'
import Web3 from 'web3'
import { Web3 } from 'web3'

import {PluginClient} from '@remixproject/plugin'
import {CustomTooltip} from '@remix-ui/helper'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { InjectedProviderDefault } from './injected-provider-default'

export class InjectedCustomProvider extends InjectedProviderDefault {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as packageJson from '../../../../../package.json'
import { InjectedCustomProvider } from './injected-custom-provider'
import Web3 from 'web3'
import { Web3 } from 'web3'

const profile = {
name: 'injected-ephemery-testnet-provider',
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/app/tabs/debugger-tab.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { DebuggerUI } from '@remix-ui/debugger-ui' // eslint-disable-line
import { DebuggerApiMixin } from '@remix-ui/debugger-ui'
import { ViewPlugin } from '@remixproject/engine-web'
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/execution-context.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global ethereum */
'use strict'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { execution } from '@remix-project/remix-lib'
import EventManager from '../lib/events'
import { bytesToHex } from '@ethereumjs/util'
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/providers/injected.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util'
import { ExecutionContext } from '../execution-context'

Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/providers/node.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util'
import { Personal } from 'web3-eth-personal'
import { ExecutionContext } from '../execution-context'
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/blockchain/providers/vm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3, { FMT_BYTES, FMT_NUMBER, LegacySendAsyncProvider } from 'web3'
import { Web3, FMT_BYTES, FMT_NUMBER, LegacySendAsyncProvider } from 'web3'
import { fromWei, toBigInt } from 'web3-utils'
import { privateToAddress, hashPersonalMessage, isHexString, bytesToHex } from '@ethereumjs/util'
import { extend, JSONRPCRequestPayload, JSONRPCResponseCallback } from '@remix-project/remix-simulator'
Expand Down
2 changes: 1 addition & 1 deletion libs/ghaction-helper/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ethers } from "ethers"
import { Provider } from '@remix-project/remix-simulator'
import { getArtifactsByContractName } from './artifacts-helper'
import { SignerWithAddress } from './signer'
import Web3 from "web3"
import { Web3 } from "web3"

const providerConfig = {
fork: global.fork || null,
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-debug/src/cmdline/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Debugger } from '../debugger/debugger'
import { EventEmitter } from 'events'

Expand Down
2 changes: 1 addition & 1 deletion libs/remix-debug/src/init.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
import Web3, { Web3PluginBase } from 'web3'
import { Web3, Web3PluginBase } from 'web3'
import { toNumber } from 'web3-utils'

export function extendWeb3 (web3) {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-lib/src/execution/txRunnerWeb3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'
import { EventManager } from '../eventManager'
import type { Transaction as InternalTransaction } from './txRunner'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { toBigInt, toHex } from 'web3-utils'

export class TxRunnerWeb3 {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-lib/src/init.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict'
import Web3, { Web3PluginBase } from 'web3'
import { Web3, Web3PluginBase } from 'web3'
import { toNumber } from 'web3-utils'

export function extendWeb3 (web3) {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/accounts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3, { FMT_BYTES, FMT_NUMBER } from 'web3'
import { Web3, FMT_BYTES, FMT_NUMBER } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/blocks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/events.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/misc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Provider } from '../src/index'
const web3 = new Web3()
import * as assert from 'assert'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-simulator/test/transactions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global describe, before, it */
import Web3 from 'web3'
import { Web3 } from 'web3'
import { LegacyTransaction, FeeMarketEIP1559Transaction } from '@ethereumjs/tx'
import { Provider } from '../src/index'
const web3 = new Web3()
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/deployer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import async from 'async'
import { execution } from '@remix-project/remix-lib'
import Web3, { FMT_BYTES, FMT_NUMBER } from 'web3'
import { Web3, FMT_BYTES, FMT_NUMBER } from 'web3'
import { compilationInterface } from './types'

/**
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Command } from 'commander';
import Web3 from 'web3'
import { Web3 } from 'web3'
import path from 'path'
import axios, { AxiosResponse } from 'axios'
import { runTestFiles } from './runTestFiles'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/runTestFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from './fileSystem'
import { runTest } from './testRunner'
import { TestResultInterface, ResultsInterface, CompilerConfiguration, compilationInterface, ASTInterface, Options, AstNode } from './types'
import colors from 'colors'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { format } from 'util'
import { compileFileOrFiles } from './compiler'
import { deployAll } from './deployer'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/runTestSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import async, { ErrorCallback } from 'async'
import { compileContractSources, writeTestAccountsContract } from './compiler'
import { deployAll } from './deployer'
import { runTest } from './testRunner'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { EventEmitter } from 'events'
import { Provider, extend } from '@remix-project/remix-simulator'
import {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/src/testRunner.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import async from 'async'
import * as changeCase from 'change-case'
import Web3 from 'web3'
import { Web3 } from 'web3'
import assertionEvents from './assertionEvents'
import {
RunListInterface, TestCbInterface, TestResultInterface, ResultCbInterface,
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-tests/tests/testRunner.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as async from 'async'
import Web3 from 'web3';
import { Web3 } from 'web3';
import * as assert from 'assert'
import { Provider, extend } from '@remix-project/remix-simulator'

Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/debugger-ui/src/lib/api/debugger-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'
import { init , traceHelper, TransactionDebugger as Debugger } from '@remix-project/remix-debug'
import { CompilerAbstract } from '@remix-project/remix-solidity'
import { lineText } from '@remix-ui/editor'
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/run-tab/src/lib/actions/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { DeployMode, MainnetPrompt } from "../types"
import { displayNotification, fetchProxyDeploymentsSuccess, setDecodedResponse, updateInstancesBalance } from "./payload"
import { addInstance } from "./actions"
import { addressToString, logBuilder } from "@remix-ui/helper"
import Web3 from "web3"
import { Web3 } from "web3"

declare global {
interface Window {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/run-tab/src/lib/actions/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { addDeployOption, clearAllInstances, clearAllPinnedInstances, clearRecor
import { updateInstanceBalance } from './deploy'
import { CompilerAbstract } from '@remix-project/remix-solidity'
import BN from 'bn.js'
import Web3 from 'web3'
import { Web3 } from 'web3'
import { Plugin } from "@remixproject/engine"
import { getNetworkProxyAddresses } from "./deploy"
import { shortenAddress } from "@remix-ui/helper"
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/run-tab/src/lib/types/execution-context.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Web3 from 'web3'
import { Web3 } from 'web3'

export class ExecutionContext {
event: any;
Expand Down
Loading