build bug fixed

pull/697/head
aniket-engg 4 years ago committed by Aniket
parent a9e1b5b6ac
commit 3e7477d0a8
  1. 2
      libs/remix-debug/src/index.ts
  2. 27
      libs/remix-debug/src/init.ts
  3. 2
      libs/remix-debug/src/solidity-decoder/types/RefType.ts
  4. 3
      libs/remix-debug/tsconfig.lib.json

@ -1,5 +1,5 @@
'use strict' 'use strict'
import init from './init' import * as init from './init'
import { Ethdebugger as EthDebugger } from './Ethdebugger' import { Ethdebugger as EthDebugger } from './Ethdebugger'
import { Debugger as TransactionDebugger } from './debugger/debugger' import { Debugger as TransactionDebugger } from './debugger/debugger'
import { CmdLine } from './cmdline' import { CmdLine } from './cmdline'

@ -1,24 +1,23 @@
'use strict' 'use strict'
import Web3 from 'web3' import Web3 from 'web3'
export = { export function loadWeb3 (url) {
loadWeb3: function (url) {
if (!url) url = 'http://localhost:8545' if (!url) url = 'http://localhost:8545'
const web3 = new Web3() const web3 = new Web3()
web3.setProvider(new Web3.providers.HttpProvider(url)) web3.setProvider(new Web3.providers.HttpProvider(url))
this.extend(web3) extend(web3)
return web3 return web3
}, }
extendWeb3: function (web3) { export function extendWeb3 (web3) {
this.extend(web3) extend(web3)
}, }
setProvider: function (web3, url) { export function setProvider (web3, url) {
web3.setProvider(new web3.providers.HttpProvider(url)) web3.setProvider(new web3.providers.HttpProvider(url))
}, }
web3DebugNode: function (network) { export function web3DebugNode (network) {
const web3DebugNodes = { const web3DebugNodes = {
'Main': 'https://rpc.archivenode.io/e50zmkroshle2e2e50zm0044i7ao04ym', 'Main': 'https://rpc.archivenode.io/e50zmkroshle2e2e50zm0044i7ao04ym',
'Rinkeby': 'https://remix-rinkeby.ethdevops.io', 'Rinkeby': 'https://remix-rinkeby.ethdevops.io',
@ -27,12 +26,12 @@ export = {
'Kovan': 'https://remix-kovan.ethdevops.io' 'Kovan': 'https://remix-kovan.ethdevops.io'
} }
if (web3DebugNodes[network]) { if (web3DebugNodes[network]) {
return this.loadWeb3(web3DebugNodes[network]) return loadWeb3(web3DebugNodes[network])
} }
return null return null
}, }
extend: function (web3) { export function extend (web3) {
if (!web3.extend) { if (!web3.extend) {
return return
} }
@ -72,4 +71,4 @@ export = {
}) })
} }
} }
}

@ -32,7 +32,7 @@ export class RefType {
} }
let offset = stack[stack.length - 1 - stackDepth] let offset = stack[stack.length - 1 - stackDepth]
if (this.isInStorage()) { if (this.isInStorage()) {
offset = util.toBN(offset) offset = toBN(offset)
try { try {
return await this.decodeFromStorage({ offset: 0, slot: offset }, storageResolver) return await this.decodeFromStorage({ offset: 0, slot: offset }, storageResolver)
} catch (e) { } catch (e) {

@ -10,7 +10,8 @@
}, },
"exclude": [ "exclude": [
"**/*.spec.js", "**/*.spec.js",
"test/" "test/",
"test.ts"
], ],
"include": ["**/*.ts"] "include": ["**/*.ts"]
} }

Loading…
Cancel
Save